Documentation ¶
Overview ¶
Example ¶
package main import ( "embed" "os" testlog "knative.dev/reconciler-test/pkg/logging" "knative.dev/reconciler-test/pkg/manifest" ) //go:embed *.yaml var yaml embed.FS func main() { ctx := testlog.NewContext() images := map[string]string{} cfg := map[string]interface{}{ "name": "foo", "namespace": "bar", "image": "gcr.io/knative-samples/helloworld-go", } files, err := manifest.ExecuteYAML(ctx, yaml, images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: batch/v1 kind: CronJob metadata: name: foo namespace: bar spec: schedule: "* * * * *" jobTemplate: metadata: labels: app: foo spec: template: spec: containers: - name: user-container image: gcr.io/knative-samples/helloworld-go imagePullPolicy: IfNotPresent env: - name: ONE_SHOT value: "true" - name: POD_NAME value: heartbeats - name: POD_NAMESPACE value: bar restartPolicy: Never
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsTrackerReference ¶
AsTrackerReference returns a tracker.Reference for a Job without namespace.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.