diff --git a/README.md b/README.md
index ae3a89c0..aa8c825c 100644
--- a/README.md
+++ b/README.md
@@ -346,6 +346,8 @@ K9s uses aliases to navigate most K8s resources.
noIcons: false
# Toggles whether k9s should check for the latest revision from the Github repository releases. Default is false.
skipLatestRevCheck: false
+ # When altering kubeconfig or using multiple kube configs, k9s will clean up clusters configurations that are no longer in use. Setting this flag to true will keep k9s from cleaning up inactive cluster configs. Defaults to false.
+ keepMissingClusters: false
# Logs configuration
logger:
# Defines the number of lines to return. Default 100
diff --git a/change_logs/release_v0.29.1.md b/change_logs/release_v0.29.1.md
new file mode 100644
index 00000000..2c58c8f9
--- /dev/null
+++ b/change_logs/release_v0.29.1.md
@@ -0,0 +1,34 @@
+
+
+# Release v0.29.1
+
+## Notes
+
+Thank you to all that contributed with flushing out issues and enhancements for K9s!
+I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev
+and see if we're happier with some of the fixes!
+If you've filed an issue please help me verify and close.
+
+Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated!
+Also big thanks to all that have allocated their own time to help others on both slack and on this repo!!
+
+As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey,
+please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
+
+On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
+
+---
+
+## Maintenance Release
+
+---
+
+## Resolved Issues
+
+* [#2330](https://github.com/derailed/k9s/issues/2330) Skins don't work v0.29.0
+* [#2329](https://github.com/derailed/k9s/issues/2329) New skin system in v0.29.0 doesn't work if you use different k8s context files
+* [#2327](https://github.com/derailed/k9s/issues/2327) [Bug] Item highlighting broke in v0.29.0
+
+---
+
+
© 2023 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)
diff --git a/internal/ui/config.go b/internal/ui/config.go
index 3d55da8f..b00196ff 100644
--- a/internal/ui/config.go
+++ b/internal/ui/config.go
@@ -6,6 +6,7 @@ package ui
import (
"context"
"errors"
+ "fmt"
"os"
"path/filepath"
@@ -130,6 +131,29 @@ func BenchConfig(context string) string {
return filepath.Join(config.K9sHome(), config.K9sBench+"-"+context+".yml")
}
+func (c *Configurator) clusterFromContext(name string) (*config.Cluster, error) {
+ if c.Config == nil || c.Config.GetConnection() == nil {
+ return nil, fmt.Errorf("No config set in configurator")
+ }
+
+ cc, err := c.Config.GetConnection().Config().Contexts()
+ if err != nil {
+ return nil, errors.New("unable to retrieve contexts map")
+ }
+
+ context, ok := cc[name]
+ if !ok {
+ return nil, fmt.Errorf("no context named %s found", name)
+ }
+
+ cl, ok := c.Config.K9s.Clusters[context.Cluster]
+ if !ok {
+ return nil, fmt.Errorf("no cluster named %s found", context.Cluster)
+ }
+
+ return cl, nil
+}
+
// RefreshStyles load for skin configuration changes.
func (c *Configurator) RefreshStyles(context string) {
c.BenchFile = BenchConfig(context)
@@ -141,11 +165,10 @@ func (c *Configurator) RefreshStyles(context string) {
}
var skin string
- if c.Config != nil {
- cl, ok := c.Config.K9s.Clusters[context]
- if !ok {
- return
- }
+ cl, err := c.clusterFromContext(context)
+ if err != nil {
+ log.Warn().Err(err).Msgf("No cluster found. Using default skin")
+ } else {
skin = cl.Skin
}