Enable specifying GeneratorOptions per resource

In addition to specifying GeneratorOptions globally within a
kustomization, also allow users to set GeneratorOptions on a
per-resource level.
This commit is contained in:
Chance Zibolski
2020-02-05 10:15:55 -08:00
parent 5707962df5
commit 62f21cbe69
6 changed files with 137 additions and 14 deletions

View File

@@ -39,10 +39,7 @@ func (f *Factory) MakeSecret(
return nil, err
}
}
if f.options != nil {
s.SetLabels(f.options.Labels)
s.SetAnnotations(f.options.Annotations)
}
f.setLabelsAndAnnnotations(s, args.GeneratorOptions)
return s, nil
}