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{ "ko://knative.dev/eventing/test/test_images/event-library": "gcr.io/knative-samples/helloworld-go", } cfg := map[string]interface{}{ "name": "foo", "namespace": "bar", } files, err := manifest.ExecuteYAML(ctx, yaml, images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: v1 kind: Pod metadata: name: foo namespace: bar labels: app: library-foo spec: restartPolicy: "Never" containers: - name: library image: gcr.io/knative-samples/helloworld-go imagePullPolicy: "IfNotPresent" --- apiVersion: v1 kind: Service metadata: name: foo namespace: bar spec: selector: app: library-foo ports: - protocol: TCP port: 80 targetPort: 8080
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsKReference ¶
func AsKReference(name string) *duckv1.KReference
AsKReference returns a KReference for the svc the event library uses to be addressable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.