forked from derailed/k9s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove-finalizers.yaml
33 lines (33 loc) · 1.21 KB
/
remove-finalizers.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Removes all finalizers from the selected resource. Finalizers are namespaced keys that tell Kubernetes to wait
# until specific conditions are met before it fully deletes resources marked for deletion.
# Before deleting an object you need to ensure that all finalizers has been removed. Usually this would be done
# by the specific controller but under some circumstances it is possible to encounter a set of objects blocked
# for deletion.
# This plugins makes this task easier by providing a shortcut to directly removing them all.
# Be careful when using this plugin as it may leave dangling resources or instantly deleting resources that were
# blocked by the finalizers.
# Author: github.com/jalvarezit
plugins:
remove_finalizers:
shortCut: Ctrl-F
confirm: true
dangerous: true
scopes:
- all
description: |
Removes all finalizers from selected resource. Be careful when using it,
it may leave dangling resources or delete them
command: kubectl
background: true
args:
- patch
- --context
- $CONTEXT
- --namespace
- $NAMESPACE
- $RESOURCE_NAME
- $NAME
- -p
- '{"metadata":{"finalizers":null}}'
- --type
- merge