svc

package
v0.28.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 10 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 Address added in v0.22.0

func Address(ctx context.Context, name string) (*apis.URL, error)

Address Deprecated, use reconciler-test/resources/svc

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

func AsTrackerReference(name string) *tracker.Reference

Deprecated, use reconciler-test/resources/svc

func Gvr added in v0.22.0

Deprecated, use reconciler-test/resources/svc

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. Deprecated, use reconciler-test/resources/svc

Types

This section is empty.

Jump to

Keyboard shortcuts

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