echo

package
v0.0.0-...-e8273a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Example
package main

import (
	"context"
	"embed"
	"os"

	testlog "knative.dev/reconciler-test/pkg/logging"
	"knative.dev/reconciler-test/pkg/manifest"
)

//go:embed *.yaml
var templates embed.FS

func main() {
	ctx := testlog.NewContext(context.TODO())
	images := map[string]string{
		"ko://knative.dev/reconciler-test/test/example/cmd/echo": "uri://a-real-container",
	}
	cfg := map[string]interface{}{
		"name":      "echo-123",
		"namespace": "example",
		"message":   "Hello, World!",
	}

	files, err := manifest.ExecuteYAML(ctx, templates, images, cfg)
	if err != nil {
		panic(err)
	}

	manifest.OutputYAML(os.Stdout, files)
}
Output:

apiVersion: batch/v1
kind: Job
metadata:
  name: echo-123
  namespace: example
spec:
  backoffLimit: 0
  parallelism: 1
  template:
    spec:
      restartPolicy: Never
      containers:
        - name: echo
          image: uri://a-real-container
          env:
            - name: ECHO
              value: "Hello, World!"

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(name, message string) feature.StepFn

Types

type Output

type Output struct {
	Success bool   `json:"success"`
	Message string `json:"msg"`
}

Output is the base output we can expect from a echo job.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL