You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deletion of one of the kustomize manifests leads to termination on the flux-system namesapce which flux does not manage.
We're deploying flux2 using the helm chart. flux2 and CRD resources are deployed into flux-system namespace. The flux-system namespace termination triggers a chain of events resulting in a broken state cluster.
Chain of events:
apps kustomize.toolkit.fluxcd.io/v1 is deleted.
flux-system namespace termination applied by flux kustomize controller.
flux2 helm release uninstall applied due to namespace termination => No active flux2 controller running
Left over flux2 CRD resources with metadata.finalizers[finalizers.fluxcd.io] are blocking namespace termination.
Reinstall of the flux2 helm chart is not possible since the namesapce is in terminating state.
This results in a cluster that is not operational which requires external intervantion (i.e.flux uninstall followed by flux2 install and CRD redeployment) to allow recovery & reconciliation loops to resume operation.
I belive the root cause is workspace kustomize targetNamespace directove overriding name in the Namespace spec. This can be clearly seen from:
❯ flux tree ks workspace
Kustomization/flux-system/workspace
└── Kustomization/flux-system/apps
└── Namespace/flux-system
Kustomization/flux-system/apps should not be owning Namespace/flux-system
Now inspect flux-system namespace to see it's in terminating state.
❯ kubectl get ns flux-system
NAME STATUS AGE
flux-system Terminating 10m
Expected behavior
flux-system would not be affected, and apps Kustomisation will be re-provisioned by the workspace Kustomisation.
Screenshots and recordings
No response
OS / Distro
GKE 1.27.5-gke.200
Flux version
v2.2.2
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
maximveksler
changed the title
Kustomize targetNamespace overrides Namespace metadata.name field
Kustomize targetNamespace overrides Namespace metadata.name field
Jan 27, 2024
Describe the bug
Deletion of one of the kustomize manifests leads to termination on the
flux-system
namesapce which flux does not manage.We're deploying flux2 using the helm chart. flux2 and CRD resources are deployed into
flux-system
namespace. Theflux-system
namespace termination triggers a chain of events resulting in a broken state cluster.Chain of events:
kustomize.toolkit.fluxcd.io/v1
is deleted.flux-system
namespace termination applied by flux kustomize controller.flux2
helm release uninstall applied due to namespace termination => No active flux2 controller runningmetadata.finalizers[finalizers.fluxcd.io]
are blocking namespace termination.terminating
state.This results in a cluster that is not operational which requires external intervantion (i.e.
flux uninstall
followed by flux2 install and CRD redeployment) to allow recovery & reconciliation loops to resume operation.I belive the root cause is
workspace
kustomizetargetNamespace
directove overriding name in the Namespace spec. This can be clearly seen from:Kustomization/flux-system/apps
should not be owningNamespace/flux-system
Steps to reproduce
Now inspect
flux-system
namespace to see it's in terminating state.Expected behavior
flux-system
would not be affected, andapps
Kustomisation will be re-provisioned by theworkspace
Kustomisation.Screenshots and recordings
No response
OS / Distro
GKE 1.27.5-gke.200
Flux version
v2.2.2
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: