Open
Description
Description
If you are running the operator in the same namespace as your application, and you delete the entire namespace, you may end up with hanging finalizers like this:
NamespaceContentRemaining True Tue, 07 Jan 2025 14:55:19 -0800 SomeResourcesRemain Some resources are remaining: domains.ingress.k8s.ngrok.com has 1 resource instances, httpsedges.ingress.k8s.ngrok.com has 1 resource instances, ingresses.networking.k8s.io has 1 resource instances, tunnels.ingress.k8s.ngrok.com has 1 resource instances
NamespaceFinalizersRemaining True Tue, 07 Jan 2025 14:55:19 -0800 SomeFinalizersRemain Some content in the namespace has finalizers remaining: k8s.ngrok.com/finalizer in 4 resource instances
We should add docs suggesting:
- running the ngrok-operator in its own namespace
- shut down ngrok-operator namespace first, then application namespace
- if this isn't possible, run a script to delete all the finalizers on ngrok custom resources. @Alice-Lilith had the idea to make this a Helm
pre-delete
hook
script:
- first, set your namespace: namespace=set-your-namespace
- then run:
declare -a crds=("domains" "ingresses" "tunnels" "httpsedges")
for i in "${crds[@]}"; do for j in $(kubectl get $i -n $namespace -o name | cut -d '/' -f 2-); do kubectl patch $i $j -n $namespace -p '{"metadata":{"finalizers":[]}}' --type=merge; done; done
Use Case
No response
Related issues
No response