Skip to content

Commit 98a7f3f

Browse files
authored
K9s/release v0.31.1 (#2443)
* [Bug] Fix #2428 * [Bug] Ensures primordials configs are gen/saved if not present * v0.31.1 release notes
1 parent 6cc4374 commit 98a7f3f

File tree

7 files changed

+170
-5
lines changed

7 files changed

+170
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DATE ?= $(shell TZ=UTC date -j -f "%s" ${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:
1111
else
1212
DATE ?= $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ")
1313
endif
14-
VERSION ?= v0.31.0
14+
VERSION ?= v0.31.1
1515
IMG_NAME := derailed/k9s
1616
IMAGE := ${IMG_NAME}:${VERSION}
1717

change_logs/release_v0.31.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine cont
150150
* [#2420](https://github.com/derailed/k9s/pull/2420) supports referencing envs in hotkeys
151151
* [#2419](https://github.com/derailed/k9s/pull/2419) fix typo
152152

153-
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2023 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)
153+
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2024 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

change_logs/release_v0.31.1.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/>
2+
3+
# Release v0.31.1
4+
5+
## Notes
6+
7+
Thank you to all that contributed with flushing out issues and enhancements for K9s!
8+
I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev
9+
and see if we're happier with some of the fixes!
10+
If you've filed an issue please help me verify and close.
11+
12+
Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated!
13+
Also big thanks to all that have allocated their own time to help others on both slack and on this repo!!
14+
15+
As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey,
16+
please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
17+
18+
On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
19+
20+
---
21+
22+
## ♫ Sounds Behind The Release ♭
23+
24+
* [Border Crossing - Eek A Mouse](https://www.youtube.com/watch?v=KaAC9dBPcOM)
25+
* [The Weight - The Band](https://www.youtube.com/watch?v=FFqb1I-hiHE)
26+
* [Wonderin' - Neil Young](https://www.youtube.com/watch?v=h0PlwVPbM5k)
27+
* [When Your Lover Has Gone - Louis Armstrong](https://www.youtube.com/watch?v=1tdfIj0fvlA)
28+
29+
---
30+
31+
## A Word From Our Sponsors...
32+
33+
To all the good folks below that opted to `pay it forward` and join our sponsorship program, I salute you!!
34+
35+
* [Jacky Nguyen](https://github.com/nktpro)
36+
* [Eckl, Máté](https://github.com/ecklm)
37+
* [Jörgen](https://github.com/wthrbtn)
38+
* [kmath313](https://github.com/kmath313)
39+
* [a-thomas-22](https://github.com/a-thomas-22)
40+
* [wpbeckwith](https://github.com/wpbeckwith)
41+
* [Dima Altukhov](https://github.com/alt-dima)
42+
* [Shoshin Nikita](https://github.com/ShoshinNikita)
43+
* [Tu Hoang](https://github.com/rebyn)
44+
* [Andreas Frangopoulos](https://github.com/qubeio)
45+
46+
> Sponsorship cancellations since the last release: **7!** 🥹
47+
48+
## Feature Release!
49+
50+
😳 Found a few issues in the neutrino drive...
51+
This is another fairly heavy drop so bracing for impact 😱
52+
Be sure to dial in the v0.31.0 SneakPeek video below for the gory details!
53+
54+
😵 Hopefully we've move the needle in the right direction on this drop... 🤞
55+
56+
Thank you all for your kindness, feedback and assistance in flushing out issues!!
57+
58+
> ☢️ Repeating v0.31.0 release notes here as we tweaked the initial drop ☢️
59+
60+
### Hold My Hand...
61+
62+
In this drop, we've added schema validation to ensure various configs are setup as expected.
63+
K9s will now run validation checks on the following configurations:
64+
65+
1. K9s main configuration (config.yaml)
66+
2. Context specific configs (clusterX/contextY/config.yaml)
67+
3. Skins
68+
4. Aliases
69+
5. HotKeys
70+
6. Plugins
71+
7. Views
72+
73+
K9s behavior changed in this release if the main configuration does not match schema expectations.
74+
In the past, the configuration will be validated, updated and saved should validation checks failed. Now the app will stop and report validation issues.
75+
76+
The schemas are set to be a bit loose for the time being. Once we/ve vetted they are cool, we could publish them out (with additional TLC!) so k9s users can leverage them in their favorite editors.
77+
78+
In the meantime, you'll need to keep k9s logs handy, to check for validation errors. The validation messages can be somewhat cryptic at times and so please be sure to include your debug logs and config settings when reporting issues which might be plenty ;(.
79+
80+
### Breaking Bad!
81+
82+
With this release, k9s may not start correctly if the config.yaml configurations are incorrect!
83+
84+
Configuration changes:
85+
86+
1. DRY fullScreenLogs -> fullScreens (k9s root config.yaml)
87+
88+
```yaml
89+
# $XDG_CONFIG_HOME/k9s/config.yaml
90+
k9s:
91+
liveViewAutoRefresh: false
92+
logger:
93+
sinceSeconds: -1
94+
fullScreen: false # => Was fullScreenLogs
95+
...
96+
```
97+
98+
2. Views Configuration.
99+
To match other configurations the root is now `views:` vs `k9s: views:`
100+
101+
```yaml
102+
# $XDG_CONFIG_HOME/k9s/views.yaml
103+
views: # => Was k9s:\n views:
104+
v1/pods:
105+
columns:
106+
- AGE
107+
- NAMESPACE
108+
...
109+
```
110+
111+
### Serenity Now!
112+
113+
You can now opt in/out of the `reactive ui` feature. This feature enable users to make change to some configurations and see changes reflected live in the ui. This feature is now disabled by default and one must opt-in to enable via `k9s.UI.reactive`
114+
Reactive UI provides for monitoring various config files on disk and update the UI when changes to those files occur. This is handy while tuning skins, plugins, aliases, hotkeys and benchmarks parameters.
115+
116+
```yaml
117+
# $XDG_CONFIG_HOME/k9s/config.yaml
118+
k9s:
119+
liveViewAutoRefresh: false
120+
UI:
121+
...
122+
reactive: true # => enable/disable reactive UI
123+
...
124+
```
125+
126+
---
127+
128+
## Videos Are In The Can!
129+
130+
Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content...
131+
132+
* [K9s v0.31.0 Configs+Sneak peek](https://youtu.be/X3444KfjguE)
133+
* [K9s v0.30.0 Sneak peek](https://youtu.be/mVBc1XneRJ4)
134+
* [Vulnerability Scans](https://youtu.be/ULkl0MsaidU)
135+
136+
---
137+
138+
## Resolved Issues
139+
140+
* [#2434](https://github.com/derailed/k9s/issues/2434) readOnly: true in config.yaml doesnt get overriden by readOnly: false in cluster config
141+
* [#2430](https://github.com/derailed/k9s/issues/2430) Referencing a namespace with the name of an alias inside an alias causes infinite loop
142+
* [#2428](https://github.com/derailed/k9s/issues/2428) Boom!! runtime error: invalid memory address or nil pointer dereference - v0.30.8
143+
* [#2421](https://github.com/derailed/k9s/issues/2421) k9s/config.yaml configuration file is overwritten on launch
144+
145+
---
146+
147+
## Contributed PRs
148+
149+
Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!!
150+
151+
* [#2433](https://github.com/derailed/k9s/pull/2433) switch contexts only when needed
152+
* [#2429](https://github.com/derailed/k9s/pull/2429) Reference correct configuration ENV var in README
153+
* [#2426](https://github.com/derailed/k9s/pull/2426) Update carvel plugin kick to shift K
154+
* [#2420](https://github.com/derailed/k9s/pull/2420) supports referencing envs in hotkeys
155+
* [#2419](https://github.com/derailed/k9s/pull/2419) fix typo
156+
157+
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2024 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

internal/config/config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ func (c *Config) Merge(c1 *Config) {
205205

206206
// Load loads K9s configuration from file.
207207
func (c *Config) Load(path string) error {
208+
if _, err := os.Stat(path); os.IsNotExist(err) {
209+
if err := c.Save(); err != nil {
210+
return err
211+
}
212+
}
208213
bb, err := os.ReadFile(path)
209214
if err != nil {
210215
return err
@@ -254,7 +259,6 @@ func (c *Config) Validate() {
254259
if c.K9s == nil {
255260
c.K9s = NewK9s(c.conn, c.settings)
256261
}
257-
258262
c.K9s.Validate(c.conn, c.settings)
259263
}
260264

internal/config/json/schemas/hotkeys.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"properties": {
1212
"shortCut": {"type": "string"},
1313
"description": {"type": "string"},
14-
"command": {"type": "string"}
14+
"command": {"type": "string"},
15+
"keepHistory": {"type": "boolean"}
1516
}
1617
}
1718
}

internal/config/views.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ func (v *CustomView) Reset() {
4848

4949
// Load loads view configurations.
5050
func (v *CustomView) Load(path string) error {
51+
if _, err := os.Stat(path); os.IsNotExist(err) {
52+
return nil
53+
}
5154
bb, err := os.ReadFile(path)
5255
if err != nil {
5356
return err

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: k9s
22
base: core20
3-
version: 'v0.31.0'
3+
version: 'v0.31.1'
44
summary: K9s is a CLI to view and manage your Kubernetes clusters.
55
description: |
66
K9s is a CLI to view and manage your Kubernetes clusters. By leveraging a terminal UI, you can easily traverse Kubernetes resources and view the state of your clusters in a single powerful session.

0 commit comments

Comments
 (0)