From 88547dcc81ce8cf1c2b0a2baefd0899690c40824 Mon Sep 17 00:00:00 2001 From: fragolinux Date: Mon, 28 Oct 2024 01:20:53 +0100 Subject: [PATCH] fixed conflicting plugin shortcuts, and added 2 new plugins (#2930) * added flux suspended resources retrieval plugin using this plugin, you can press Shift-S in "kustomizations" and "helmreleases" k9s sections to get a list of all suspended resources... a temporary patch till k9s will allow custom columns based on .spec in its views... * Create rm-ns.yml to test: create an "undeletable" namespace, with wrong finalizers: ``` apiVersion: v1 kind: Namespace metadata: name: test spec: finalizers: - foregroundDeletion ``` apply to cluster: `kubectl create -f test.yaml` go in NS view in k9s, then select the test NS and press CTRL-D to delete it... it will stay in terminating state, because of the finalizers... now press "n", and confirm, to remove the finalizers... the NS should now be gone... do NOT run on the "all+" ns, it will crash k9s... * Update log-full.yaml * Update log-loki.yaml * Update log-stern.yaml * Update crossplane.yaml * Update duplik8s.yaml * Update flux.yaml * Update log-full.yaml * Delete plugins/rm-ns.yml * Update and rename get_suspended.yml to get_suspended.yaml * Delete plugins/get_suspended.yaml --- plugins/crossplane.yaml | 2 +- plugins/duplik8s.yaml | 2 +- plugins/flux.yaml | 2 +- plugins/log-full.yaml | 4 ++-- plugins/log-loki.yaml | 2 +- plugins/log-stern.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/crossplane.yaml b/plugins/crossplane.yaml index 14d7915e..8ad69ac0 100644 --- a/plugins/crossplane.yaml +++ b/plugins/crossplane.yaml @@ -1,7 +1,7 @@ plugins: # List all the resources managed by a Composite Resource kube-lineage: - shortCut: Ctrl-X + shortCut: Ctrl-U confirm: false description: "Kube Lineage" scopes: diff --git a/plugins/duplik8s.yaml b/plugins/duplik8s.yaml index ed63d144..3b72f9d6 100644 --- a/plugins/duplik8s.yaml +++ b/plugins/duplik8s.yaml @@ -4,7 +4,7 @@ # See https://github.com/Telemaco019/duplik8s plugins: duplicate-pod: - shortCut: Ctrl-T + shortCut: Ctrl-B description: Duplicate Pod scopes: - po diff --git a/plugins/flux.yaml b/plugins/flux.yaml index 72a96555..96fbaf37 100644 --- a/plugins/flux.yaml +++ b/plugins/flux.yaml @@ -152,7 +152,7 @@ plugins: -n $NAMESPACE $NAME | less -K trace: - shortCut: Shift-A + shortCut: Shift-P confirm: false description: Flux trace scopes: diff --git a/plugins/log-full.yaml b/plugins/log-full.yaml index 452c1dbc..9bad01cd 100644 --- a/plugins/log-full.yaml +++ b/plugins/log-full.yaml @@ -1,7 +1,7 @@ plugins: # See https://k9scli.io/topics/plugins/ raw-logs-follow: - shortCut: Ctrl-L + shortCut: Ctrl-G description: logs -f scopes: - po @@ -18,7 +18,7 @@ plugins: - --kubeconfig - $KUBECONFIG log-less: - shortCut: Shift-L + shortCut: Shift-K description: "logs|less" scopes: - po diff --git a/plugins/log-loki.yaml b/plugins/log-loki.yaml index 23da9d65..c2642d6d 100644 --- a/plugins/log-loki.yaml +++ b/plugins/log-loki.yaml @@ -13,7 +13,7 @@ plugins: - "{ namespace = \"$NAMESPACE\", pod = \"$POD\", container = \"$NAME\" }" - -f loki-container-raw: - shortCut: Ctrl-L + shortCut: Ctrl-E description: "loki raw" scopes: - containers diff --git a/plugins/log-stern.yaml b/plugins/log-stern.yaml index 1e850b38..e3f60cc6 100644 --- a/plugins/log-stern.yaml +++ b/plugins/log-stern.yaml @@ -1,7 +1,7 @@ plugins: # Leverage stern (https://github.com/stern/stern) to output logs. stern: - shortCut: Ctrl-L + shortCut: Ctrl-Y confirm: false description: "Logs " scopes: