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", "selectorKey": "baz", "selectorValue": "baf", } files, err := manifest.ExecuteYAML(ctx, yaml, images, cfg) if err != nil { panic(err) } manifest.OutputYAML(os.Stdout, files) }
Output: apiVersion: v1 kind: Service metadata: name: foo namespace: bar spec: selector: baz: baf ports: - protocol: TCP port: 80 targetPort: 8080
Index ¶
- func Address(ctx context.Context, name string) (*apis.URL, error)
- func AsDestinationRef(name string) *duckv1.Destination
- func AsRef(name string) *duckv1.KReference
- func AsTrackerReference(name string) *tracker.Reference
- func Gvr() schema.GroupVersionResource
- func Install(name, selectorKey, selectorValue string) feature.StepFn
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsDestinationRef ¶ added in v0.22.0
func AsDestinationRef(name string) *duckv1.Destination
Deprecated, use reconciler-test/resources/svc
func AsRef ¶
func AsRef(name string) *duckv1.KReference
AsRef returns a KRef for a Service without namespace. Deprecated, use reconciler-test/resources/svc
func AsTrackerReference ¶ added in v0.22.0
Deprecated, use reconciler-test/resources/svc
func Gvr ¶ added in v0.22.0
func Gvr() schema.GroupVersionResource
Deprecated, use reconciler-test/resources/svc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.