Documentation ¶
Overview ¶
Example (Full) ¶
package main import ( "os" "knative.dev/reconciler-test/pkg/manifest" ) func main() { images := map[string]string{} cfg := map[string]interface{}{ "name": "foo", "namespace": "bar", "ceOverrides": map[string]interface{}{ "extensions": map[string]string{ "ext1": "val1", "ext2": "val2", }, }, "sink": map[string]interface{}{ "ref": map[string]interface{}{ "kind": "AKind", "apiVersion": "something.valid/v1", "name": "thesink", }, "uri": "uri/parts", }, } files, err := manifest.ExecuteLocalYAML(images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: sources.knative.dev/v1 kind: ContainerSource metadata: name: foo namespace: bar spec: ceOverrides: extensions: ext1: val1 ext2: val2 sink: ref: kind: AKind namespace: bar name: thesink apiVersion: something.valid/v1 uri: uri/parts template: spec: containers: - name: heartbeats image: ko://knative.dev/eventing/test/test_images/heartbeats args: - --period=1 env: - name: POD_NAME value: heartbeats - name: POD_NAMESPACE value: bar
Example (Min) ¶
package main import ( "os" "knative.dev/reconciler-test/pkg/manifest" ) func main() { images := map[string]string{} cfg := map[string]interface{}{ "name": "foo", "namespace": "bar", } files, err := manifest.ExecuteLocalYAML(images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: sources.knative.dev/v1 kind: ContainerSource metadata: name: foo namespace: bar spec: sink: template: spec: containers: - name: heartbeats image: ko://knative.dev/eventing/test/test_images/heartbeats args: - --period=1 env: - name: POD_NAME value: heartbeats - name: POD_NAMESPACE value: bar
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gvr ¶
func Gvr() schema.GroupVersionResource
func Install ¶
Install will create a ContainerSource resource, augmented with the config fn options.
func WithExtensions ¶
WithExtensions adds the ceOverrides related config to a ContainerSource spec.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.