What's new !!
🎉 (#576 #588) Highlight kubectl
contexts and namespaces based on patterns - @nomaed
You can define an array of pair of values (color, pattern)
, Where contexts and namespaces with first regex matching patterns would be highlighted with specified color. This array is empty by default.
For example, add the following to your .zshrc
file:
SPACESHIP_KUBECONTEXT_COLOR_GROUPS=(
# red if namespace is "kube-system"
red '\(kube-system)$'
# else, green if "dev-01" is anywhere in the context or namespace
green dev-01
# else, red if context name ends with ".k8s.local" _and_ namespace is "system"
red '\.k8s\.local \(system)$'
# else, yellow if the entire content is "test-" followed by digits,
# and no namespace is displayed
yellow '^test-[0-9]+$'
)
See full comparison at v3.8.2...v3.9.0