replace genargs with two separate annotations

This commit is contained in:
Natasha Sarkar
2021-07-29 15:46:09 -07:00
parent 3ebdb3fcef
commit 9a27a9f19f
8 changed files with 62 additions and 220 deletions

View File

@@ -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
}