From 801f45d703b97c898d2e8e5ff43deaffead8df4c Mon Sep 17 00:00:00 2001 From: derailed Date: Tue, 14 Apr 2020 11:19:12 -0600 Subject: [PATCH] fix issues #665, #662 --- Dockerfile | 2 +- Makefile | 2 +- change_logs/release_v0.19.2.md | 36 +++++++++++++++++++++++++++++++++ go.mod | 1 - go.sum | 11 ---------- internal/render/row_event.go | 1 + internal/ui/table_helper.go | 3 ++- internal/view/alias_test.go | 2 +- internal/view/command.go | 2 ++ internal/view/secret.go | 2 +- internal/view/table_int_test.go | 5 +++-- 11 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 change_logs/release_v0.19.2.md diff --git a/Dockerfile b/Dockerfile index 8dd34198..fa8c4186 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apk --no-cache add make git gcc libc-dev curl && make build FROM alpine:3.10.0 COPY --from=build /k9s/execs/k9s /bin/k9s -ENV KUBE_LATEST_VERSION="v1.16.2" +ENV KUBE_LATEST_VERSION="v1.18.1" RUN apk add --update ca-certificates \ && apk add --update -t deps curl \ && curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \ diff --git a/Makefile b/Makefile index 2a039b2e..ab93a4ed 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PACKAGE := github.com/derailed/$(NAME) GIT := $(shell git rev-parse --short HEAD) SOURCE_DATE_EPOCH ?= $(shell date +%s) DATE := $(shell date -u -d @${SOURCE_DATE_EPOCH} +%FT%T%Z) -VERSION ?= v0.17.6 +VERSION ?= v0.19.1 IMG_NAME := derailed/k9s IMAGE := ${IMG_NAME}:${VERSION} diff --git a/change_logs/release_v0.19.2.md b/change_logs/release_v0.19.2.md new file mode 100644 index 00000000..0da7e168 --- /dev/null +++ b/change_logs/release_v0.19.2.md @@ -0,0 +1,36 @@ + + +# Release v0.19.2 + +## 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 is as ever very much noticed and appreciated! + +Also if you dig this tool, please consider sponsoring 👆us 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) + +--- + +## A Word From Our Sponsors... + +It makes me always very happy to hear folks are digging this effort and using K9s daily! If you feel this way please tell us and consider joining our [sponsorship](https://github.com/sponsors/derailed) program. + +Big Thank You! to the following folks for joining our program: + +* [Nick Hobart](https://github.com/nwhobart) +* [Shopeonarope](https://github.com/shopeonarope) + +Maintenance Release! + +NOTE! During K9s update to support the latest version of Kubernetes (v1.18), K9s Helm charts support took one for the team ;( At this time Helm as yet to be released k8s v1.18 support. We will track for updates and enable this feature once HelmV3 releases it. + +## Resolved Bugs/Features/PRs + +* [Issue #665](https://github.com/derailed/k9s/issues/665) +* [Issue #662](https://github.com/derailed/k9s/issues/662) +* [PR #660](https://github.com/derailed/k9s/pull/660) Thank you! [Tomáš Pospíšek](https://github.com/tpo) + +--- + + © 2020 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/go.mod b/go.mod index f982f4b0..80ae9d1d 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,6 @@ require ( k8s.io/klog v1.0.0 k8s.io/kubectl v0.18.0 k8s.io/metrics v0.18.0 - rsc.io/letsencrypt v0.0.3 // indirect sigs.k8s.io/yaml v1.2.0 vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787 ) diff --git a/go.sum b/go.sum index 67b835b3..8eb6f1b9 100644 --- a/go.sum +++ b/go.sum @@ -126,12 +126,8 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/deislabs/oras v0.8.1 h1:If674KraJVpujYR00rzdi0QAmW4BxzMJPVAZJKuhQ0c= github.com/deislabs/oras v0.8.1/go.mod h1:Mx0rMSbBNaNfY9hjpccEnxkOqJL6KGjtxNHPLC4G4As= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/derailed/popeye v0.8.0 h1:D+5fHiMmuXqaF5J2bJTI+YLrD77ag5Wb1dkAuR4bPGI= -github.com/derailed/popeye v0.8.0/go.mod h1:OBHcJDa50VpE9QNyOU243bNOtHb29MyLlVHJolwlwas= github.com/derailed/popeye v0.8.1 h1:N69XH0NZTBkrNj8qvUzy6Z6bP7+jx0AwollETqvc3dc= github.com/derailed/popeye v0.8.1/go.mod h1:OBHcJDa50VpE9QNyOU243bNOtHb29MyLlVHJolwlwas= -github.com/derailed/tview v0.3.9 h1:6iUtOmzN6gdk6yx1KNSwhMgrsLYjgldduulKPqHnqwk= -github.com/derailed/tview v0.3.9/go.mod h1:GJ3k/TIzEE+sj1L09/usk6HrkjsdadSsb03eHgPbcII= github.com/derailed/tview v0.3.10 h1:n+iQwYh9Ff9STdR5hBhp+rTJRlu59q2xP2pHvwQbYPw= github.com/derailed/tview v0.3.10/go.mod h1:GJ3k/TIzEE+sj1L09/usk6HrkjsdadSsb03eHgPbcII= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -384,7 +380,6 @@ github.com/mattn/go-runewidth v0.0.5/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.9/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= @@ -710,7 +705,6 @@ google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiq google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= @@ -750,13 +744,10 @@ k8s.io/api v0.18.0 h1:lwYk8Vt7rsVTwjRU6pzEsa9YNhThbmbocQlKvNBB4EQ= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/apiextensions-apiserver v0.17.2 h1:cP579D2hSZNuO/rZj9XFRzwJNYb41DbNANJb6Kolpss= k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= -k8s.io/apiextensions-apiserver v0.18.0 h1:HN4/P8vpGZFvB5SOMuPPH2Wt9Y/ryX+KRvIyAkchu1Q= -k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= k8s.io/apimachinery v0.18.0 h1:fuPfYpk3cs1Okp/515pAf0dNhL66+8zk8RLbSX+EgAE= k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo= -k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= k8s.io/cli-runtime v0.17.2/go.mod h1:aa8t9ziyQdbkuizkNLAw3qe3srSyWh9zlSB7zTqRNPI= k8s.io/cli-runtime v0.18.0 h1:jG8XpSqQ5TrV0N+EZ3PFz6+gqlCk71dkggWCCq9Mq34= k8s.io/cli-runtime v0.18.0/go.mod h1:1eXfmBsIJosjn9LjEBUd2WVPoPAY9XGTqTFcPMIBsUQ= @@ -793,8 +784,6 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= diff --git a/internal/render/row_event.go b/internal/render/row_event.go index aa7988da..108c114c 100644 --- a/internal/render/row_event.go +++ b/internal/render/row_event.go @@ -165,6 +165,7 @@ func (r RowEvents) Sort(ns string, sortCol int, ageCol bool, asc bool) { if sortCol == -1 { return } + t := RowEventSorter{NS: ns, Events: r, Index: sortCol, Asc: asc} sort.Sort(t) diff --git a/internal/ui/table_helper.go b/internal/ui/table_helper.go index 76551212..2d3f02b2 100644 --- a/internal/ui/table_helper.go +++ b/internal/ui/table_helper.go @@ -149,7 +149,8 @@ func rxFilter(q string, data render.TableData) (render.TableData, error) { Namespace: data.Namespace, } for _, re := range data.RowEvents { - if rx.MatchString(re.Row.ID) { + fields := strings.Join(re.Row.Fields, " ") + if rx.MatchString(fields) { filtered.RowEvents = append(filtered.RowEvents, re) } } diff --git a/internal/view/alias_test.go b/internal/view/alias_test.go index 66128bbc..61782272 100644 --- a/internal/view/alias_test.go +++ b/internal/view/alias_test.go @@ -35,7 +35,7 @@ func TestAliasSearch(t *testing.T) { v.App().Prompt().SendStrokes("blee") assert.Equal(t, 3, v.GetTable().GetColumnCount()) - assert.Equal(t, 1, v.GetTable().GetRowCount()) + assert.Equal(t, 2, v.GetTable().GetRowCount()) } func TestAliasGoto(t *testing.T) { diff --git a/internal/view/command.go b/internal/view/command.go index 3ed5ecb5..58ba3337 100644 --- a/internal/view/command.go +++ b/internal/view/command.go @@ -135,6 +135,8 @@ func (c *Command) run(cmd, path string, clearStack bool) error { } switch cmds[0] { + case "chart", "charts": + return fmt.Errorf("Command no longer supported. Awaiting helm release for k8s v1.18!") case "ctx", "context", "contexts": if len(cmds) == 2 { return useContext(c.app, cmds[1]) diff --git a/internal/view/secret.go b/internal/view/secret.go index b008c97a..b76948fd 100644 --- a/internal/view/secret.go +++ b/internal/view/secret.go @@ -62,7 +62,7 @@ func (s *Secret) decodeCmd(evt *tcell.EventKey) *tcell.EventKey { return nil } - details := NewDetails(s.App(), "Secret Decoder", path, false).Update(string(raw)) + details := NewDetails(s.App(), "Secret Decoder", path, true).Update(string(raw)) if err := s.App().inject(details); err != nil { s.App().Flash().Err(err) } diff --git a/internal/view/table_int_test.go b/internal/view/table_int_test.go index 5ff77a5f..737c5b88 100644 --- a/internal/view/table_int_test.go +++ b/internal/view/table_int_test.go @@ -65,10 +65,11 @@ func TestTableViewFilter(t *testing.T) { v := NewTable(client.NewGVR("test")) v.Init(makeContext()) v.SetModel(&testTableModel{}) + v.Refresh() v.CmdBuff().SetActive(true) v.CmdBuff().SetText("blee") - v.Refresh() - assert.Equal(t, 1, v.GetRowCount()) + + assert.Equal(t, 2, v.GetRowCount()) } func TestTableViewSort(t *testing.T) {