Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConfigError

func IsConfigError(e error) bool

IsConfigError returns true if the error is a ConfigError.

Types

type ConfigError

type ConfigError struct {
	// contains filtered or unexported fields
}

ConfigError represents a non-exceptional issue with configuration.

For operational errors such as IO operation failures, throw errors instead of returning a ConfigError.

func NewConfigError

func NewConfigError(msg string) *ConfigError

NewConfigError returns a ConfigError with the specified message.

func NewManifestError

func NewManifestError(msg string, objects ...KubernetesObject) *ConfigError

NewManifestError reports an error on a specific set of manifests.

func (*ConfigError) Error

func (e *ConfigError) Error() string

Error implements error.

func (*ConfigError) Log

func (e *ConfigError) Log()

Log prints the error to standard output.

type ConfigFunc

type ConfigFunc func(configs *Configs) error

ConfigFunc is a type of kpt function that consumes Configs and potentially mutates it.

type Configs

type Configs []KubernetesObject

Configs is a list of Kubernetes objects used as the standard message format between kpt functions.

type KubernetesObject

type KubernetesObject interface {
	metav1.Object
	GroupVersionKind() schema.GroupVersionKind
}

KubernetesObject represents a single Kubernetes object.

type Unstructured

type Unstructured struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Object holds all non-meta fields in a JSON-compatible map.
	//
	// Behavior when adding "kind", "apiVersion", and "metadata" fields to Object is undefined.
	Object map[string]interface{} `json:"-"` // handled by Unstructured.MarshalJSON
}

Unstructured is a pared-down version of unstructured.Unstructured in k8s.io/apimachinery.

Use framework.Register to register types with the parser to get a typesafe experience rather than manipulating this directly.

func (*Unstructured) MarshalJSON

func (u *Unstructured) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Unstructured) UnmarshalJSON

func (u *Unstructured) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Unstructured) UnmarshalYAML

func (u *Unstructured) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

type UnstructuredList

type UnstructuredList struct {
	metav1.TypeMeta  `json:",inline"`
	*metav1.ListMeta `json:"metadata,omitempty"`

	Items []Unstructured `json:"items,omitempty"`
}

UnstructuredList holds a list of Unstructureds.