resource

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: Apache-2.0 Imports: 23 Imported by: 561

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Data     *unstructured.Unstructured
	Behavior string
}

Resource represents a Kubernetes Resource Object for ex. Deployment, Server ConfigMap etc.

func NewFromPatches

func NewFromPatches(loader loader.Loader, paths []string) ([]*Resource, error)

NewFromPatches returns a slice of Resources given a patch path slice from kustomization file.

func (*Resource) GVKN

GVKN returns Group/Version/Kind/Name for the resource.

type ResourceCollection

type ResourceCollection map[types.GroupVersionKindName]*Resource

ResourceCollection is a map from GroupVersionKindName to Resource

func Merge

Merge will merge all of the entries in the slice of ResourceCollection.

func MergeWithOverride

func MergeWithOverride(rcs ...ResourceCollection) (ResourceCollection, error)

MergeWithOverride will merge all of the entries in the slice of ResourceCollection with Override If there is already an entry with the same GVKN exists, different actions are performed according to value of Behavior field 'create': create a new one; 'replace': replace the data only; keep the labels and annotations 'merge': merge the data; keep the labels and annotations

func NewFromConfigMaps

func NewFromConfigMaps(loader loader.Loader, cmList []types.ConfigMapArgs) (ResourceCollection, error)

NewFromConfigMaps returns a Resource slice given a configmap metadata slice from kustomization file.

func NewFromResources

func NewFromResources(loader loader.Loader, paths []string) (ResourceCollection, error)

NewFromResources returns a ResourceCollection given a resource path slice from kustomization file.

func NewFromSecretGenerators

func NewFromSecretGenerators(p string, secretList []types.SecretArgs) (ResourceCollection, error)

NewFromSecretGenerators takes a SecretGenerator slice and executes its command in directory p then writes the output to a Resource slice and return it.

Jump to

Keyboard shortcuts

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