Skip to content

Commit 13cb55b

Browse files
authored
Rel v0.50.6 (#3338)
* update deps * add epslice support * update pulses * fix #3334 * rel notes
1 parent b68b68e commit 13cb55b

File tree

20 files changed

+335
-76
lines changed

20 files changed

+335
-76
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ demos
2424
kind
2525
*.snap
2626
/stresser
27-
__debug_bin*
27+
__debug_bin*
28+
fg.yaml

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ run:
1111
tests: true
1212

1313
linters:
14+
disable:
15+
- staticcheck
1416
enable:
1517
- sloglint
1618
- bodyclose

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME := k9s
2-
VERSION ?= v0.50.5
2+
VERSION ?= v0.50.6
33
PACKAGE := github.com/derailed/$(NAME)
44
OUTPUT_BIN ?= execs/${NAME}
55
GO_FLAGS ?=

change_logs/release_v0.50.6.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/>
2+
3+
# Release v0.50.6
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/zt-3360a389v-ElLHrb0Dp1kAXqYUItSAFA)
19+
20+
## Maintenance Release!
21+
22+
---
23+
24+
## Resolved Issues
25+
26+
* [#3334](https://github.com/derailed/k9s/issues/3334) Watcher failed for events.k8s.io/v1/events -- expecting a meta table but got *unstructured.Unstructure
27+
28+
---
29+
30+
## Contributed PRs
31+
32+
Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!!
33+
34+
* [#3332](https://github.com/derailed/k9s/pull/3332) fix: pre-check for get permissions only on port-forward
35+
* [#3311](https://github.com/derailed/k9s/pull/3311) Fix concurrent read writes
36+
* [#3310](https://github.com/derailed/k9s/pull/3310) fix: use full path of date to avoid conflict
37+
38+
---
39+
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2025 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

go.mod

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ require (
3030
golang.org/x/text v0.24.0
3131
gopkg.in/yaml.v3 v3.0.1
3232
helm.sh/helm/v3 v3.17.3
33-
k8s.io/api v0.32.3
34-
k8s.io/apiextensions-apiserver v0.32.3
33+
k8s.io/api v0.33.0
34+
k8s.io/apiextensions-apiserver v0.33.0
3535
k8s.io/apimachinery v0.33.0
36-
k8s.io/cli-runtime v0.32.3
37-
k8s.io/client-go v0.32.3
36+
k8s.io/cli-runtime v0.33.0
37+
k8s.io/client-go v0.33.0
3838
k8s.io/klog/v2 v2.130.1
39-
k8s.io/kubectl v0.32.3
40-
k8s.io/kubernetes v1.33.0
41-
k8s.io/metrics v0.32.3
39+
k8s.io/kubectl v0.33.0
40+
k8s.io/metrics v0.33.0
4241
sigs.k8s.io/yaml v1.4.0
4342
)
4443

@@ -171,7 +170,6 @@ require (
171170
github.com/gogo/protobuf v1.3.2 // indirect
172171
github.com/gohugoio/hashstructure v0.5.0 // indirect
173172
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
174-
github.com/golang/protobuf v1.5.4 // indirect
175173
github.com/golang/snappy v0.0.4 // indirect
176174
github.com/google/btree v1.1.3 // indirect
177175
github.com/google/gnostic-models v0.6.9 // indirect
@@ -330,7 +328,7 @@ require (
330328
golang.org/x/crypto v0.37.0 // indirect
331329
golang.org/x/mod v0.24.0 // indirect
332330
golang.org/x/net v0.39.0 // indirect
333-
golang.org/x/oauth2 v0.27.0 // indirect
331+
golang.org/x/oauth2 v0.29.0 // indirect
334332
golang.org/x/sync v0.13.0 // indirect
335333
golang.org/x/sys v0.32.0 // indirect
336334
golang.org/x/term v0.31.0 // indirect
@@ -348,8 +346,9 @@ require (
348346
gopkg.in/inf.v0 v0.9.1 // indirect
349347
gopkg.in/warnings.v0 v0.1.2 // indirect
350348
gorm.io/gorm v1.25.12 // indirect
351-
k8s.io/apiserver v0.32.3 // indirect
352-
k8s.io/component-base v0.32.3 // indirect
349+
k8s.io/apiserver v0.33.0 // indirect
350+
k8s.io/component-base v0.33.0 // indirect
351+
k8s.io/component-helpers v0.33.0 // indirect
353352
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
354353
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
355354
modernc.org/libc v1.62.1 // indirect

go.sum

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,6 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
11481148
github.com/google/go-containerregistry v0.20.3 h1:oNx7IdTI936V8CQRveCjaxOiegWwvM7kqkbXTpyiovI=
11491149
github.com/google/go-containerregistry v0.20.3/go.mod h1:w00pIgBRDVUDFM6bq+Qx8lwNWK+cxgCuX1vd3PIBDNI=
11501150
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
1151-
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
1152-
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
11531151
github.com/google/licensecheck v0.3.1 h1:QoxgoDkaeC4nFrtGN1jV7IPmDCHFNIVh54e5hSt6sPs=
11541152
github.com/google/licensecheck v0.3.1/go.mod h1:ORkR35t/JjW+emNKtfJDII0zlciG9JgbT7SmsohlHmY=
11551153
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
@@ -2006,8 +2004,8 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec
20062004
golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
20072005
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
20082006
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
2009-
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
2010-
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
2007+
golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98=
2008+
golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
20112009
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
20122010
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
20132011
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -2596,30 +2594,30 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
25962594
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
25972595
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
25982596
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
2599-
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
2600-
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
2601-
k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY=
2602-
k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss=
2597+
k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU=
2598+
k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM=
2599+
k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs=
2600+
k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc=
26032601
k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ=
26042602
k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
2605-
k8s.io/apiserver v0.32.3 h1:kOw2KBuHOA+wetX1MkmrxgBr648ksz653j26ESuWNY8=
2606-
k8s.io/apiserver v0.32.3/go.mod h1:q1x9B8E/WzShF49wh3ADOh6muSfpmFL0I2t+TG0Zdgc=
2607-
k8s.io/cli-runtime v0.32.3 h1:khLF2ivU2T6Q77H97atx3REY9tXiA3OLOjWJxUrdvss=
2608-
k8s.io/cli-runtime v0.32.3/go.mod h1:vZT6dZq7mZAca53rwUfdFSZjdtLyfF61mkf/8q+Xjak=
2609-
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
2610-
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
2611-
k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k=
2612-
k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI=
2603+
k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc=
2604+
k8s.io/apiserver v0.33.0/go.mod h1:EixYOit0YTxt8zrO2kBU7ixAtxFce9gKGq367nFmqI8=
2605+
k8s.io/cli-runtime v0.33.0 h1:Lbl/pq/1o8BaIuyn+aVLdEPHVN665tBAXUePs8wjX7c=
2606+
k8s.io/cli-runtime v0.33.0/go.mod h1:QcA+r43HeUM9jXFJx7A+yiTPfCooau/iCcP1wQh4NFw=
2607+
k8s.io/client-go v0.33.0 h1:UASR0sAYVUzs2kYuKn/ZakZlcs2bEHaizrrHUZg0G98=
2608+
k8s.io/client-go v0.33.0/go.mod h1:kGkd+l/gNGg8GYWAPr0xF1rRKvVWvzh9vmZAMXtaKOg=
2609+
k8s.io/component-base v0.33.0 h1:Ot4PyJI+0JAD9covDhwLp9UNkUja209OzsJ4FzScBNk=
2610+
k8s.io/component-base v0.33.0/go.mod h1:aXYZLbw3kihdkOPMDhWbjGCO6sg+luw554KP51t8qCU=
2611+
k8s.io/component-helpers v0.33.0 h1:0AdW0A0mIgljLgtG0hJDdJl52PPqTrtMgOgtm/9i/Ys=
2612+
k8s.io/component-helpers v0.33.0/go.mod h1:9SRiXfLldPw9lEEuSsapMtvT8j/h1JyFFapbtybwKvU=
26132613
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
26142614
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
26152615
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
26162616
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
2617-
k8s.io/kubectl v0.32.3 h1:VMi584rbboso+yjfv0d8uBHwwxbC438LKq+dXd5tOAI=
2618-
k8s.io/kubectl v0.32.3/go.mod h1:6Euv2aso5GKzo/UVMacV6C7miuyevpfI91SvBvV9Zdg=
2619-
k8s.io/kubernetes v1.33.0 h1:BP5Y5yIzUZVeBuE/ESZvnw6TNxjXbLsCckIkljE+R0U=
2620-
k8s.io/kubernetes v1.33.0/go.mod h1:2nWuPk0seE4+6sd0x60wQ6rYEXcV7SoeMbU0YbFm/5k=
2621-
k8s.io/metrics v0.32.3 h1:2vsBvw0v8rIIlczZ/lZ8Kcqk9tR6Fks9h+dtFNbc2a4=
2622-
k8s.io/metrics v0.32.3/go.mod h1:9R1Wk5cb+qJpCQon9h52mgkVCcFeYxcY+YkumfwHVCU=
2617+
k8s.io/kubectl v0.33.0 h1:HiRb1yqibBSCqic4pRZP+viiOBAnIdwYDpzUFejs07g=
2618+
k8s.io/kubectl v0.33.0/go.mod h1:gAlGBuS1Jq1fYZ9AjGWbI/5Vk3M/VW2DK4g10Fpyn/0=
2619+
k8s.io/metrics v0.33.0 h1:sKe5sC9qb1RakMhs8LWYNuN2ne6OTCWexj8Jos3rO2Y=
2620+
k8s.io/metrics v0.33.0/go.mod h1:XewckTFXmE2AJiP7PT3EXaY7hi7bler3t2ZLyOdQYzU=
26232621
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
26242622
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
26252623
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=

internal/client/gvrs.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ var (
2020
NodeGVR = NewGVR("v1/nodes")
2121
SvcGVR = NewGVR("v1/services")
2222

23+
// Discovery...
24+
EpsGVR = NewGVR("discovery.k8s.io/v1/endpointslices")
25+
2326
// Autoscaling...
2427
HpaGVR = NewGVR("autoscaling/v1/horizontalpodautoscalers")
2528

internal/model/pulse.go

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@ package model
33
import (
44
"context"
55
"fmt"
6-
"time"
76

87
"github.com/derailed/k9s/internal"
98
"github.com/derailed/k9s/internal/client"
109
"github.com/derailed/k9s/internal/dao"
1110
"github.com/derailed/k9s/internal/health"
1211
)
1312

14-
const defaultRefreshRate = 1 * time.Minute
15-
1613
// PulseListener represents a health model listener.
1714
type PulseListener interface {
1815
// PulseChanged notifies the model data changed.
1916
PulseChanged(*health.Check)
2017

21-
// TreeFailed notifies the health check failed.
18+
// PulseFailed notifies the health check failed.
2219
PulseFailed(error)
2320

2421
// MetricsChanged update metrics time series.
@@ -27,18 +24,16 @@ type PulseListener interface {
2724

2825
// Pulse tracks multiple resources health.
2926
type Pulse struct {
30-
gvr *client.GVR
31-
namespace string
32-
listeners []PulseListener
33-
refreshRate time.Duration
34-
health *PulseHealth
27+
gvr *client.GVR
28+
namespace string
29+
listeners []PulseListener
30+
health *PulseHealth
3531
}
3632

3733
// NewPulse returns a new pulse.
3834
func NewPulse(gvr *client.GVR) *Pulse {
3935
return &Pulse{
40-
gvr: gvr,
41-
refreshRate: defaultRefreshRate,
36+
gvr: gvr,
4237
}
4338
}
4439

internal/model/pulse_health.go

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
"github.com/derailed/k9s/internal/dao"
1111
"github.com/derailed/k9s/internal/render"
1212
"github.com/derailed/k9s/internal/slogs"
13+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14+
"k8s.io/apimachinery/pkg/runtime"
1315
)
1416

1517
const pulseRate = 15 * time.Second
@@ -96,6 +98,7 @@ func (h *PulseHealth) Watch(ctx context.Context, ns string) HealthChan {
9698
}
9799

98100
func (h *PulseHealth) checkPulse(ctx context.Context, ns string, c HealthChan) error {
101+
slog.Debug("Checking pulses...")
99102
for _, gvr := range PulseGVRs {
100103
check, err := h.check(ctx, ns, gvr)
101104
if err != nil {
@@ -110,8 +113,8 @@ func (h *PulseHealth) check(ctx context.Context, ns string, gvr *client.GVR) (He
110113
meta, ok := Registry[gvr]
111114
if !ok {
112115
meta = ResourceMeta{
113-
DAO: &dao.Table{},
114-
Renderer: &render.Generic{},
116+
DAO: new(dao.Table),
117+
Renderer: new(render.Table),
115118
}
116119
}
117120
if meta.DAO == nil {
@@ -124,11 +127,31 @@ func (h *PulseHealth) check(ctx context.Context, ns string, gvr *client.GVR) (He
124127
return HealthPoint{}, err
125128
}
126129
c := HealthPoint{GVR: gvr, Total: len(oo)}
127-
for _, o := range oo {
128-
if err := meta.Renderer.Healthy(ctx, o); err != nil {
129-
c.Faults++
130+
if isTable(oo) {
131+
ta := oo[0].(*metav1.Table)
132+
c.Total = len(ta.Rows)
133+
for _, row := range ta.Rows {
134+
if err := meta.Renderer.Healthy(ctx, row); err != nil {
135+
c.Faults++
136+
}
137+
}
138+
} else {
139+
for _, o := range oo {
140+
if err := meta.Renderer.Healthy(ctx, o); err != nil {
141+
c.Faults++
142+
}
130143
}
131144
}
145+
slog.Debug("Checked", slogs.GVR, gvr, slogs.Config, c)
132146

133147
return c, nil
134148
}
149+
150+
func isTable(oo []runtime.Object) bool {
151+
if len(oo) == 0 || len(oo) > 1 {
152+
return false
153+
}
154+
_, ok := oo[0].(*metav1.Table)
155+
156+
return ok
157+
}

internal/model/registry.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ var Registry = map[*client.GVR]ResourceMeta{
8484
Renderer: new(render.Alias),
8585
},
8686

87+
// Discovery...
88+
client.EpsGVR: {
89+
Renderer: new(render.EndpointSlice),
90+
},
91+
8792
// Core...
8893
client.EpGVR: {
8994
Renderer: new(render.Endpoints),
@@ -124,6 +129,7 @@ var Registry = map[*client.GVR]ResourceMeta{
124129
Renderer: new(render.PersistentVolumeClaim),
125130
},
126131
client.EvGVR: {
132+
DAO: new(dao.Table),
127133
Renderer: new(render.Event),
128134
},
129135

0 commit comments

Comments
 (0)