powerline-shell
powerline-shell copied to clipboard
Add k8s segment to show context and namespace info
Hi, I added this segment to avoid making mistakes when using multiple k8s contexts/namespaces.
Hope you find it useful, any corrections welcome, and if something is missing for integration, just let me know.
Requirements kubectx and kubens from https://github.com/ahmetb/kubectx in PATH
Configuration
"k8s": {
"ltrim": bool,
"rtrim": bool,
"symbol": bool,
"max_context": number,
"max_namespace": number,
"colorize": bool,
"colorize_symbol": bool
}
ltrim, rtrim: do not add space at left or right (compatibility with some theme mods)
symbol: show k8s symbol
max_context, max_namespace: cut with an ellipsis context or namespace, use 0 to supress output
colorize, colorize_symbol: auto-colorize based on the information string
Theme K8S_FG = 57 K8S_BG = 7 K8S_SYMBOL_FG = 57