Skip to content
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

fix: (helm) - do not add owner references to resources that contain the Helm keep resource-policy annotation #71

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

joelanford
Copy link
Member

This PR build's on #70 (I will rebase when that merges).

Credit to @mikeshng for this (see operator-framework/operator-sdk#4389)

Description of the change:
Helm operator: updated the ownerRefInjectingClient to not inject the owner references if it contains the annotation:

  annotations:
    "helm.sh/resource-policy": keep

see https://helm.sh/docs/howto/charts_tips_and_tricks/ for more details about the keep annotation.

Motivation for the change:
For the Helm operator delete CR, namespace scope resources with the Helm keep annotation are being GC'ed by Kubernetes.
This change is to make sure those resources are not owned by the CR so they won't get GC'ed.

Closes: operator-framework/operator-sdk#4378

After this change, I can no longer reproduces the issue described in operator-framework/operator-sdk#4378

@joelanford joelanford force-pushed the feat/skip-ownerref-injection-on-keep branch 5 times, most recently from 458905d to 7daf1ff Compare January 15, 2021 14:28
@joelanford joelanford force-pushed the feat/skip-ownerref-injection-on-keep branch from 7daf1ff to 71cf6e6 Compare January 15, 2021 14:44
@joelanford joelanford merged commit d6f0f67 into master Jan 15, 2021
@joelanford joelanford deleted the feat/skip-ownerref-injection-on-keep branch January 15, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm operator: namespace scope resources with Helm keep annotations are being deleted by garbage collection
1 participant