Skip to content

[BUG] Delete problems with Flux HelmRelease objects which are managed through component-operator-runtime #267

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

Closed
cbarbian-sap opened this issue Apr 6, 2025 · 2 comments · Fixed by #268

Comments

@cbarbian-sap
Copy link
Contributor

Describe the bug
Flux HelmRelease objects which are dependents of components (that is, instances of components.core.cs.sap.com) are sometimes inconsistently deleted; that means, the HelmRelease disappears after deletion, but the dependent objects of the HelmRelease remain in the cluster.

Tested with Version
component-operator: v0.1.26
component-operator-runtime: v0.3.84

To Reproduce
Create a Component containing a HelmRelease and delete the component; sometimes, the dependent objects of the HelmRelease survive (but Component and HelmRelease are gone).

Expected behavior
The HelmRelease should be properly deleted including all its dependent objects.

@cbarbian-sap
Copy link
Contributor Author

This seems to be similar to #265.

Checking deeper, it turns out that (if the effective update policy is SsaOverride), then we reclaim fields owned by field managers whose name starts with kubectl or helm (see here). Now, unfortunately, the flux helm-controller uses helm-controller as field owner name (which matches that list of prefixes for reclaimed fields). Thus we are going to claim ownership of the finalizer added by flux, and (since our intended manifest does not contain any finalizers, obviously) we will remove the finalizer; of course, flux will add it back timely. But if the deletion happens right inbetween, the HelmRelease has no finalizer, and will therefore be dropped immediately, without giving flux a chance to reconcile the deletion (means, to delete the dependents).

Probably, helm should be removed from the list of specially treated field managers.

@cbarbian-sap
Copy link
Contributor Author

In general, the list of reclaimed field managers should be made configurable (on reconciler, and on component level); created #269 for this.

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 a pull request may close this issue.

1 participant