Documentation ¶
Index ¶
- type Resource
- type ResourceCollection
- func Merge(rcs ...ResourceCollection) (ResourceCollection, error)
- func MergeWithOverride(rcs ...ResourceCollection) (ResourceCollection, error)
- func NewFromConfigMaps(loader loader.Loader, cmList []types.ConfigMapArgs) (ResourceCollection, error)
- func NewFromResources(loader loader.Loader, paths []string) (ResourceCollection, error)
- func NewFromSecretGenerators(p string, secretList []types.SecretArgs) (ResourceCollection, error)
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 ¶
NewFromPatches returns a slice of Resources given a patch path slice from kustomization file.
func (*Resource) GVKN ¶
func (r *Resource) GVKN() types.GroupVersionKindName
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 ¶
func Merge(rcs ...ResourceCollection) (ResourceCollection, error)
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.