Skip to content

helm: clean up helm hook resources #6489

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gebinic
Copy link

@gebinic gebinic commented Jul 9, 2025

What type of PR is this?

  • helm: clean up helm hook resources

What this PR does / why we need it:

When helm uninstall is executed, some resources of the envoy gateway remain in the k8s cluster. Some resources contain Helm hooks and are no longer managed by Helm, so they must be cleaned up manually.

Release Notes: No

@gebinic gebinic requested a review from a team as a code owner July 9, 2025 11:12
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.75%. Comparing base (c05d438) to head (714116c).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6489      +/-   ##
==========================================
+ Coverage   70.74%   70.75%   +0.01%     
==========================================
  Files         220      220              
  Lines       37594    37594              
==========================================
+ Hits        26597    26601       +4     
+ Misses       9432     9428       -4     
  Partials     1565     1565              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zirain
Copy link
Member

zirain commented Jul 11, 2025

I didn't quite understand when will this happen?
I deploy the chart very often, I didn't notice that resources remained except CRDs.

@gebinic
Copy link
Author

gebinic commented Jul 11, 2025

This happens because helm uninstall does not delete resources created by hooks. All resources from the certgen-rbac.yaml are created by a Helm hook and won't be deleted when helm uninstall is executed.

https://helm.sh/docs/topics/charts_hooks/#hook-resources-are-not-managed-with-corresponding-releases

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.

2 participants