ifc

package
Version: v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ifc holds miscellaneous interfaces used by kustomize.

Index

Constants

View Source
const SecretTypeOpaque = "Opaque"

See core.v1.SecretTypeOpaque

Variables

This section is empty.

Functions

This section is empty.

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

Directories

Path Synopsis
Package patch holds miscellaneous interfaces used by kustomize.
Package patch holds miscellaneous interfaces used by kustomize.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL