cfunc

package
v0.0.0-...-bfebeee Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixStyles

func FixStyles(in ...*yaml.RNode) error

func GetReplicas

func GetReplicas(r *yaml.RNode) (int, error)

func GetStatefulSet

func GetStatefulSet(in []*yaml.RNode, name, ns string) (*yaml.RNode, error)

func GetStatefulSetHostnames

func GetStatefulSetHostnames(in []*yaml.RNode, name, ns string) ([]string, error)

func ParseTemplate

func ParseTemplate(name, tmpl string, data interface{}) (*yaml.RNode, error)

func ParseTemplates

func ParseTemplates(tmpls map[string]string, data interface{}) ([]*yaml.RNode, error)

Types

type ConfigFunction

type ConfigFunction struct {
	// RW is used to read from an input and write to an output.
	RW *kio.ByteReadWriter

	// ObjectMeta contains Resource metadata to use in templates.
	//
	// The following information from the function config should be applied
	// to all Resource configs the function manages/generates:
	// - `metadata.name` (Used as a value and/or prefix for Resource names.)
	// - `metadata.namespace`
	//
	// In addition, the function should set the following labels on
	// Resource configs:
	// - `app.kubernetes.io/name` (Implementation specific. Used to group multiple instances of the same software)
	// - `app.kubernetes.io/instance` (Default is the value of `metadata.name`)
	yaml.ObjectMeta `yaml:"metadata"`
}

ConfigFunction is a standardized starting-point for Kubernetes configuration function implementations.

https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md

func (*ConfigFunction) SyncMetadata

func (f *ConfigFunction) SyncMetadata(appName string) error

Jump to

Keyboard shortcuts

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