Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conflicting plugins shortcuts #2929

Closed
fragolinux opened this issue Oct 24, 2024 · 2 comments
Closed

conflicting plugins shortcuts #2929

fragolinux opened this issue Oct 24, 2024 · 2 comments

Comments

@fragolinux
Copy link
Contributor

hi, i created this script which will fetch all the available plugins (and skins) and add them all to the correct file (according to XDG config)...

#!/usr/bin/env bash

base="$HOME/.config/k9s"
custom="$base/custom"
remote="$base/remote"
backup="$base/backup"
mkdir -p "$custom" "$remote" "$backup"
DATA=$(date +%Y-%m-%d_%Hh%Mm)
git clone --depth 1 --filter=blob:none --sparse https://github.com/derailed/k9s $remote > /dev/null 2>&1
cd $remote
git sparse-checkout set plugins skins
[ -f "$base/plugins.yaml" ] && mv "$base/plugins.yaml" "$backup/plugins-$DATA.yaml"
echo "plugins:" > "$base/plugins.yaml"
for i in $(ls $remote/plugins/*.yaml); do cat $i | grep -v "plugins:" | grep -v "plugins.yaml" >> "$base/plugins.yaml" ; done
if compgen -G "$custom/*.yaml" > /dev/null; then
  for i in $(ls $custom/*.yaml); do cat $i | grep -v "plugins:" | grep -v "plugins.yaml" >> "$base/plugins.yaml" ; done
fi
cp -a "$remote/skins" "$base"

only problem, not related to my script, is that many plugins have identical shortcuts configured, having them conflicting if logFile is enabled:

�[90m11:52AM�[0m �[32mINF�[0m �[1m🐶 K9s starting up...�[0m
�[90m11:52AM�[0m �[31mERR�[0m �[1mFail to locate metrics-server�[0m �[36merror=�[0m�[31m�[1m"No metrics api group metrics.k8s.io found on cluster"�[0m�[0m
�[90m11:52AM�[0m �[32mINF�[0m �[1m✅ Kubernetes connectivity�[0m
�[90m11:53AM�[0m �[32mINF�[0m �[1m🐶 K9s starting up...�[0m
�[90m11:53AM�[0m �[32mINF�[0m �[1m✅ Kubernetes connectivity�[0m
�[90m12:02PM�[0m �[32mINF�[0m �[1m🐶 K9s starting up...�[0m
�[90m12:02PM�[0m �[32mINF�[0m �[1m✅ Kubernetes connectivity�[0m
�[90m12:02PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"�[0m
�[90m12:02PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "loki-pods"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "log-less"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-L" in "loki-pods"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-A" in "trace"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "log-less"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "log-less"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Shift-A" in "trace"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-L" in "loki-pods"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "stern"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "loki-pods"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-T" in "open-terminal"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "loki-pods"�[0m
�[90m12:03PM�[0m �[33mWRN�[0m �[1mPlugins load failed: duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"�[0m

any way to fix them? Maybe i can select different ones for each, and open a PR, anyone interested?

@fragolinux
Copy link
Contributor Author

i fixed everything and opened a PR: #2930

@derailed
Copy link
Owner

@fragolinux Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants