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

@@ -38,10 +38,7 @@ func (f *Factory) MakeConfigMap(
return nil, errors.Wrap(err, "trouble mapping")
}
}
if f.options != nil {
cm.SetLabels(f.options.Labels)
cm.SetAnnotations(f.options.Annotations)
}
f.setLabelsAndAnnnotations(cm, args.GeneratorOptions)
return cm, nil
}