-
Notifications
You must be signed in to change notification settings - Fork 85
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 helm.sh/resource-policy: keep to CRDs to prevent deletion #500
Add helm.sh/resource-policy: keep to CRDs to prevent deletion #500
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-operator ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
39471e7
to
a6c4edb
Compare
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.
For chart we have a dedicated section: https://github.com/kubernetes-sigs/cluster-api-operator/tree/main/config/chart
Maybe it's better to put your patch there, since it affects the chart only?
Signed-off-by: Danil Grigorev <danil.grigorev@suse.com>
a6c4edb
to
5a19c98
Compare
I added it there @Fedosin, although in this case an additional annotation makes difference for helm only anyway. Helm does not care what is on resource, it needs this annotation in the chart resources, so it can’t do anything regardless of the placement |
I performed some testing of the helm upgrade, everything works with this change, so the docs are not wrong. Unless the resource is removed, this annotation changes nothing. |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexander-demicev 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 |
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
/hold
To avoid merging, in case @Fedosin has some more questions, otherwise unhold
LGTM label has been added. Git tree hash: 6f5e401c8eba3469de079022fc70627cb7eb575b
|
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
/hold cancel
/cherry-pick release-0.10 |
@Danil-Grigorev: new pull request created: #503 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
When CAPI Operator chart used as a dependency, the removal of the chart hosting the dependency causes CRDs to be removed. This happens because CRDs are generated as a part of
base
and therefore are managed by helm 3. Helm docs definekeep
policy as:Setting this annotation should not prevent CRD upgrades, when resource is changed only.
Typically this removal happens after the main deployment is removed, and before any or all of the
*Provider
resources are removed. Provider resources has a finalizer, nothing can remove at this point, so the deletion hangs and later fails. Happens because CRD removal requires all resources it defines to be cleaned up before being removed itself.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #