Open oxr463 opened 3 years ago
Can you show the finalizers which are set for this namespace?
kubectl get namespace cattle-global-data -o yaml
apiVersion: v1
kind: Namespace
metadata:
annotations:
cattle.io/status: '{"Conditions":[{"Type":"ResourceQuotaInit","Status":"True","Message":"","LastUpdateTime":"2021-09-17T20:43:31Z"},{"Type":"InitialRolesPopulated","Status":"True","Message":"","LastUpdateTime":"2021-09-17T20:43:32Z"}]}'
lifecycle.cattle.io/create.namespace-auth: "true"
creationTimestamp: "2021-09-17T20:43:25Z"
deletionTimestamp: "2021-09-20T18:36:45Z"
finalizers:
- controller.cattle.io/namespace-auth
labels:
cattle.io/creator: norman
name: cattle-global-data
resourceVersion: "25719370"
selfLink: /api/v1/namespaces/cattle-global-data
uid: 0443db08-abe0-4406-9036-e8bfd6741f28
spec: {}
status:
phase: Terminating
I removed the finalizer manually and the namespace disappeared, but I figured this tool would've done that for me.
The tool does that, but only when the finalizer is the kubernetes
finalizer. You can swap out the name of the finalizer in the script.
It would be cool to have this script handle "null", and also to have the ability to put in the correct finalizer to remove.
Then again, I didn't need to use this script for quite a while. I guess the underlying issue was resolved. So, I am not sure what to do here.