Skip to content

Commit

Permalink
K9s/release v0.31.1 (derailed#2443)
Browse files Browse the repository at this point in the history
* [Bug] Fix derailed#2428

* [Bug] Ensures primordials configs are gen/saved if not present

* v0.31.1 release notes
  • Loading branch information
derailed authored and thejoeejoee committed Feb 23, 2024
1 parent 5fedc77 commit 7fdd207
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DATE ?= $(shell TZ=UTC date -j -f "%s" ${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:
else
DATE ?= $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ")
endif
VERSION ?= v0.31.0
VERSION ?= v0.31.1
IMG_NAME := derailed/k9s
IMAGE := ${IMG_NAME}:${VERSION}

Expand Down
2 changes: 1 addition & 1 deletion change_logs/release_v0.31.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine cont
* [#2420](https://github.com/derailed/k9s/pull/2420) supports referencing envs in hotkeys
* [#2419](https://github.com/derailed/k9s/pull/2419) fix typo

<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)
<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)
157 changes: 157 additions & 0 deletions change_logs/release_v0.31.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/>

# Release v0.31.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)

---

## ♫ Sounds Behind The Release ♭

* [Border Crossing - Eek A Mouse](https://www.youtube.com/watch?v=KaAC9dBPcOM)
* [The Weight - The Band](https://www.youtube.com/watch?v=FFqb1I-hiHE)
* [Wonderin' - Neil Young](https://www.youtube.com/watch?v=h0PlwVPbM5k)
* [When Your Lover Has Gone - Louis Armstrong](https://www.youtube.com/watch?v=1tdfIj0fvlA)

---

## A Word From Our Sponsors...

To all the good folks below that opted to `pay it forward` and join our sponsorship program, I salute you!!

* [Jacky Nguyen](https://github.com/nktpro)
* [Eckl, Máté](https://github.com/ecklm)
* [Jörgen](https://github.com/wthrbtn)
* [kmath313](https://github.com/kmath313)
* [a-thomas-22](https://github.com/a-thomas-22)
* [wpbeckwith](https://github.com/wpbeckwith)
* [Dima Altukhov](https://github.com/alt-dima)
* [Shoshin Nikita](https://github.com/ShoshinNikita)
* [Tu Hoang](https://github.com/rebyn)
* [Andreas Frangopoulos](https://github.com/qubeio)

> Sponsorship cancellations since the last release: **7!** 🥹
## Feature Release!

😳 Found a few issues in the neutrino drive...
This is another fairly heavy drop so bracing for impact 😱
Be sure to dial in the v0.31.0 SneakPeek video below for the gory details!

😵 Hopefully we've move the needle in the right direction on this drop... 🤞

Thank you all for your kindness, feedback and assistance in flushing out issues!!

> ☢️ Repeating v0.31.0 release notes here as we tweaked the initial drop ☢️
### Hold My Hand...

In this drop, we've added schema validation to ensure various configs are setup as expected.
K9s will now run validation checks on the following configurations:

1. K9s main configuration (config.yaml)
2. Context specific configs (clusterX/contextY/config.yaml)
3. Skins
4. Aliases
5. HotKeys
6. Plugins
7. Views

K9s behavior changed in this release if the main configuration does not match schema expectations.
In the past, the configuration will be validated, updated and saved should validation checks failed. Now the app will stop and report validation issues.

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.

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 ;(.

### Breaking Bad!

With this release, k9s may not start correctly if the config.yaml configurations are incorrect!

Configuration changes:

1. DRY fullScreenLogs -> fullScreens (k9s root config.yaml)

```yaml
# $XDG_CONFIG_HOME/k9s/config.yaml
k9s:
liveViewAutoRefresh: false
logger:
sinceSeconds: -1
fullScreen: false # => Was fullScreenLogs
...
```

2. Views Configuration.
To match other configurations the root is now `views:` vs `k9s: views:`

```yaml
# $XDG_CONFIG_HOME/k9s/views.yaml
views: # => Was k9s:\n views:
v1/pods:
columns:
- AGE
- NAMESPACE
...
```

### Serenity Now!

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`
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.

```yaml
# $XDG_CONFIG_HOME/k9s/config.yaml
k9s:
liveViewAutoRefresh: false
UI:
...
reactive: true # => enable/disable reactive UI
...
```

---

## Videos Are In The Can!

Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content...

* [K9s v0.31.0 Configs+Sneak peek](https://youtu.be/X3444KfjguE)
* [K9s v0.30.0 Sneak peek](https://youtu.be/mVBc1XneRJ4)
* [Vulnerability Scans](https://youtu.be/ULkl0MsaidU)

---

## Resolved Issues

* [#2434](https://github.com/derailed/k9s/issues/2434) readOnly: true in config.yaml doesnt get overriden by readOnly: false in cluster config
* [#2430](https://github.com/derailed/k9s/issues/2430) Referencing a namespace with the name of an alias inside an alias causes infinite loop
* [#2428](https://github.com/derailed/k9s/issues/2428) Boom!! runtime error: invalid memory address or nil pointer dereference - v0.30.8
* [#2421](https://github.com/derailed/k9s/issues/2421) k9s/config.yaml configuration file is overwritten on launch

---

## Contributed PRs

Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!!

* [#2433](https://github.com/derailed/k9s/pull/2433) switch contexts only when needed
* [#2429](https://github.com/derailed/k9s/pull/2429) Reference correct configuration ENV var in README
* [#2426](https://github.com/derailed/k9s/pull/2426) Update carvel plugin kick to shift K
* [#2420](https://github.com/derailed/k9s/pull/2420) supports referencing envs in hotkeys
* [#2419](https://github.com/derailed/k9s/pull/2419) fix typo

<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)
6 changes: 5 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ func (c *Config) Merge(c1 *Config) {

// Load loads K9s configuration from file.
func (c *Config) Load(path string) error {
if _, err := os.Stat(path); os.IsNotExist(err) {
if err := c.Save(); err != nil {
return err
}
}
bb, err := os.ReadFile(path)
if err != nil {
return err
Expand Down Expand Up @@ -254,7 +259,6 @@ func (c *Config) Validate() {
if c.K9s == nil {
c.K9s = NewK9s(c.conn, c.settings)
}

c.K9s.Validate(c.conn, c.settings)
}

Expand Down
3 changes: 2 additions & 1 deletion internal/config/json/schemas/hotkeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"properties": {
"shortCut": {"type": "string"},
"description": {"type": "string"},
"command": {"type": "string"}
"command": {"type": "string"},
"keepHistory": {"type": "boolean"}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions internal/config/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (v *CustomView) Reset() {

// Load loads view configurations.
func (v *CustomView) Load(path string) error {
if _, err := os.Stat(path); os.IsNotExist(err) {
return nil
}
bb, err := os.ReadFile(path)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: k9s
base: core20
version: 'v0.31.0'
version: 'v0.31.1'
summary: K9s is a CLI to view and manage your Kubernetes clusters.
description: |
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.
Expand Down

0 comments on commit 7fdd207

Please sign in to comment.