Skip to content

Commit af8aa5f

Browse files
authored
Rel 0.40.5 (#3136)
* update linter * fix#3131 * fix#3119 * rel v0.40.5
1 parent ab6454f commit af8aa5f

File tree

9 files changed

+84
-18
lines changed

9 files changed

+84
-18
lines changed

.golangci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ run:
1212
# include test files or not, default is true
1313
tests: true
1414

15-
# default is true. Enables skipping of directories:
16-
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
17-
skip-dirs-use-default: true
18-
1915
# which dirs to skip: they won't be analyzed;
2016
# can use regexp here: generated.*, regexp is applied on full path;
2117
# default value is empty list, but next dirs are always skipped independently
@@ -38,7 +34,7 @@ run:
3834
# won't be reported. Default value is empty list, but there is
3935
# no need to include all autogenerated files, we confidently recognize
4036
# autogenerated files. If it's not please let us know.
41-
skip-files:
37+
# skip-files:
4238
# - ".*\\.my\\.go$"
4339
# - lib/bad.go
4440

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

8581
issues:
82+
83+
# default is true. Enables skipping of directories:
84+
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
85+
skip-dirs-use-default: true
86+
8687
# Excluding configuration per-path, per-linter, per-text and per-source
8788
exclude-rules:
8889
- linters: [staticcheck]

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.40.4
14+
VERSION ?= v0.40.5
1515
IMG_NAME := derailed/k9s
1616
IMAGE := ${IMG_NAME}:${VERSION}
1717

change_logs/release_v0.40.5.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/>
2+
3+
# Release v0.40.5
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+
## Maintenance Release!
21+
22+
😳 Aye! Continued Buzz kill on the 0.40.0 aftermath 🙀 👻
23+
24+
Likely additional `disturbance in the farce` might be observed.
25+
Thank you all for giving this drop a rinse and reporting back!! 😍
26+
27+
---
28+
29+
## Videos Are In The Can!
30+
31+
Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content...
32+
33+
* [K9s v0.40.0 -Column Blow- Sneak peek](https://youtu.be/iy6RDozAM4A)
34+
* [K9s v0.31.0 Configs+Sneak peek](https://youtu.be/X3444KfjguE)
35+
* [K9s v0.30.0 Sneak peek](https://youtu.be/mVBc1XneRJ4)
36+
* [Vulnerability Scans](https://youtu.be/ULkl0MsaidU)
37+
38+
---
39+
40+
## Resolved Issues
41+
42+
* [#3131](https://github.com/derailed/k9s/issues/3131) Singular versions of native Kubernetes resource names no longer work
43+
* [#3119](https://github.com/derailed/k9s/issues/3119) Custom Views Fail to Load with % in Column Names (with feelings!)
44+
45+
---
46+
47+
## Contributed PRs
48+
49+
Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!!
50+
51+
* [#3123](https://github.com/derailed/k9s/pull/3123) update regex to allow '%' and '/' in column names
52+
53+
54+
<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/client/gvr.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@ func (g GVR) GVR() schema.GroupVersionResource {
111111
}
112112
}
113113

114+
// GVSub returns group vervion sub path.
115+
func (g GVR) GVSub() string {
116+
if g.G() == "" {
117+
return g.V()
118+
}
119+
120+
return g.G() + "/" + g.V()
121+
}
122+
114123
// GR returns a full schema representation.
115124
func (g GVR) GR() *schema.GroupResource {
116125
return &schema.GroupResource{

internal/config/alias.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (a *Aliases) Define(gvr string, aliases ...string) {
108108
}
109109

110110
for _, alias := range aliases {
111-
if _, ok := a.Alias[alias]; !ok {
111+
if _, ok := a.Alias[alias]; !ok && alias != "" {
112112
a.Alias[alias] = gvr
113113
}
114114
}

internal/dao/alias.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,12 @@ func (a *Alias) load(path string) error {
119119
a.Define(gvrStr, gvr.AsResourceName())
120120

121121
// Allow single shot commands for k8s resources only!
122-
if isStandardGroup(gvr.String()) {
122+
if isStandardGroup(gvr.GVSub()) {
123123
a.Define(gvrStr, strings.ToLower(meta.Kind), meta.Name)
124-
if meta.SingularName != "" {
125-
a.Define(gvrStr, meta.SingularName)
126-
}
124+
a.Define(gvrStr, meta.SingularName)
125+
127126
}
128-
if meta.ShortNames != nil {
127+
if len(meta.ShortNames) > 0 {
129128
a.Define(gvrStr, meta.ShortNames...)
130129
}
131130
a.Define(gvrStr, gvrStr)
@@ -138,10 +137,9 @@ func (a *Alias) load(path string) error {
138137
}
139138
gvrStr := gvr.String()
140139
a.Define(gvrStr, strings.ToLower(meta.Kind), meta.Name)
141-
if meta.SingularName != "" {
142-
a.Define(gvrStr, meta.SingularName)
143-
}
144-
if meta.ShortNames != nil {
140+
a.Define(gvrStr, meta.SingularName)
141+
142+
if len(meta.ShortNames) > 0 {
145143
a.Define(gvrStr, meta.ShortNames...)
146144
}
147145
a.Define(gvrStr, gvrStr)

internal/render/cust_col.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"k8s.io/kubectl/pkg/cmd/get"
1313
)
1414

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

1717
type colAttr byte
1818

@@ -69,6 +69,8 @@ type colDef struct {
6969
spec string
7070
}
7171

72+
// TAG:.spec.containers[0].image|split(":")|.[-1]|TW
73+
7274
func parse(s string) (colDef, error) {
7375
mm := fullRX.FindStringSubmatch(s)
7476
if len(mm) == 4 {

internal/render/cust_col_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,10 @@ func TestCustCol_parse(t *testing.T) {
189189
e: colDef{
190190
name: "fred",
191191
idx: -1,
192+
spec: "{.||.metadata.name}",
192193
colAttrs: colAttrs{
193194
align: tview.AlignLeft,
195+
wide: true,
194196
},
195197
},
196198
},

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: core22
3-
version: 'v0.40.4'
3+
version: 'v0.40.5'
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)