-
Notifications
You must be signed in to change notification settings - Fork 33
Add kustomize rule for commonAnnotations on CRD #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kustomize rule for commonAnnotations on CRD #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't work as expected. Annotation was still missing after I ran make manifests
I think I was short on explanation on this PR , going to edit the description |
Currently `mkae manifests` resets the CRD file removing a needed annotation - api-approved.kubernetes.io: "unapproved, experimental-only" this patch overrides this autogeneration by adding a kustomize rule commonAnnotations into config/crd/kustomization.yaml file, allowing kustomize to patch the crd when `kustomize build config/default` is called, injecting the annotation. Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
806ec9b
to
369c782
Compare
@@ -5,7 +5,6 @@ kind: CustomResourceDefinition | |||
metadata: | |||
annotations: | |||
controller-gen.kubebuilder.io/version: v0.4.1 | |||
api-approved.kubernetes.io: "unapproved, experimental-only" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this desired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, is not needed any more, we can now host the default yaml we get from make manifest
and count on kustomize
to apply annotation when make deploy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ArangoGutierrez, marquiz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Currently
make manifests
resets the CRD file removing a neededannotation
this patch overrides this autogeneration by adding a kustomize rule commonAnnotations into
config/crd/kustomization.yaml file, allowing kustomize to patch the crd
when
kustomize build config/default
is called, injecting theannotation.
Signed-off-by: Carlos Eduardo Arango Gutierrez [email protected]