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(f *configmapandsecret.ConfigMapFactory, cmArgsList []types.ConfigMapArgs) (ResMap, error)
- func NewResMapFromFiles(loader loader.Loader, paths []string) (ResMap, error)
- func NewResMapFromSecretArgs(f *configmapandsecret.SecretFactory, 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 ¶
func NewResMapFromConfigMapArgs( f *configmapandsecret.ConfigMapFactory, cmArgsList []types.ConfigMapArgs) (ResMap, error)
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( f *configmapandsecret.SecretFactory, secretList []types.SecretArgs) (ResMap, error)
NewResMapFromSecretArgs takes a SecretArgs slice, generates secrets from each entry, and accumulates them in a ResMap.
func (ResMap) DemandOneMatchForId ¶ added in v1.0.6
DemandOneMatchForId find the matched resource by Group/Version/Kind and Name
func (ResMap) EncodeAsYaml ¶
EncodeAsYaml encodes a ResMap to YAML; encoded objects separated by `---`.
func (ResMap) ErrorIfNotEqual ¶
ErrorIfNotEqual returns error if maps are not equal.