From 7c967d6b326d09e6c60638242a5fa9d185c3c0ed Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 1 Jul 2025 19:50:53 -0700 Subject: [PATCH] Add k9s configuration --- .config/k9s/aliases.yaml | 9 +++ .config/k9s/config.yaml | 41 +++++++++++ .config/k9s/plugins.yaml | 16 +++++ .config/k9s/skins/nightfox.yaml | 119 ++++++++++++++++++++++++++++++++ .config/k9s/views.yaml | 13 ++++ 5 files changed, 198 insertions(+) create mode 100644 .config/k9s/aliases.yaml create mode 100644 .config/k9s/config.yaml create mode 100644 .config/k9s/plugins.yaml create mode 100644 .config/k9s/skins/nightfox.yaml create mode 100644 .config/k9s/views.yaml diff --git a/.config/k9s/aliases.yaml b/.config/k9s/aliases.yaml new file mode 100644 index 0000000..ee4d9ec --- /dev/null +++ b/.config/k9s/aliases.yaml @@ -0,0 +1,9 @@ +aliases: + dp: deployments + sec: v1/secrets + jo: jobs + cr: clusterroles + crb: clusterrolebindings + ro: roles + rb: rolebindings + np: networkpolicies diff --git a/.config/k9s/config.yaml b/.config/k9s/config.yaml new file mode 100644 index 0000000..2228911 --- /dev/null +++ b/.config/k9s/config.yaml @@ -0,0 +1,41 @@ +k9s: + liveViewAutoRefresh: false + screenDumpDir: /tmp/k9s-screens-d_mcknight + refreshRate: 2 + maxConnRetry: 5 + readOnly: false + noExitOnCtrlC: true + portForwardAddress: localhost + ui: + enableMouse: true + headless: false + logoless: true + crumbsless: false + splashless: false + reactive: false + noIcons: false + skin: nightfox + defaultsToFullScreen: false + useFullGVRTitle: false + skipLatestRevCheck: false + disablePodCounting: false + shellPod: null + imageScans: + enable: false + exclusions: + namespaces: [] + labels: {} + logger: + tail: 100 + buffer: 5000 + sinceSeconds: 300 + textWrap: false + disableAutoscroll: false + showTime: false + thresholds: + cpu: + critical: 90 + warn: 70 + memory: + critical: 90 + warn: 70 diff --git a/.config/k9s/plugins.yaml b/.config/k9s/plugins.yaml new file mode 100644 index 0000000..5183dc3 --- /dev/null +++ b/.config/k9s/plugins.yaml @@ -0,0 +1,16 @@ +plugins: + edit-secret: + shortCut: Ctrl-X + confirm: false + description: "Edit Secret" + scopes: + - secrets + command: kubectl + background: false + args: + - modify-secret + - --namespace + - $NAMESPACE + - --context + - $CONTEXT + - $NAME diff --git a/.config/k9s/skins/nightfox.yaml b/.config/k9s/skins/nightfox.yaml new file mode 100644 index 0000000..ef45314 --- /dev/null +++ b/.config/k9s/skins/nightfox.yaml @@ -0,0 +1,119 @@ +# ----------------------------------------------------------------------------- +# K9s Nightfox Theme +# Based on the Nightfox.nvim color scheme: +# https://github.com/EdenEast/nightfox.nvim +# ----------------------------------------------------------------------------- + +# Styles... +foreground: &foreground "#cdcecf" # Light Gray +#foreground: &foreground "#ad7fa8" + +#background: &background "#192330" +background: &background "default" +current_line: ¤t_line "#2b3b51" # Dark Blue/Gray +#current_line: ¤t_line "#ad7fa8" +selection: &selection "#2b3b51" +#selection: &selection "#ad7fa8" + +comment: &comment "#738091" # Medium Gray +cyan: &cyan "#008b8b" #"#63cdcf" +green: &green "#81b29a" +orange: &orange "#f4a261" +magenta: &magenta "#9d79d6" +purple: &purple "#ad7fa8" +blue: &blue "#719cd6" +red: &red "#c94f6d" + +# Skin... +k9s: + body: + fgColor: *foreground + bgColor: *background + logoColor: *blue + prompt: + fgColor: *foreground + bgColor: *background + suggestColor: *orange + info: + fgColor: *purple + sectionColor: *foreground + dialog: + fgColor: *foreground + bgColor: *background + buttonFgColor: *foreground + buttonBgColor: *purple +# buttonFocusFgColor: white + buttonFocusFgColor: *current_line + #buttonFocusBgColor: *cyan + buttonFocusBgColor: *purple + labelFgColor: *orange + fieldFgColor: *foreground + frame: + border: + fgColor: *selection + focusColor: *current_line + menu: + fgColor: *foreground + keyColor: *magenta + numKeyColor: *magenta + crumbs: + fgColor: *foreground + bgColor: *current_line + activeColor: *current_line + status: +# newColor is used for every pod by default +# newColor: *cyan + newColor: *purple + modifyColor: *blue + #modifyColor: "#ad7fa8" + addColor: *green + errorColor: *red + highlightColor: *orange + #highlightColor: "#ad7fa8" + killColor: *comment + completedColor: *comment + title: + fgColor: *foreground +# bgColor: *current_line + bgColor: *background +# highlightColor: *orange + highlightColor: *cyan + counterColor: *blue + filterColor: *magenta + views: + charts: + bgColor: default + defaultDialColors: + - *blue + - *red + defaultChartColors: + - *blue + - *red + table: + fgColor: *foreground + bgColor: *background + cursorFgColor: *selection + cursorBgColor: *current_line +# cursorBgColor: "#ad7fa8" + header: + fgColor: *foreground + bgColor: *background + sorterColor: *cyan + xray: + fgColor: *foreground + bgColor: *background + cursorColor: *current_line + graphicColor: *blue + showIcons: false + yaml: + keyColor: *magenta + colonColor: *blue + valueColor: *foreground + logs: + fgColor: *foreground + bgColor: *background + indicator: + fgColor: *foreground + bgColor: *selection + toggleOnColor: *magenta + toggleOffColor: *blue diff --git a/.config/k9s/views.yaml b/.config/k9s/views.yaml new file mode 100644 index 0000000..38eef51 --- /dev/null +++ b/.config/k9s/views.yaml @@ -0,0 +1,13 @@ +views: + v1/pods: + sortColumn: NAME:asc + columns: + - AGE + - NAME + - STATUS + - READY + - RESTARTS + - CPU + - MEM + - IP + - NODE