k9s: add aliases, plugins, views

Adding the remaining config files of k9s that weren't covered yet.

PR #4627
This commit is contained in:
Paul Meyer 2023-11-02 07:51:00 +01:00 committed by Robert Helgesson
parent e27be9db7b
commit 691cbcc03a
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 155 additions and 13 deletions

View file

@ -0,0 +1,2 @@
alias:
pp: v1/pods

View file

@ -0,0 +1,16 @@
plugin:
fred:
args:
- logs
- -f
- $NAME
- -n
- $NAMESPACE
- --context
- $CLUSTER
background: false
command: kubectl
description: Pod logs
scopes:
- po
shortCut: Ctrl-L

View file

@ -35,6 +35,29 @@
};
};
};
aliases = { alias = { pp = "v1/pods"; }; };
plugin = {
plugin = {
fred = {
shortCut = "Ctrl-L";
description = "Pod logs";
scopes = [ "po" ];
command = "kubectl";
background = false;
args =
[ "logs" "-f" "$NAME" "-n" "$NAMESPACE" "--context" "$CLUSTER" ];
};
};
};
views = {
k9s = {
views = {
"v1/pods" = {
columns = [ "AGE" "NAMESPACE" "NAME" "IP" "NODE" "STATUS" "READY" ];
};
};
};
};
};
nmt.script = ''
@ -43,12 +66,24 @@
home-files/.config/k9s/config.yml \
${./example-config-expected.yml}
assertFileExists home-files/.config/k9s/skin.yml
assertFileExists home-files/.config/k9s/hotkey.yml
assertFileContent \
home-files/.config/k9s/skin.yml \
${./example-skin-expected.yml}
assertFileExists home-files/.config/k9s/hotkey.yml
assertFileContent \
home-files/.config/k9s/hotkey.yml \
${./example-hotkey-expected.yml}
assertFileExists home-files/.config/k9s/aliases.yml
assertFileContent \
home-files/.config/k9s/aliases.yml \
${./example-aliases-expected.yml}
assertFileExists home-files/.config/k9s/plugin.yml
assertFileContent \
home-files/.config/k9s/plugin.yml \
${./example-plugin-expected.yml}
assertFileExists home-files/.config/k9s/views.yml
assertFileContent \
home-files/.config/k9s/views.yml \
${./example-views-expected.yml}
'';
}

View file

@ -0,0 +1,11 @@
k9s:
views:
v1/pods:
columns:
- AGE
- NAMESPACE
- NAME
- IP
- NODE
- STATUS
- READY