svc

package
v0.21.0 Latest Latest
Warning

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

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

Documentation

Overview

Example
package main

import (
	"os"

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

func main() {
	images := map[string]string{}
	cfg := map[string]interface{}{
		"name":          "foo",
		"namespace":     "bar",
		"selectorKey":   "baz",
		"selectorValue": "baf",
	}

	files, err := manifest.ExecuteLocalYAML(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

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsRef

func AsRef(name string) *duckv1.KReference

AsRef returns a KRef for a Service without namespace.

func Install

func Install(name, selectorKey, selectorValue string) feature.StepFn

Install will create a Service resource mapping :80 to :8080 on the provided selector for pods.

Types

This section is empty.

Jump to

Keyboard shortcuts

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