diff --git a/plugins/get_suspended.yml b/plugins/get_suspended.yml new file mode 100644 index 00000000..a5270a27 --- /dev/null +++ b/plugins/get_suspended.yml @@ -0,0 +1,23 @@ +# credits: https://github.com/fluxcd/flux2/discussions/2494 + get-suspended-helmreleases: + shortCut: Shift-S + confirm: false + description: Suspended Helm Releases + scopes: + - helmrelease + command: sh + background: false + args: + - -c + - "kubectl get --all-namespaces helmreleases.helm.toolkit.fluxcd.io -o json | jq -r '.items[] | select(.spec.suspend==true) | [.metadata.namespace,.metadata.name,.spec.suspend] | @tsv' | less" + get-suspended-kustomizations: + shortCut: Shift-S + confirm: false + description: Suspended Kustomizations + scopes: + - kustomizations + command: sh + background: false + args: + - -c + - "kubectl get --all-namespaces kustomizations.kustomize.toolkit.fluxcd.io -o json | jq -r '.items[] | select(.spec.suspend==true) | [.metadata.name,.spec.suspend] | @tsv' | less" diff --git a/plugins/rm-ns.yml b/plugins/rm-ns.yml new file mode 100644 index 00000000..14a2a251 --- /dev/null +++ b/plugins/rm-ns.yml @@ -0,0 +1,13 @@ +plugin: + # remove finalizers from a stuck namespace + rm-ns: + shortCut: n + confirm: true + description: Remove NS Finalizers + scopes: + - namespace + command: sh + background: false + args: + - -c + - "kubectl get namespace $NAME -o json | jq '.spec.finalizers=[]' | kubectl replace --raw /api/v1/namespaces/$NAME/finalize -f - > /dev/null"