flux2
flux2 copied to clipboard
Delete resources in wrong order
Describe the bug
I don't know if it is a bug.
- I generate resource yaml files and push them to git, like cluster-A/ helmrelease, kubeconfig secret, values configmap, namespace eg...
- flux reconciled them, everything is fine
- I delete the cluster, so I remove the whole cluster-A directory on git
- I got this {"level":"error","ts":"2023-10-18T09:48:17.423Z","msg":"Reconciler error","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"cluster-A","namespace":"cluster-a"},"namespace":"cluster-a","name":"cluster-a","reconcileID":"ce966e9d-0726-40dd-ab91-5c53c9c23a14","error":"could not find KubeConfig secret 'cluster-a/kubeconfig': secrets "kubeconfig" not found"}
Steps to reproduce
easy to reproduce
Expected behavior
I delete all the resources of cluster-A, but flux doesn't care about the order to delete them.
I wish when reconciling the resources, especially when deleting them, flux can do it in right order, or I need to delete it myself, and then update the deletion on git, kind of weird.
Screenshots and recordings
No response
OS / Distro
Linux
Flux version
0.36.1
Flux check
► checking prerequisites ✗ flux 0.41.2 <2.1.2 (new version is available, please upgrade) ✔ Kubernetes 1.20.6-tke.28 >=1.20.6-0 ► checking controllers ✔ helm-controller: deployment ready ► ghcr.io/fluxcd/helm-controller:v0.31.2 ✔ kustomize-controller: deployment ready ► ghcr.io/fluxcd/kustomize-controller:v0.35.1 ✔ notification-controller: deployment ready ► ghcr.io/fluxcd/notification-controller:v0.33.0 ✔ source-controller: deployment ready ► ghcr.io/fluxcd/source-controller:v0.36.1 ► checking crds ✔ alerts.notification.toolkit.fluxcd.io/v1beta2 ✔ buckets.source.toolkit.fluxcd.io/v1beta2 ✔ gitrepositories.source.toolkit.fluxcd.io/v1beta2 ✔ helmcharts.source.toolkit.fluxcd.io/v1beta2 ✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1 ✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2 ✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2 ✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2 ✔ providers.notification.toolkit.fluxcd.io/v1beta2 ✔ receivers.notification.toolkit.fluxcd.io/v1beta2 ✔ all checks passed
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct