Documentation ¶
Overview ¶
Package resmap implements a map from ResId to Resource that tracks all resources in a kustomization.
Index ¶
- func NewResourceSliceFromPatches(loader loader.Loader, paths []string) ([]*resource.Resource, error)
- type IdSlice
- type ResMap
- func MergeWithOverride(maps ...ResMap) (ResMap, error)
- func MergeWithoutOverride(maps ...ResMap) (ResMap, error)
- func NewResMapFromConfigMapArgs(loader loader.Loader, cmList []types.ConfigMapArgs) (ResMap, error)
- func NewResMapFromFiles(loader loader.Loader, paths []string) (ResMap, error)
- func NewResMapFromSecretArgs(p string, secretList []types.SecretArgs) (ResMap, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResMap ¶
ResMap is a map from ResId to Resource.
func MergeWithOverride ¶
MergeWithOverride combines multiple ResMap instances, allowing and sometimes demanding certain collisions. When looping over the instances to combine them, if a resource id for resource X is found to be already in the combined map, then the behavior field for X must be BehaviorMerge or BehaviorReplace. If X is not in the map, then it's behavior cannot be merge or replace.
func MergeWithoutOverride ¶
MergeWithoutOverride combines multiple ResMap instances, failing on key collision.
func NewResMapFromConfigMapArgs ¶
NewResMapFromConfigMapArgs returns a Resource slice given a configmap metadata slice from kustomization file.
func NewResMapFromFiles ¶
NewResMapFromFiles returns a ResMap given a resource path slice.
func NewResMapFromSecretArgs ¶
func NewResMapFromSecretArgs(p string, secretList []types.SecretArgs) (ResMap, error)
NewResMapFromSecretArgs takes a SecretArgs slice and executes its command in directory p then writes the output to a Resource slice and return it.
func (ResMap) EncodeAsYaml ¶
EncodeAsYaml encodes a ResMap to YAML; encoded objects separated by `---`.
func (ResMap) ErrorIfNotEqual ¶
ErrorIfNotEqual returns error if maps are not equal.