Skip to content

Commit

Permalink
Rel 0.40.5 (#3136)
Browse files Browse the repository at this point in the history
* update linter

* fix#3131

* fix#3119

* rel v0.40.5
  • Loading branch information
derailed authored Feb 18, 2025
1 parent ab6454f commit af8aa5f
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 18 deletions.
11 changes: 6 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ run:
# include test files or not, default is true
tests: true

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

# which dirs to skip: they won't be analyzed;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but next dirs are always skipped independently
Expand All @@ -38,7 +34,7 @@ run:
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
skip-files:
# skip-files:
# - ".*\\.my\\.go$"
# - lib/bad.go

Expand Down Expand Up @@ -83,6 +79,11 @@ linters-settings:
reason: "Go 1.20+ has support for combining multiple errors, see https://go.dev/doc/go1.20#errors"

issues:

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters: [staticcheck]
Expand Down
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.40.4
VERSION ?= v0.40.5
IMG_NAME := derailed/k9s
IMAGE := ${IMG_NAME}:${VERSION}

Expand Down
54 changes: 54 additions & 0 deletions change_logs/release_v0.40.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/>

# Release v0.40.5

## 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!

😳 Aye! Continued Buzz kill on the 0.40.0 aftermath 🙀 👻

Likely additional `disturbance in the farce` might be observed.
Thank you all for giving this drop a rinse and reporting back!! 😍

---

## Videos Are In The Can!

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

* [K9s v0.40.0 -Column Blow- Sneak peek](https://youtu.be/iy6RDozAM4A)
* [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

* [#3131](https://github.com/derailed/k9s/issues/3131) Singular versions of native Kubernetes resource names no longer work
* [#3119](https://github.com/derailed/k9s/issues/3119) Custom Views Fail to Load with % in Column Names (with feelings!)

---

## 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!!

* [#3123](https://github.com/derailed/k9s/pull/3123) update regex to allow '%' and '/' in column names


<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)
9 changes: 9 additions & 0 deletions internal/client/gvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ func (g GVR) GVR() schema.GroupVersionResource {
}
}

// GVSub returns group vervion sub path.
func (g GVR) GVSub() string {
if g.G() == "" {
return g.V()
}

return g.G() + "/" + g.V()
}

// GR returns a full schema representation.
func (g GVR) GR() *schema.GroupResource {
return &schema.GroupResource{
Expand Down
2 changes: 1 addition & 1 deletion internal/config/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (a *Aliases) Define(gvr string, aliases ...string) {
}

for _, alias := range aliases {
if _, ok := a.Alias[alias]; !ok {
if _, ok := a.Alias[alias]; !ok && alias != "" {
a.Alias[alias] = gvr
}
}
Expand Down
16 changes: 7 additions & 9 deletions internal/dao/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,12 @@ func (a *Alias) load(path string) error {
a.Define(gvrStr, gvr.AsResourceName())

// Allow single shot commands for k8s resources only!
if isStandardGroup(gvr.String()) {
if isStandardGroup(gvr.GVSub()) {
a.Define(gvrStr, strings.ToLower(meta.Kind), meta.Name)
if meta.SingularName != "" {
a.Define(gvrStr, meta.SingularName)
}
a.Define(gvrStr, meta.SingularName)

}
if meta.ShortNames != nil {
if len(meta.ShortNames) > 0 {
a.Define(gvrStr, meta.ShortNames...)
}
a.Define(gvrStr, gvrStr)
Expand All @@ -138,10 +137,9 @@ func (a *Alias) load(path string) error {
}
gvrStr := gvr.String()
a.Define(gvrStr, strings.ToLower(meta.Kind), meta.Name)
if meta.SingularName != "" {
a.Define(gvrStr, meta.SingularName)
}
if meta.ShortNames != nil {
a.Define(gvrStr, meta.SingularName)

if len(meta.ShortNames) > 0 {
a.Define(gvrStr, meta.ShortNames...)
}
a.Define(gvrStr, gvrStr)
Expand Down
4 changes: 3 additions & 1 deletion internal/render/cust_col.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/kubectl/pkg/cmd/get"
)

var fullRX = regexp.MustCompile(`\A([\w\s%\/-]+)\:?([^\|]*)\|?([T|N|W|L|R|H]{0,3})\b`)
var fullRX = regexp.MustCompile(`^([\w\s%\/-]+)\:?([\w\d\S\W]*?)\|?([N|T|W|R|L|H]{0,3})$`)

type colAttr byte

Expand Down Expand Up @@ -69,6 +69,8 @@ type colDef struct {
spec string
}

// TAG:.spec.containers[0].image|split(":")|.[-1]|TW

func parse(s string) (colDef, error) {
mm := fullRX.FindStringSubmatch(s)
if len(mm) == 4 {
Expand Down
2 changes: 2 additions & 0 deletions internal/render/cust_col_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ func TestCustCol_parse(t *testing.T) {
e: colDef{
name: "fred",
idx: -1,
spec: "{.||.metadata.name}",
colAttrs: colAttrs{
align: tview.AlignLeft,
wide: true,
},
},
},
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: core22
version: 'v0.40.4'
version: 'v0.40.5'
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 af8aa5f

Please sign in to comment.