helloworld

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kind       = "HelloWorld"
	APIVersion = "examples.kpt.dev/v1alpha1"
)

Variables

This section is empty.

Functions

func Filter

func Filter() kio.Filter

Filter returns a new HelloWorldFunction

Types

type HelloWorldFunction

type HelloWorldFunction struct {
	// Kind is the API name.  Must be HelloWorld.
	Kind string `yaml:"kind"`

	// APIVersion is the API version.  Must be examples.kpt.dev/v1alpha1
	APIVersion string `yaml:"apiVersion"`

	// Metadata defines instance metadata.
	Metadata Metadata `yaml:"metadata"`

	// Spec defines the desired declarative configuration.
	Spec Spec `yaml:"spec"`
}

HelloWorldFunction implements the HelloWorld Function

func (*HelloWorldFunction) Filter

func (f *HelloWorldFunction) Filter(inputs []*yaml.RNode) ([]*yaml.RNode, error)

type Metadata

type Metadata struct {
	// Name is the name of the HelloWorld Resources
	Name string `yaml:"name"`

	// Namespace is the namespace of the HelloWorld Resources
	Namespace string `yaml:"namespace"`

	// Labels are labels applied to the HelloWorld Resources
	Labels map[string]string `yaml:"labels"`

	// Annotations are annotations applied to the HelloWorld Resources
	Annotations map[string]string `yaml:"annotations"`
}

type Spec

type Spec struct {
	Version string `yaml:"version"`

	Port *int32 `yaml:"port"`

	Replicas *int32 `yaml:"replicas"`

	Selector map[string]string `yaml:"selector"`
}

Jump to

Keyboard shortcuts

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