operator: Delete HelmChart custom resource when HelmRelease is suspended#539
Merged
RafalKorepta merged 1 commit intorelease/v2.3.xfrom Mar 20, 2025
Merged
Conversation
chrisseto
reviewed
Mar 18, 2025
Contributor
chrisseto
left a comment
There was a problem hiding this comment.
Nice catch! Let's add a regression test?
27cd51c to
97cf331
Compare
chrisseto
reviewed
Mar 19, 2025
97cf331 to
e50d5c2
Compare
aa540c2 to
e50d5c2
Compare
chrisseto
reviewed
Mar 20, 2025
operator/internal/controller/redpanda/redpanda_controller_test.go
Outdated
Show resolved
Hide resolved
e50d5c2 to
9c33bd9
Compare
When Redpanda resource is migrated from using flux to defluxed mode the HelmRelease custom resource is put into suspend mode. That suspend mode can affect deletion process as HelmChart (a child resource that doesn't have ownerReference) is not fully reconciled by helmrelease_controller. Redpanda operator now try to delete HelmChart. As unrelated problems with RBAC permission in integration test suite arised RBAC in Redpanda resource is disabled. Reference https://github.com/fluxcd/helm-controller/blob/2d335f2aa0e2e0df2a631ebf19394aed07c556f3/internal/reconcile/helmchart_template.go#L163-L166 https://github.com/fluxcd/helm-controller/blob/2d335f2aa0e2e0df2a631ebf19394aed07c556f3/internal/controller/helmrelease_controller.go#L375-L388
9c33bd9 to
3f0f156
Compare
chrisseto
approved these changes
Mar 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Redpanda resource is migrated from using flux to defluxed mode the HelmRelease custom resource is put into suspend mode. That suspend mode can affect deletion process as HelmChart (a child resource that doesn't have ownerReference) is not fully reconciled by helmrelease_controller. Redpanda operator now try to delete HelmChart.
As unrelated problems with RBAC permission in integration test suite arised
RBAC in Redpanda resource is disabled.
Reference
https://github.com/fluxcd/helm-controller/blob/2d335f2aa0e2e0df2a631ebf19394aed07c556f3/internal/reconcile/helmchart_template.go#L163-L166 https://github.com/fluxcd/helm-controller/blob/2d335f2aa0e2e0df2a631ebf19394aed07c556f3/internal/controller/helmrelease_controller.go#L375-L388