Closed kenmoini closed 1 year ago
@kenmoini, this is intentional. The two options are as you did with commonAnnotations
or by using the policyAnnotations
field:
https://github.com/stolostron/policy-generator-plugin/blob/e32fb03ee061fc2ac422fa09ddd0fee9540015ea/docs/policygenerator-reference.yaml#L156-L158
So when creating a PolicyGenerator with a defined
.metadata.annotations
section causes it to fail generation. Not sure if this is intended or not, but figured I'd give it a little drop here in case the common metav1 stuff should be in there.The PolicyGenerator CR:
The
kustomization.yml
file:When running
kustomize build --enable-alpha-plugins
I get the following error:Removing the annotations from the PolicyGenerator CR works, and then I can add them back as desired via
commonAnnotations
in thekustomization.yml
so not crucial (in my case) that PolicyGenerator doesn't take annotations I guess, but may not be intended.Working CRs