package ifc

import "sigs.k8s.io/kustomize/pkg/ifc"

Package ifc holds miscellaneous interfaces used by kustomize.

Index

Constants

const SecretTypeOpaque = "Opaque"

See core.v1.SecretTypeOpaque

Types

type GenerationBehavior

type GenerationBehavior int

GenerationBehavior specifies generation behavior of configmaps, secrets and maybe other resources.

const (
	// BehaviorUnspecified is an Unspecified behavior; typically treated as a Create.
	BehaviorUnspecified GenerationBehavior = iota
	// BehaviorCreate makes a new resource.
	BehaviorCreate
	// BehaviorReplace replaces a resource.
	BehaviorReplace
	// BehaviorMerge attempts to merge a new resource with an existing resource.
	BehaviorMerge
)

func NewGenerationBehavior

func NewGenerationBehavior(s string) GenerationBehavior

NewGenerationBehavior converts a string to a GenerationBehavior.

func (GenerationBehavior) String

func (b GenerationBehavior) String() string

String converts a GenerationBehavior to a string.

type Kunstructured

type Kunstructured interface {
	Map() map[string]interface{}
	SetMap(map[string]interface{})
	Copy() Kunstructured
	GetFieldValue(string) (string, error)
	MarshalJSON() ([]byte, error)
	UnmarshalJSON([]byte) error
	GetGvk() gvk.Gvk
	GetKind() string
	GetName() string
	SetName(string)
	GetLabels() map[string]string
	SetLabels(map[string]string)
	GetAnnotations() map[string]string
	SetAnnotations(map[string]string)
}

Kunstructured allows manipulation of k8s objects that do not have Golang structs.

type KunstructuredFactory

type KunstructuredFactory interface {
	SliceFromBytes([]byte) ([]Kunstructured, error)
	FromMap(m map[string]interface{}) Kunstructured
	MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (Kunstructured, error)
	MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (Kunstructured, error)
	Set(fs fs.FileSystem, ldr Loader)
}

KunstructuredFactory makes instances of Kunstructured.

type Loader

type Loader interface {
	// Root returns the root location for this Loader.
	Root() string
	// New returns Loader located at newRoot.
	New(newRoot string) (Loader, error)
	// Load returns the bytes read from the location or an error.
	Load(location string) ([]byte, error)
	// Cleanup cleans the loader
	Cleanup() error
}

Loader interface exposes methods to read bytes.

type Validator

type Validator interface {
	MakeAnnotationValidator() func(map[string]string) error
	MakeLabelValidator() func(map[string]string) error
	ValidateNamespace(string) []string
}

Validator provides functions to validate annotations and labels

Source Files

generationbehavior.go ifc.go

Directories

PathSynopsis
pkg/ifc/transformerPackage patch holds miscellaneous interfaces used by kustomize.
Version
v1.0.11 (latest)
Published
Nov 29, 2018
Platform
js/wasm
Imports
3 packages
Last checked
4 hours ago

Tools for package owners.