-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I suspect this is something to do with CRDs being deleting and recreated during upgrade but I'm not 100% sure.
Workaround
Remove the finalizer. The resource will first be deleted, then flux will recreate the GitopsCluster from git. No actual clusters will be deleted.
Steps
- From the management cluster kube context on your CLI you should be able to see the cluster that is stuck in this state:
kubectl get gitopsclusters
- Then either patch the objects directly to remove the finalizer:
kubectl patch gitopscluster/my-cluster --patch '{"metadata": {"finalizers": null}}'
Or kubectl edit
and remove the finalizer in the editor that is opened:
kubectl edit gitopscluster my-cluster
The GitopsClusters should be removed, to be recreated by flux on the next reconciliation cycle. This will not delete any actual clusters, just our representation of them in the system.
Is the CRD being deleted?
The CRD is in the templates folder https://github.com/weaveworks/weave-gitops-enterprise/blob/main/charts/cluster-controller/templates/gitopscluster-crd.yaml .
It should probably be in the ./crd folder. I don't know exactly what k8s/helm is doing in this case.