Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
derailed committed Mar 31, 2021
1 parent 0b965eb commit d60054c
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 15 deletions.
42 changes: 42 additions & 0 deletions change_logs/release_v0.24.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s_small.png" align="right" width="200" height="auto"/>

# Release v0.24.7

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

If you feel K9s is helping your Kubernetes journey, please consider joining our [sponsorhip 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!

## Disturbance In The Farce.. Windows!

Splendid! So I had to borrow my neighbors kids 20 pounds windows `gaming` laptop for this one ;( Recent K9s drops are looking less than optimal on windows due to dependencies changes.
I was able to narrow it down to named colors are no longer being respected on Windows platforms. I'll keep digging on this but if you find yourself in the situation where K9s is looking less than optimal on Windows, for the short term please either use a custom skin with hex colors or change the stock skin to use hex color values vs named colors. Thank you!

## There are some that call me... Alpha!

K9s is still and will remain an open source software. As such it is free and we will continue to maintain this repo!

That said in order to support our efforts, we've recently launched [K9sAlpha](https://k9salpha.io) which is a freemium version of K9s. K9sAlpha unlocks additional features and enhancements.

If you would like to support us, you can either join our github sponsors or purchase a K9sAlpha license. If you are an active member of our github sponsorship program, you are eligible for a free K9sAlpha license. Please reach out for your shoe-phone and contact us for your personalized license key.

<img src="https://k9salpha.io/assets/k9salpha-blue.png" align="center" width="300" height="auto"/>

---

## Resolved Issues

* [Issue #1067](https://github.com/derailed/k9s/issues/1067) Increase HPA target column display
* [Issue #1061](https://github.com/derailed/k9s/issues/1061) Container shell Windows (Don't do windows so please help verify!)
* [Issue #1060](https://github.com/derailed/k9s/issues/1060) Exception when setting container image

## Resolved PRs

---

<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2020 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/derailed/k9s

go 1.16

replace github.com/derailed/tview => ../tview

replace (
github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible
Expand All @@ -12,7 +14,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cenkalti/backoff/v4 v4.1.0
github.com/derailed/popeye v0.9.0
github.com/derailed/tview v0.5.2
github.com/derailed/tview v0.5.3
github.com/drone/envsubst v1.0.2 // indirect
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
github.com/fatih/color v1.10.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xb
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
github.com/derailed/popeye v0.9.0 h1:0zP4BAzo94RUjrUkzgF962v0zL9B3xyopd7kU7tMxuc=
github.com/derailed/popeye v0.9.0/go.mod h1:g3hudQlbEEChCA7U44fA+utTM9xQpD4pINUMQaiq5Gs=
github.com/derailed/tview v0.5.2 h1:zrvgRdLODdRhOnhPq013KcXXb/tjXC2Z+MOtSmwqmCM=
github.com/derailed/tview v0.5.2/go.mod h1:Cd1rHezeTZDlze2WsQMuGFwiooP1bO0RttWj7XtZbFM=
github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
Expand Down
9 changes: 4 additions & 5 deletions internal/render/hpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,19 @@ func toMetricsV2b1(specs []autoscalingv2beta1.MetricSpec, statuses []autoscaling
return MissingValue
}

list, count := []string{}, 0
list := make([]string, 0, len(specs))
for i, spec := range specs {
list = append(list, checkHPAType(i, spec, statuses))
count++
}

max, more := 2, false
if count > max {
max, more := 10, false
if len(list) > max {
list, more = list[:max], true
}

ret := strings.Join(list, ", ")
if more {
return ret + " + " + strconv.Itoa(count-max) + "more..."
return ret + " + " + strconv.Itoa(len(list)-max) + "more..."
}

return ret
Expand Down
22 changes: 15 additions & 7 deletions internal/view/image_extender.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,34 @@ func (s *ImageExtender) setImageCmd(evt *tcell.EventKey) *tcell.EventKey {

s.Stop()
defer s.Start()
s.showImageDialog(path)
if err := s.showImageDialog(path); err != nil {
s.App().Flash().Err(err)
}

return nil
}

func (s *ImageExtender) showImageDialog(path string) {
confirm := tview.NewModalForm("<Set image>", s.makeSetImageForm(path))
func (s *ImageExtender) showImageDialog(path string) error {
form, err := s.makeSetImageForm(path)
if err != nil {
return err
}
confirm := tview.NewModalForm("<Set image>", form)
confirm.SetText(fmt.Sprintf("Set image %s %s", s.GVR(), path))
confirm.SetDoneFunc(func(int, string) {
s.dismissDialog()
})
s.App().Content.AddPage(imageKey, confirm, false, false)
s.App().Content.ShowPage(imageKey)

return nil
}

func (s *ImageExtender) makeSetImageForm(sel string) *tview.Form {
func (s *ImageExtender) makeSetImageForm(sel string) (*tview.Form, error) {
f := s.makeStyledForm()
podSpec, err := s.getPodSpec(sel)
if err != nil {
s.App().Flash().Err(err)
return nil
return nil, err
}
formContainerLines := make([]*imageFormSpec, 0, len(podSpec.InitContainers)+len(podSpec.Containers))
for _, spec := range podSpec.InitContainers {
Expand Down Expand Up @@ -126,7 +133,8 @@ func (s *ImageExtender) makeSetImageForm(sel string) *tview.Form {
f.AddButton("Cancel", func() {
s.dismissDialog()
})
return f

return f, nil
}

func (s *ImageExtender) dismissDialog() {
Expand Down

0 comments on commit d60054c

Please sign in to comment.