Skip to content

Add docs about how to avoid hanging finalizers during shut down #563

Open
@kaganjd

Description

@kaganjd

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:

  1. running the ngrok-operator in its own namespace
  2. shut down ngrok-operator namespace first, then application namespace
  3. 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:

  1. first, set your namespace: namespace=set-your-namespace
  2. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions