mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
replace genargs with two separate annotations
This commit is contained in:
@@ -231,10 +231,10 @@ func UpdateResourceOptions(rm resmap.ResMap) (resmap.ResMap, error) {
|
||||
if err := r.SetAnnotations(annotations); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
r.SetOptions(types.NewGenArgs(
|
||||
&types.GeneratorArgs{
|
||||
Behavior: behavior,
|
||||
Options: &types.GeneratorOptions{DisableNameSuffixHash: !needsHash}}))
|
||||
if needsHash {
|
||||
r.EnableHashSuffix()
|
||||
}
|
||||
r.SetBehavior(types.NewGenerationBehavior(behavior))
|
||||
}
|
||||
return rm, nil
|
||||
}
|
||||
|
||||
@@ -16,13 +16,14 @@ const (
|
||||
BuildAnnotationPrefixes = konfig.ConfigAnnoDomain + "/prefixes"
|
||||
BuildAnnotationSuffixes = konfig.ConfigAnnoDomain + "/suffixes"
|
||||
BuildAnnotationsRefBy = konfig.ConfigAnnoDomain + "/refBy"
|
||||
BuildAnnotationsGenOptions = konfig.ConfigAnnoDomain + "/generatorOptions"
|
||||
BuildAnnotationsGenBehavior = konfig.ConfigAnnoDomain + "/generatorBehavior"
|
||||
BuildAnnotationsGenAddHashSuffix = konfig.ConfigAnnoDomain + "/needsHashSuffix"
|
||||
|
||||
// the following are only for patches, to specify whether they can change names
|
||||
// and kinds of their targets
|
||||
BuildAnnotationAllowNameChange = konfig.ConfigAnnoDomain + "/allowNameChange"
|
||||
BuildAnnotationAllowKindChange = konfig.ConfigAnnoDomain + "/allowKindChange"
|
||||
Allowed = "allowed"
|
||||
Enabled = "enabled"
|
||||
)
|
||||
|
||||
// MakeResIds returns all of an RNode's current and previous Ids
|
||||
|
||||
Reference in New Issue
Block a user