From 7e15e2d54020c0d687c0f21b5b793bbb41df1ff4 Mon Sep 17 00:00:00 2001 From: derailed Date: Sun, 24 Dec 2023 11:11:08 -0700 Subject: [PATCH] [Bug] Fix #2367 --- plugins/carvel.yaml | 2 +- plugins/crossplane.yaml | 10 ++--- plugins/debug-container.yaml | 2 +- plugins/dive.yaml | 2 +- plugins/flux.yaml | 68 ++++++++++++++++---------------- plugins/get-all.yaml | 2 +- plugins/helm-default-values.yaml | 2 +- plugins/helm-purge.yaml | 2 +- plugins/helm_values.yaml | 2 +- plugins/job_suspend.yaml | 2 +- plugins/k3d_root_shell.yaml | 2 +- plugins/log_full.yaml | 2 +- plugins/log_jq.yaml | 2 +- plugins/log_stern.yaml | 2 +- plugins/rm-ns.yaml | 2 +- plugins/watch_events.yaml | 2 +- snap/snapcraft.yaml | 2 +- 17 files changed, 54 insertions(+), 54 deletions(-) diff --git a/plugins/carvel.yaml b/plugins/carvel.yaml index eea45ca714..d3bfeb7ab0 100644 --- a/plugins/carvel.yaml +++ b/plugins/carvel.yaml @@ -1,5 +1,5 @@ # $HOME/.k9s/plugin.yml -plugin: +plugins: kapp-inspect: shortCut: Shift-Z confirm: false diff --git a/plugins/crossplane.yaml b/plugins/crossplane.yaml index fb7015e123..14d7915e3f 100644 --- a/plugins/crossplane.yaml +++ b/plugins/crossplane.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # List all the resources managed by a Composite Resource kube-lineage: shortCut: Ctrl-X @@ -11,11 +11,11 @@ plugin: args: - -c - >- - kubectl lineage + kubectl lineage -d 6 --exclude-types Event,ProviderConfigUsage.aws.upbound.io,ProviderConfigUsage.kubernetes.crossplane.io --show-group - --context $CONTEXT - $RESOURCE_NAME - $NAME + --context $CONTEXT + $RESOURCE_NAME + $NAME | less -K diff --git a/plugins/debug-container.yaml b/plugins/debug-container.yaml index 2040cefcf3..0d1e387a5f 100644 --- a/plugins/debug-container.yaml +++ b/plugins/debug-container.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: #--- Create debug container for selected pod in current namespace # See https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container debug: diff --git a/plugins/dive.yaml b/plugins/dive.yaml index c92205ac32..090bc2c680 100644 --- a/plugins/dive.yaml +++ b/plugins/dive.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: dive: shortCut: d confirm: false diff --git a/plugins/flux.yaml b/plugins/flux.yaml index ca5c68e665..cbe887d3bb 100644 --- a/plugins/flux.yaml +++ b/plugins/flux.yaml @@ -2,7 +2,7 @@ # move selected line to chosen resource in K9s, then: # Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume # Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization -plugin: +plugins: toggle-helmrelease: shortCut: Shift-T confirm: true @@ -19,7 +19,7 @@ plugin: flux $verb helmrelease --context $CONTEXT - -n $NAMESPACE $NAME + -n $NAMESPACE $NAME | less -K toggle-kustomization: shortCut: Shift-T @@ -34,10 +34,10 @@ plugin: - >- suspended=$(kubectl --context $CONTEXT get kustomizations -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1); verb=$([ $suspended = "true" ] && echo "resume" || echo "suspend"); - flux - $verb kustomization - --context $CONTEXT - -n $NAMESPACE $NAME + flux + $verb kustomization + --context $CONTEXT + -n $NAMESPACE $NAME | less -K reconcile-git: shortCut: Shift-R @@ -53,7 +53,7 @@ plugin: flux reconcile source git --context $CONTEXT - -n $NAMESPACE $NAME + -n $NAMESPACE $NAME | less -K reconcile-hr: shortCut: Shift-R @@ -66,10 +66,10 @@ plugin: args: - -c - >- - flux - reconcile helmrelease - --context $CONTEXT - -n $NAMESPACE $NAME + flux + reconcile helmrelease + --context $CONTEXT + -n $NAMESPACE $NAME | less -K reconcile-helm-repo: shortCut: Shift-Z @@ -82,10 +82,10 @@ plugin: args: - -c - >- - flux - reconcile source helm - --context $CONTEXT - -n $NAMESPACE $NAME + flux + reconcile source helm + --context $CONTEXT + -n $NAMESPACE $NAME | less -K reconcile-oci-repo: shortCut: Shift-Z @@ -98,10 +98,10 @@ plugin: args: - -c - >- - flux - reconcile source oci - --context $CONTEXT - -n $NAMESPACE $NAME + flux + reconcile source oci + --context $CONTEXT + -n $NAMESPACE $NAME | less -K reconcile-ks: shortCut: Shift-R @@ -133,7 +133,7 @@ plugin: flux reconcile image repository --context $CONTEXT - -n $NAMESPACE $NAME + -n $NAMESPACE $NAME | less -K reconcile-iua: shortCut: Shift-R @@ -146,10 +146,10 @@ plugin: args: - -c - >- - flux - reconcile image update + flux + reconcile image update --context $CONTEXT - -n $NAMESPACE $NAME + -n $NAMESPACE $NAME | less -K trace: shortCut: Shift-A @@ -163,12 +163,12 @@ plugin: - -c - >- resource=$(echo $RESOURCE_NAME | sed -E 's/ies$/y/' | sed -E 's/ses$/se/' | sed -E 's/(s|es)$//g') - flux - trace - --context $CONTEXT - --kind $resource - --api-version $RESOURCE_GROUP/$RESOURCE_VERSION - --namespace $NAMESPACE $NAME + flux + trace + --context $CONTEXT + --kind $resource + --api-version $RESOURCE_GROUP/$RESOURCE_VERSION + --namespace $NAMESPACE $NAME | less -K # credits: https://github.com/fluxcd/flux2/discussions/2494 get-suspended-helmreleases: @@ -182,10 +182,10 @@ plugin: 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' + 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 @@ -198,7 +198,7 @@ plugin: args: - -c - >- - kubectl get + kubectl get --all-namespaces kustomizations.kustomize.toolkit.fluxcd.io -o json | jq -r '.items[] | select(.spec.suspend==true) | [.metadata.name,.spec.suspend] | @tsv' diff --git a/plugins/get-all.yaml b/plugins/get-all.yaml index d872dd0de2..58f65d71c3 100644 --- a/plugins/get-all.yaml +++ b/plugins/get-all.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: #get all resources in a namespace using the krew get-all plugin get-all-namespace: shortCut: g diff --git a/plugins/helm-default-values.yaml b/plugins/helm-default-values.yaml index ce587347b7..253d03d689 100644 --- a/plugins/helm-default-values.yaml +++ b/plugins/helm-default-values.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: helm-default-values: shortCut: Shift-V confirm: false diff --git a/plugins/helm-purge.yaml b/plugins/helm-purge.yaml index eb106c07ef..300053a7fa 100644 --- a/plugins/helm-purge.yaml +++ b/plugins/helm-purge.yaml @@ -1,5 +1,5 @@ # $HOME/.k9s/plugin.yml -plugin: +plugins: # Issues a helm delete --purge for the resource associated with the selected pod helm-purge: shortCut: Ctrl-P diff --git a/plugins/helm_values.yaml b/plugins/helm_values.yaml index 8efc0d0fba..97e70cf850 100644 --- a/plugins/helm_values.yaml +++ b/plugins/helm_values.yaml @@ -1,6 +1,6 @@ # View user-supplied values when the helm chart was created -plugin: +plugins: helm-values: shortCut: v confirm: false diff --git a/plugins/job_suspend.yaml b/plugins/job_suspend.yaml index d674dd2d2c..abee83bc52 100644 --- a/plugins/job_suspend.yaml +++ b/plugins/job_suspend.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # Suspends/Resumes a cronjob toggleCronjob: shortCut: Ctrl-S diff --git a/plugins/k3d_root_shell.yaml b/plugins/k3d_root_shell.yaml index 295c680833..79707b4b5a 100644 --- a/plugins/k3d_root_shell.yaml +++ b/plugins/k3d_root_shell.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # Opens a shell to k3d container as root k3d-root-shell: shortCut: Shift-S diff --git a/plugins/log_full.yaml b/plugins/log_full.yaml index 304a86d384..452c1dbc91 100644 --- a/plugins/log_full.yaml +++ b/plugins/log_full.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # See https://k9scli.io/topics/plugins/ raw-logs-follow: shortCut: Ctrl-L diff --git a/plugins/log_jq.yaml b/plugins/log_jq.yaml index f4c40e02f3..331427b92f 100644 --- a/plugins/log_jq.yaml +++ b/plugins/log_jq.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # Sends logs over to jq for processing. This leverages kubectl plugin kubectl-jq. jqlogs: shortCut: Ctrl-J diff --git a/plugins/log_stern.yaml b/plugins/log_stern.yaml index 9f7b9ed079..1e850b385d 100644 --- a/plugins/log_stern.yaml +++ b/plugins/log_stern.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # Leverage stern (https://github.com/stern/stern) to output logs. stern: shortCut: Ctrl-L diff --git a/plugins/rm-ns.yaml b/plugins/rm-ns.yaml index 14a2a251d8..88509dc98c 100644 --- a/plugins/rm-ns.yaml +++ b/plugins/rm-ns.yaml @@ -1,4 +1,4 @@ -plugin: +plugins: # remove finalizers from a stuck namespace rm-ns: shortCut: n diff --git a/plugins/watch_events.yaml b/plugins/watch_events.yaml index ffd8b2fc59..db96c6eb3f 100644 --- a/plugins/watch_events.yaml +++ b/plugins/watch_events.yaml @@ -2,7 +2,7 @@ # requires linux "watch" command # change '-n' to adjust refresh time in seconds -plugin: +plugins: watch-events: shortCut: Shift-E confirm: false diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index f6da346138..b56bd21968 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -31,7 +31,7 @@ apps: parts: build: - plugin: go + plugins: go source: https://github.com/derailed/k9s.git source-tag: $SNAPCRAFT_PROJECT_VERSION override-build: |