// Kubernetes Status — configuration reference // // This file is documentation, not a config file the plugin reads. Omarchy has // no per-plugin config files: every bar widget is configured inline in its own // entry in ~/.config/omarchy/shell.json, under "bar" > "layout" >
. // Copy the keys you want from the examples below into that entry. // // Two things to know before editing: // * shell.json is strict JSON — no comments, no trailing commas. Strip the // // lines from anything you copy out of this file. // * The shell hot-reloads shell.json on save. No restart needed for these. // // Every value is clamped on read, so an out-of-range or misspelled number // falls back to its default instead of breaking the widget. { // --------------------------------------------------------------------- // 1. Minimal — every setting defaults. This is all you actually need. // --------------------------------------------------------------------- "minimal": { "id": "io.github.edwardpayne.kube-status" }, // --------------------------------------------------------------------- // 2. Every option, with its default and range spelled out. // --------------------------------------------------------------------- "fullyAnnotated": { "id": "io.github.edwardpayne.kube-status", // How often to poll cluster health, in seconds. // Default 60. Range 15–3600. // The context name does NOT wait for this — it comes from a file watch on // your kubeconfig and updates in about a second. This interval only // governs the node/pod numbers, so a long value costs you nothing on the // part that matters. On battery, 300 is perfectly reasonable. "refreshIntervalSec": 60, // Hard ceiling on every kubectl call, in seconds. // Default 8. Range 3–30. // This is a real timeout, not kubectl's --request-timeout, which does not // cover TCP connect and will hang forever against an unreachable API // server. Raise it if you are on a slow link and see spurious // "unreachable"; lower it if you want the disconnect icon to appear // faster when you leave the LAN. "commandTimeoutSec": 8, // How far ahead of client-certificate expiry to start warning, in days. // Default 30. Range 1–365. // Only applies when your kubeconfig uses client-certificate auth. Raise it // if your cluster issues long-lived certs and you want more notice; a // 1-year cert with 30 days of warning gives you very little runway. // Ignored entirely for token, OIDC, or exec-plugin auth. "certWarnDays": 30, // How many unhealthy pods to name in the panel. // Default 5. Range 1–50. // The COUNT is always exact regardless of this; only the list is trimmed, // and the panel says "+N more" when it truncates. Raise it on a large // cluster where five names are not enough to see the pattern. "maxBadPods": 5, // Which contexts count as production. // Default "prod". Case-insensitive SUBSTRING match, not a regex. // "prod" matches reamp-prod, prod-eu, and PRODUCTION-1. // Set to "" to disable the production highlight entirely. // See example 4 for teams whose production contexts are not named "prod". "prodPattern": "prod", // Show the context name next to the icon. // Default true. // false renders icon-only, which is useful in a crowded bar. Vertical bars // are always icon-only regardless of this setting, since there is no room // for a name. In icon-only mode the icon takes over the production colour, // because there is no name left to carry it. "showContextLabel": true, // What the panel's button launches, in a floating terminal. // Default "k9s". See example 5 for alternatives. "k9sCommand": "k9s" }, // --------------------------------------------------------------------- // 3. Laptop on battery, mostly off the cluster network. // --------------------------------------------------------------------- // Polls rarely and gives up quickly, so the disconnect icon appears fast // when you leave the office and almost nothing runs while you are away. // The context guard keeps working the whole time — it never touches the // network. "laptop": { "id": "io.github.edwardpayne.kube-status", "refreshIntervalSec": 300, "commandTimeoutSec": 5 }, // --------------------------------------------------------------------- // 4. Production contexts that are not named "prod". // --------------------------------------------------------------------- // The match is a plain substring, so pick the fragment your production // contexts share and your others do not. If they share nothing, rename the // contexts (kubectl config rename-context) — that is worth doing anyway. // // contexts: acme-live-eu, acme-live-us, acme-staging -> "live" // contexts: cluster-01-p, cluster-02-p, cluster-03-d -> "-p" // // Be careful with fragments that appear in BOTH: "cluster" would match // everything above and flag staging as production, which trains you to // ignore the colour — worse than no highlight at all. "customProdNaming": { "id": "io.github.edwardpayne.kube-status", "prodPattern": "live" }, // --------------------------------------------------------------------- // 5. A different cluster browser. // --------------------------------------------------------------------- // Any command that makes sense in a terminal. It is shell-quoted, so a // command with arguments is fine. // // "k9s" the default // "k9s --readonly" browse production without fat-fingering a delete // "k9s -n kube-system" start in a specific namespace // "kubectl get pods -A -w" no k9s installed // "lazydocker" whatever you actually use "readOnlyBrowser": { "id": "io.github.edwardpayne.kube-status", "k9sCommand": "k9s --readonly" }, // --------------------------------------------------------------------- // 6. Icon-only, for a crowded bar. // --------------------------------------------------------------------- // Hover for the tooltip, which still names the context and says whether it // is production. Note the trade-off: at a glance you can see that something // is wrong, but not which cluster it is wrong on. "iconOnly": { "id": "io.github.edwardpayne.kube-status", "showContextLabel": false }, // --------------------------------------------------------------------- // 7. Where this actually goes in shell.json. // --------------------------------------------------------------------- // Real excerpt, comments stripped, ready to adapt: // // { // "bar": { // "layout": { // "right": [ // { "id": "omarchy.tray" }, // { "id": "io.github.edwardpayne.kube-status", // "refreshIntervalSec": 120, // "prodPattern": "live", // "k9sCommand": "k9s --readonly" }, // { "id": "omarchy.audio" }, // { "id": "omarchy.power" } // ] // } // } // } // // To move it without hand-editing: // omarchy bar move io.github.edwardpayne.kube-status --section right --index 1 // // To check what the plugin currently sees: // jq '.bar.layout | .[] | .[] | select(.id | test("kube-status"))' \ // ~/.config/omarchy/shell.json // // To test the underlying command directly, bypassing the shell entirely: // ~/.config/omarchy/plugins/io.github.edwardpayne.kube-status/kube-status.sh // ./kube-status.sh 8 90 15 # timeout, cert-warn days, max bad pods "placement": null }