echo

package
Version: v0.0.0-...-49fac75 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Example
package main

import (
	"embed"
	"os"

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

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

func main() {
	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(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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL