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

Add Redpanda CRD flag that switch of Flux reconciliation #233

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

RafalKorepta
Copy link
Contributor

New Deflux boolean flag can turn off Flux reconciliation of HelmRelease and HelmRepository via suspend flag in both resources. Regardless of the Flux controllers execution (inside or outside Redpanda operator) Redpanda deployment can be unchanged which gives users not only ability to interveen if something break, but it can act as switch to new execution model without flux controllers.

The Redpanda reconciller can leave behind Flux custom resources (HelmRelease, HelmChart and HelmRepository) and take ownership of all resources generated by the helm chart. When suspend flag is enabled on mentioned resources user could potenetially delete HelmRelease (using kubectl), but all resources would be unchanged. Current Redpanda operator implementation would quickly re-create HelmRelease CR, but that would still not affect any K8S primitive resource. The analogy could be kubectl delete --cascade=orphan ... where main resource is deleted, but the child resources are left unchanged.

@RafalKorepta RafalKorepta mentioned this pull request Sep 16, 2024
@RafalKorepta RafalKorepta force-pushed the rk/K8S-307/introduce-defulx-option branch 2 times, most recently from e4593ad to 34cbd77 Compare September 17, 2024 14:00
Copy link
Contributor

@andrewstucki andrewstucki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple more questions and a slight fix for the json tags

src/go/k8s/api/redpanda/v1alpha2/redpanda_types.go Outdated Show resolved Hide resolved
@RafalKorepta RafalKorepta force-pushed the rk/K8S-307/introduce-defulx-option branch 4 times, most recently from e2c671e to 6cfc25c Compare September 18, 2024 06:51
@RafalKorepta RafalKorepta force-pushed the rk/K8S-307/introduce-defulx-option branch 2 times, most recently from 8aa7d4c to 38a89e6 Compare September 18, 2024 23:06
@RafalKorepta RafalKorepta force-pushed the rk/K8S-307/introduce-defulx-option branch 3 times, most recently from d2e8941 to 180d060 Compare September 24, 2024 14:20
New `Usefulx` boolean flag can turn off Flux reconciliation of HelmRelease and
HelmRepository via `suspend` flag in both resources. Regardless of the Flux
controllers execution (inside or outside Redpanda operator) Redpanda deployment
can be unchanged which gives users not only ability to interveen if something
break, but it can act as switch to new execution model without flux controllers.

Before setting UseFlux flag to `false` users need to alight ChartVersion to at
least `5.9.3` version of the Redpanda chart.

The Redpanda reconciller can leave behind Flux custom resources (HelmRelease,
HelmChart and HelmRepository) and take ownership of all resources generated by
the helm chart. When suspend flag is enabled on mentioned resources user could
potenetially delete HelmRelease (using kubectl), but all resources would be
unchanged. Current Redpanda operator implementation would quickly re-create
HelmRelease CR, but that would still not affect any K8S primitive resource. The
analogy could be `kubectl delete --cascade=orphan ...` where main resource is
deleted, but the child resources are left unchanged.

Reference:
https://fluxcd.io/flux/components/helm/helmreleases/#suspend
https://fluxcd.io/flux/components/source/helmrepositories/#suspend
As the shell wrapper script was removed in 7a4b48a
the `task` invocation is direct now.
@RafalKorepta RafalKorepta force-pushed the rk/K8S-307/introduce-defulx-option branch from 180d060 to aab02a4 Compare September 24, 2024 14:28
Copy link
Contributor

@andrewstucki andrewstucki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RafalKorepta RafalKorepta merged commit de6d48e into main Sep 24, 2024
5 checks passed
@chrisseto chrisseto deleted the rk/K8S-307/introduce-defulx-option branch September 24, 2024 17:09
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.

3 participants