diff --git a/Makefile b/Makefile index 3a6c7e0e..098d42e4 100644 --- a/Makefile +++ b/Makefile @@ -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.27.3 +VERSION ?= v0.27.4 IMG_NAME := derailed/k9s IMAGE := ${IMG_NAME}:${VERSION} diff --git a/README.md b/README.md index 03c5f805..9078a8dd 100644 --- a/README.md +++ b/README.md @@ -913,6 +913,8 @@ to make this project a reality! * email fernand@imhotep.io * twitter [@kitesurfer](https://twitter.com/kitesurfer?lang=en) +* [Aleksei Romanenko](https://github.com/slimus) + We always enjoy hearing from folks who benefit from our work! ## Contributions Guideline diff --git a/change_logs/release_v0.27.4.md b/change_logs/release_v0.27.4.md new file mode 100644 index 00000000..6d63b6c6 --- /dev/null +++ b/change_logs/release_v0.27.4.md @@ -0,0 +1,74 @@ + + +# Release v0.27.4 + +## 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) + +--- +## Core Team... + +Please help me welcome Aleksei Romanenko(https://github.com/slimus) to the K9s contributor team!! +Alex is very knowledgeable in this space, kind and a great human being! +He has been instrumental with issues, prs and fielding questions in forums and slack. + +🎉 Welcome Alex!!🎉 + +--- + +## A Word From Our Sponsors... + +To all the good folks below that opted to `pay it forward` and join our sponsorship program, I salute you!! + +* [Jon Walton](https://github.com/jon-walton) +* [gmbnomis](https://github.com/gmbnomis) +* [Alex Viscreanu](https://github.com/aexvir) +* [Björn Petersen](https://github.com/BjoernPetersen) +* [Tanner Watson](https://github.com/tannerwatson) +* [Jabunovoty](https://github.com/jabunovoty) +* [Joey Guerra](https://github.com/joeyguerra) +* [Materialize Inc](https://github.com/MaterializeInc) +* [Kijana Woodard](https://github.com/kijanawoodard) +* [Tom Saleeba](https://github.com/tomsaleeba) +* [William Alexander](https://github.com/carpetfuz) +* [Süddeutsche Zeitung](https://github.com/sueddeutsche) + +> Sponsorship cancellations since the last release: `12` ;( + +--- + +## Maintenance Release + +--- + +## Resolved Issues + +* [Issue #2072](https://github.com/derailed/k9s/issues/2072) Triggered Job from cronjob is missing annotations +* [Issue #2024](https://github.com/derailed/k9s/issues/2024) Allow customization of log indicators with skin theme +* [Issue #1971](https://github.com/derailed/k9s/issues/1971) Zip binary for windows + +--- + +## Contributed PRs + +Please give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!! + +* [PR #2073](https://github.com/derailed/k9s/pull/2073) Fix for missing Job annotations created from Cronjob +* [PR #2069](https://github.com/derailed/k9s/pull/2069) Unify all go version to 1.20 +* [PR #2067](https://github.com/derailed/k9s/pull/2067) Create narsingh skin +* [PR #2054](https://github.com/derailed/k9s/pull/2054) Update setup-go action, with caching +* [PR #2045](https://github.com/derailed/k9s/pull/2045) Fix: (views) use saved context view when switching +* [PR #2041](https://github.com/derailed/k9s/pull/2041) Feat: allow customization of log indicator toggles +* [PR #2030](https://github.com/derailed/k9s/pull/2030) Updated monokai skin with help styles, and more monokai appropriate colors +* [PR #2027](https://github.com/derailed/k9s/pull/2027) Roles are rendered using same colorer function from skin +* [PR #2045](https://github.com/derailed/k9s/pull/2045) Fix: (views) use saved context view when switching\ +* [PR #2011](https://github.com/derailed/k9s/pull/2011) Fix #2007: Remove debug command + +--- + + © 2023 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 07643343..5954f3c5 100644 --- a/go.mod +++ b/go.mod @@ -21,14 +21,14 @@ require ( github.com/sahilm/fuzzy v0.1.0 github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.2 - golang.org/x/text v0.9.0 + golang.org/x/text v0.8.0 gopkg.in/yaml.v2 v2.4.0 - helm.sh/helm/v3 v3.11.3 - k8s.io/api v0.26.2 + helm.sh/helm/v3 v3.11.1 + k8s.io/api v0.27.0 k8s.io/apiextensions-apiserver v0.26.1 - k8s.io/apimachinery v0.26.2 + k8s.io/apimachinery v0.27.0 k8s.io/cli-runtime v0.26.1 - k8s.io/client-go v0.26.2 + k8s.io/client-go v0.27.0 k8s.io/klog/v2 v2.90.1 k8s.io/kubectl v0.26.1 k8s.io/metrics v0.26.2 @@ -68,12 +68,12 @@ require ( github.com/go-gorp/gorp/v3 v3.0.5 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -83,8 +83,6 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect @@ -99,7 +97,7 @@ require ( github.com/lib/pq v1.10.7 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -114,7 +112,7 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo v1.16.5 // indirect - github.com/onsi/gomega v1.23.0 // indirect + github.com/onsi/gomega v1.27.4 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect @@ -139,11 +137,11 @@ require ( go.opentelemetry.io/otel/trace v1.14.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.4.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.5.0 // indirect + golang.org/x/term v0.6.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect @@ -153,10 +151,10 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiserver v0.26.2 // indirect k8s.io/component-base v0.26.2 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect + k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect oras.land/oras-go v1.2.2 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.12.1 // indirect sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect diff --git a/go.sum b/go.sum index 76a5545f..4a59894a 100644 --- a/go.sum +++ b/go.sum @@ -158,7 +158,6 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -213,17 +212,16 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= @@ -270,8 +268,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -310,6 +309,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -336,13 +336,11 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -431,10 +429,8 @@ github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI= github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= github.com/markbates/oncer v1.0.0 h1:E83IaVAHygyndzPimgUYJjbshhDTALZyXxvk9FOlQRY= @@ -508,7 +504,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nelsam/hel/v2 v2.3.2/go.mod h1:1ZTGfU2PFTOd5mx22i5O0Lc2GY933lQ2wb/ggy+rL3w= github.com/nelsam/hel/v2 v2.3.3/go.mod h1:1ZTGfU2PFTOd5mx22i5O0Lc2GY933lQ2wb/ggy+rL3w= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -518,11 +513,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= -github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= +github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= @@ -592,8 +587,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= @@ -652,6 +647,7 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -804,8 +800,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -918,8 +914,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -931,8 +927,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -994,7 +990,7 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1114,7 +1110,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1142,8 +1137,8 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -helm.sh/helm/v3 v3.11.3 h1:n1X5yaQTP5DYywlBOZMl2gX398Gp6YwFp/IAVj6+5D4= -helm.sh/helm/v3 v3.11.3/go.mod h1:S+sOdQc3BLvt09a9rSlKKVs9x0N/yx+No0y3qFw+FQ8= +helm.sh/helm/v3 v3.11.1 h1:cmL9fFohOoNQf+wnp2Wa0OhNFH0KFnSzEkVxi3fcc3I= +helm.sh/helm/v3 v3.11.1/go.mod h1:z/Bu/BylToGno/6dtNGuSmjRqxKq5gaH+FU0BPO+AQ8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1151,24 +1146,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.2 h1:dM3cinp3PGB6asOySalOZxEG4CZ0IAdJsrYZXE/ovGQ= -k8s.io/api v0.26.2/go.mod h1:1kjMQsFE+QHPfskEcVNgL3+Hp88B80uj0QtSOlj8itU= +k8s.io/api v0.27.0 h1:2owttiA8Oa+J3idFeq8TSnNpm4y6AOGPI3PDbIpp2cE= +k8s.io/api v0.27.0/go.mod h1:Wl+QRvQlh+T8SK5f4F6YBhhyH6hrFO08nl74xZb1MUE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= -k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= +k8s.io/apimachinery v0.27.0 h1:vEyy/PVMbPMCPutrssCVHCf0JNZ0Px+YqPi82K2ALlk= +k8s.io/apimachinery v0.27.0/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= k8s.io/apiserver v0.26.2 h1:Pk8lmX4G14hYqJd1poHGC08G03nIHVqdJMR0SD3IH3o= k8s.io/apiserver v0.26.2/go.mod h1:GHcozwXgXsPuOJ28EnQ/jXEM9QeG6HT22YxSNmpYNh8= k8s.io/cli-runtime v0.26.1 h1:f9+bRQ1V3elQsx37KmZy5fRAh56mVLbE9A7EMdlqVdI= k8s.io/cli-runtime v0.26.1/go.mod h1:+e5Ym/ARySKscUhZ8K3hZ+ZBo/wYPIcg+7b5sFYi6Gg= -k8s.io/client-go v0.26.2 h1:s1WkVujHX3kTp4Zn4yGNFK+dlDXy1bAAkIl+cFAiuYI= -k8s.io/client-go v0.26.2/go.mod h1:u5EjOuSyBa09yqqyY7m3abZeovO/7D/WehVVlZ2qcqU= +k8s.io/client-go v0.27.0 h1:DyZS1fJkv73tEy7rWv4VF6NwGeJ7SKvNaLRXZBYLA+4= +k8s.io/client-go v0.27.0/go.mod h1:XVEmpNnM+4JYO3EENoFV/ZDv3KxKVJUnzGo70avk+C4= k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= +k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= k8s.io/kubectl v0.26.1 h1:K8A0Jjlwg8GqrxOXxAbjY5xtmXYeYjLU96cHp2WMQ7s= k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= k8s.io/metrics v0.26.2 h1:2gUvUWWnHPdE2tyA5DvyHC8HGryr+izhY9i5dzLP06s= @@ -1180,8 +1175,8 @@ oras.land/oras-go v1.2.2/go.mod h1:Apa81sKoZPpP7CDciE006tSZ0x3Q3+dOoBcMZ/aNxvw= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= diff --git a/internal/client/config.go b/internal/client/config.go index 9ec5fdd3..bb6d63f9 100644 --- a/internal/client/config.go +++ b/internal/client/config.go @@ -149,8 +149,18 @@ func (c *Config) RenameContext(old string, new string) error { if err != nil { return err } + if err := clientcmd.ModifyConfig(acc, cfg, true); err != nil { + return err + } + current, err := c.CurrentContextName() + if err != nil { + return err + } + if current == old { + return c.SwitchContext(new) + } - return clientcmd.ModifyConfig(acc, cfg, true) + return nil } // ContextNames fetch all available contexts. diff --git a/internal/config/config.go b/internal/config/config.go index 8c13c6fd..d6ed48f6 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -87,18 +87,23 @@ func (c *Config) Refine(flags *genericclioptions.ConfigFlags, k9sFlags *Flags, c } context, ok := cc[c.K9s.CurrentContext] if !ok { - return fmt.Errorf("The specified context %q does not exists in kubeconfig", c.K9s.CurrentContext) + return fmt.Errorf("the specified context %q does not exists in kubeconfig", c.K9s.CurrentContext) } c.K9s.CurrentCluster = context.Cluster c.K9s.ActivateCluster(context.Namespace) var ns = client.DefaultNamespace - if k9sFlags != nil && IsBoolSet(k9sFlags.AllNamespaces) { + switch { + case k9sFlags != nil && IsBoolSet(k9sFlags.AllNamespaces): ns = client.NamespaceAll - } else if isSet(flags.Namespace) { + case isSet(flags.Namespace): ns = *flags.Namespace - } else { - ns = context.Namespace + default: + if nss := context.Namespace; nss != "" { + ns = nss + } else if nss == "" { + ns = c.K9s.ActiveCluster().Namespace.Active + } } if err := c.SetActiveNamespace(ns); err != nil { diff --git a/internal/model/cmd_buff.go b/internal/model/cmd_buff.go index 06b59d00..2a35947b 100644 --- a/internal/model/cmd_buff.go +++ b/internal/model/cmd_buff.go @@ -61,7 +61,11 @@ func (c *CmdBuff) InCmdMode() bool { c.mx.RLock() defer c.mx.RUnlock() - return c.active || len(c.buff) > 0 + if !c.active { + return false + } + + return len(c.buff) > 0 } // IsActive checks if command buffer is active. diff --git a/internal/model/fish_buff.go b/internal/model/fish_buff.go index ab92f4de..77098df9 100644 --- a/internal/model/fish_buff.go +++ b/internal/model/fish_buff.go @@ -70,6 +70,9 @@ func (f *FishBuff) NextSuggestion() (string, bool) { // ClearSuggestions clear out all suggestions. func (f *FishBuff) ClearSuggestions() { + if len(f.suggestions) > 0 { + f.suggestions = f.suggestions[:0] + } f.suggestionIndex = -1 } diff --git a/internal/view/context.go b/internal/view/context.go index 2514b473..fd57b741 100644 --- a/internal/view/context.go +++ b/internal/view/context.go @@ -2,6 +2,7 @@ package view import ( "errors" + "fmt" "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" @@ -62,21 +63,25 @@ func (c *Context) renameDialogCallback(form *tview.Form, contextName string) err return nil } -func (c *Context) showRenameModal(a *App, name string, ok func(form *tview.Form, contextName string)(error)) { +func (c *Context) showRenameModal(a *App, name string, ok func(form *tview.Form, contextName string) error) { p := a.Content.Pages f := c.makeStyledForm() f.AddInputField(inputField, name, 0, nil, nil). - AddButton("OK", func() { - if err := ok(f, name); err != nil { - c.App().Flash().Err(err) - return - } - p.RemovePage(renamePage) - }). - AddButton("Cancel", func() { + AddButton("OK", func() { + if err := ok(f, name); err != nil { + c.App().Flash().Err(err) + return + } + p.RemovePage(renamePage) + }). + AddButton("Cancel", func() { + p.RemovePage(renamePage) + }) + m := tview.NewModalForm("", f) + m.SetText(fmt.Sprintf("Rename context %q?", name)) + m.SetDoneFunc(func(int, string) { p.RemovePage(renamePage) }) - m := tview.NewModalForm("", f) p.AddPage(renamePage, m, false, false) p.ShowPage(renamePage) } diff --git a/internal/view/log_indicator.go b/internal/view/log_indicator.go index f640acef..bd685910 100644 --- a/internal/view/log_indicator.go +++ b/internal/view/log_indicator.go @@ -6,6 +6,7 @@ import ( "github.com/derailed/k9s/internal/config" "github.com/derailed/tview" + "github.com/rs/zerolog/log" ) const spacer = " " @@ -113,40 +114,45 @@ func (l *LogIndicator) reset() { func (l *LogIndicator) Refresh() { l.reset() - toggleOnFormat := "[::b]%s:[" + string(l.styles.K9s.Views.Log.Indicator.ToggleOnColor) + "::b]On[-::] %s" - toggleOffFormat := "[::b]%s:[" + string(l.styles.K9s.Views.Log.Indicator.ToggleOffColor) + "::d]Off[-::]%s" + var ( + toggleFmt = "[::b]%s:[" + toggleOnFmt = toggleFmt + string(l.styles.K9s.Views.Log.Indicator.ToggleOnColor) + "::b]On[-::] %s" + toggleOffFmt = toggleFmt + string(l.styles.K9s.Views.Log.Indicator.ToggleOffColor) + "::d]Off[-::]%s" + ) if l.shouldDisplayAllContainers { if l.allContainers { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFormat, "AllContainers", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFmt, "AllContainers", spacer)...) } else { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFormat, "AllContainers", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFmt, "AllContainers", spacer)...) } } if l.AutoScroll() { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFormat, "Autoscroll", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFmt, "Autoscroll", spacer)...) } else { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFormat, "Autoscroll", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFmt, "Autoscroll", spacer)...) } if l.FullScreen() { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFormat, "FullScreen", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFmt, "FullScreen", spacer)...) } else { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFormat, "FullScreen", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFmt, "FullScreen", spacer)...) } if l.Timestamp() { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFormat, "Timestamps", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFmt, "Timestamps", spacer)...) } else { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFormat, "Timestamps", spacer)...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFmt, "Timestamps", spacer)...) } if l.TextWrap() { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFormat, "Wrap", "")...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOnFmt, "Wrap", "")...) } else { - l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFormat, "Wrap", "")...) + l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFmt, "Wrap", "")...) } + log.Debug().Msgf("INDICATOR: %q", l.indicator) + _, _ = l.Write(l.indicator) } diff --git a/skins/axual.yml b/skins/axual.yml index 16c50f47..bc7b8701 100644 --- a/skins/axual.yml +++ b/skins/axual.yml @@ -1,5 +1,8 @@ +# ----------------------------------------------------------------------------- # Axual Skin contributed by [@JayKus](jimmy@axual.com) -# Style +# ----------------------------------------------------------------------------- + +# Styles... blue: &blue "#113851" red: &red "#D7595F" yellow: &yellow "#F2BF40" @@ -7,7 +10,7 @@ cyan: &cyan "#47B0AB" grey: &grey "#A99688" light: &light "#F1EFE4" -# Skin +# Skin... k9s: # General K9s styles body: @@ -108,6 +111,8 @@ k9s: indicator: fgColor: *red bgColor: *blue + toggleOnColor: *green + toggleOffColor: *grey # Chart drawing charts: diff --git a/skins/black_and_wtf.yml b/skins/black_and_wtf.yml index f117a248..2b903ad7 100644 --- a/skins/black_and_wtf.yml +++ b/skins/black_and_wtf.yml @@ -1,3 +1,7 @@ +# ----------------------------------------------------------------------------- +# BlackAndWtf skin +# ----------------------------------------------------------------------------- + # Styles... fg: &fg "white" bg: &bg "black" @@ -11,7 +15,7 @@ err: &err "pink" slate: &slate "slategray" gray: &gray "gray" -# Skin +# Skin... k9s: body: fgColor: *fg @@ -85,6 +89,8 @@ k9s: indicator: fgColor: *ghost bgColor: *bg + toggleOnColor: *mark + toggleOffColor: gray charts: bgColor: default defaultDialColors: diff --git a/skins/dracula.yml b/skins/dracula.yml index 4bc48b00..41ca3b0a 100644 --- a/skins/dracula.yml +++ b/skins/dracula.yml @@ -1,3 +1,7 @@ +# ----------------------------------------------------------------------------- +# Dracula skin +# ----------------------------------------------------------------------------- + # Styles... foreground: &foreground "#f8f8f2" background: &background "#282a36" @@ -107,3 +111,5 @@ k9s: indicator: fgColor: *foreground bgColor: *purple + toggleOnColor: *green + toggleOffColor: *blue \ No newline at end of file diff --git a/skins/gruvbox-dark.yml b/skins/gruvbox-dark.yml index 99d69615..d3bd8e4c 100644 --- a/skins/gruvbox-dark.yml +++ b/skins/gruvbox-dark.yml @@ -1,4 +1,9 @@ -# K9s Gruvbox Dark Skin Contributed by [@indiebrain](https://github.com/indiebrain) +# ----------------------------------------------------------------------------- +# K9s Gruvbox Dark Skin +# Author: [@indiebrain](https://github.com/indiebrain) +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#ebdbb2" background: &background "#272727" current_line: ¤t_line "#ebdbb2" diff --git a/skins/gruvbox-light.yml b/skins/gruvbox-light.yml index 216b7049..65bc8c30 100644 --- a/skins/gruvbox-light.yml +++ b/skins/gruvbox-light.yml @@ -1,4 +1,9 @@ -# K9s Gruvbox Light Skin Contributed by [@indiebrain](https://github.com/indiebrain) +# ----------------------------------------------------------------------------- +# K9s Gruvbox Light Skin +# Author: [@indiebrain](https://github.com/indiebrain) +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#3c3735" background: &background "#fbf1c7" current_line: ¤t_line "#ebdbb2" @@ -98,3 +103,5 @@ k9s: indicator: fgColor: *foreground bgColor: *background + toggleOnColor: *magenta + toggleOffColor: *blue diff --git a/skins/in_the_navy.yml b/skins/in_the_navy.yml index 7a3dbba8..2b6f4ad4 100644 --- a/skins/in_the_navy.yml +++ b/skins/in_the_navy.yml @@ -1,5 +1,8 @@ -# Styles... +# ----------------------------------------------------------------------------- +# In the Navy +# ----------------------------------------------------------------------------- +# Styles... fg: &fg "dodgerblue" bg: &bg "white" blue: &blue "blue" @@ -101,3 +104,5 @@ k9s: indicator: fgColor: *dark bgColor: *bg + toggleOnColor: *steel + toggleOffColor: *blue diff --git a/skins/kiss.yml b/skins/kiss.yml index 771ca9e0..f8ba7a7d 100644 --- a/skins/kiss.yml +++ b/skins/kiss.yml @@ -1,4 +1,9 @@ -# K9s Kiss Skin Contributed by [@beejeebus](justin.p.randell@gmail.com) +# ----------------------------------------------------------------------------- +# K9s Kiss Skin +# Author: [@beejeebus](justin.p.randell@gmail.com) +# ----------------------------------------------------------------------------- + +# Skin... k9s: body: fgColor: default @@ -66,3 +71,5 @@ k9s: indicator: fgColor: default bgColor: default + toggleOnColor: default + toggleOffColor: default diff --git a/skins/monokai.yml b/skins/monokai.yml index d2f07926..91aaf502 100644 --- a/skins/monokai.yml +++ b/skins/monokai.yml @@ -1,4 +1,7 @@ -# monokai.yml +# ----------------------------------------------------------------------------- +# Monokai skin +# ----------------------------------------------------------------------------- + # Styles... foreground: &foreground "#ffffff" background: &background "default" @@ -24,7 +27,7 @@ k9s: logoColorInfo: *lightBlue logoColorWarn: *orange logoColorError: *magenta - + # Command prompt styles prompt: fgColor: *foreground @@ -60,7 +63,7 @@ k9s: border: fgColor: *darkGray focusColor: *darkGray - + menu: fgColor: *foreground keyColor: *magenta @@ -159,3 +162,5 @@ k9s: indicator: fgColor: *foreground bgColor: *backgroundOpaque + toggleOnColor: *green + toggleOffColor: *magenta diff --git a/skins/narsingh.yml b/skins/narsingh.yml index e7d0e454..d2aa74d8 100644 --- a/skins/narsingh.yml +++ b/skins/narsingh.yml @@ -1,5 +1,10 @@ +# ----------------------------------------------------------------------------- +# Narsingh skin +# ----------------------------------------------------------------------------- + +# Skin... k9s: -# General K9s styles + # General K9s styles body: fgColor: "#97979b" bgColor: "#282a36" @@ -80,3 +85,5 @@ k9s: indicator: fgColor: white bgColor: "#282a36" + toggleOnColor: "#ff5c57" + toggleOffColor: "#f3f99d" diff --git a/skins/nightfox.yml b/skins/nightfox.yml index f072b47b..6d144c69 100644 --- a/skins/nightfox.yml +++ b/skins/nightfox.yml @@ -1,6 +1,10 @@ +# ----------------------------------------------------------------------------- # K9s Nightfox Theme # Based on the Nightfox.nvim color scheme: # https://github.com/EdenEast/nightfox.nvim +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#cdcecf" background: &background "#192330" current_line: ¤t_line "#2b3b51" @@ -13,6 +17,7 @@ magenta: &magenta "#9d79d6" blue: &blue "#719cd6" red: &red "#c94f6d" +# Skin... k9s: body: fgColor: *foreground @@ -94,3 +99,5 @@ k9s: indicator: fgColor: *foreground bgColor: *selection + toggleOnColor: *margenta + toggleOffColor: *blue diff --git a/skins/nord.yml b/skins/nord.yml index 9092f42d..eb498b59 100644 --- a/skins/nord.yml +++ b/skins/nord.yml @@ -1,3 +1,8 @@ +# ----------------------------------------------------------------------------- +# Nord skin +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#DADEE8" background: &background "#30343F" current_line: ¤t_line "#383D4A" @@ -11,6 +16,7 @@ magenta: &magenta "#B48EAD" red: &red "#BF616A" yellow: &yellow "#EBCB8B" +# Skin... k9s: # General K9s styles body: @@ -105,6 +111,8 @@ k9s: indicator: fgColor: *foreground bgColor: *magenta + toggleOnColor: *magenta + toggleOffColor: *blue help: fgColor: *foreground bgColor: *background diff --git a/skins/one_dark.yml b/skins/one_dark.yml index 809fd782..fc9b0964 100644 --- a/skins/one_dark.yml +++ b/skins/one_dark.yml @@ -1,4 +1,8 @@ -# OneDark presets +# ----------------------------------------------------------------------------- +# OneDark Skin +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#abb2bf" background: &background "#282c34" black: &black "#080808" @@ -11,6 +15,7 @@ red: &red "#e06370" yellow: &yellow "#e5c07b" yellow_bright: &yellow_bright "#d19a66" +# Skin... k9s: body: fgColor: *foreground @@ -100,6 +105,8 @@ k9s: indicator: fgColor: *blue bgColor: *background + toggleOnColor: *red + toggleOffColor: *grey help: fgColor: *grey bgColor: *background diff --git a/skins/red.yml b/skins/red.yml index 7b977cff..19605231 100644 --- a/skins/red.yml +++ b/skins/red.yml @@ -1,3 +1,8 @@ +# ----------------------------------------------------------------------------- +# Red skin +# ----------------------------------------------------------------------------- + +# Skin... k9s: body: fgColor: red @@ -80,3 +85,5 @@ k9s: indicator: fgColor: red bgColor: black + toggleOnColor: red + toggleOffColor: white diff --git a/skins/rose_pine.yml b/skins/rose_pine.yml index 51b11711..f66aa81d 100644 --- a/skins/rose_pine.yml +++ b/skins/rose_pine.yml @@ -1,3 +1,7 @@ +# ----------------------------------------------------------------------------- +# Rose Pine skin +# ----------------------------------------------------------------------------- + # Styles... foreground: &foreground "#e0def4" background: &background "#191724" @@ -107,3 +111,5 @@ k9s: indicator: fgColor: *foreground bgColor: *purple + toggleOnColor: *pink + toggleOffColor: *purple diff --git a/skins/snazzy.yml b/skins/snazzy.yml index 03decefa..826d5e59 100644 --- a/skins/snazzy.yml +++ b/skins/snazzy.yml @@ -1,3 +1,8 @@ +# ----------------------------------------------------------------------------- +# Snazzy skin +# ----------------------------------------------------------------------------- + +# Skin... k9s: body: fgColor: "#97979b" @@ -79,3 +84,5 @@ k9s: indicator: fgColor: white bgColor: "#282a36" + toggleOnColor: "#ff5c57" + toggleOffColor: white diff --git a/skins/solarized_dark.yml b/skins/solarized_dark.yml index e249c16a..575406d8 100644 --- a/skins/solarized_dark.yml +++ b/skins/solarized_dark.yml @@ -1,4 +1,10 @@ -# Based on K9s Solarized Dark Skin Contributed by [@danmikita](danmikita@gmail.com) +# ----------------------------------------------------------------------------- +# Solarized Dark Skin +# Based on: K9s Solarized Dark Skin +# Author: [@danmikita](danmikita@gmail.com) +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#839495" background: &background "#002833" current_line: ¤t_line "#003440" @@ -11,6 +17,7 @@ magenta: &magenta "#d33582" blue: &blue "#2aa198" red: &red "#dc312e" +# Skin... k9s: body: fgColor: *foreground @@ -92,3 +99,5 @@ k9s: indicator: fgColor: *foreground bgColor: *selection + toggleOnColor: *magenta + toggleOffColor: *blue diff --git a/skins/solarized_light.yml b/skins/solarized_light.yml index f20d3c65..95a18117 100644 --- a/skins/solarized_light.yml +++ b/skins/solarized_light.yml @@ -1,4 +1,9 @@ -# K9s Solarized Light Skin Contributed by [@leg100](louisgarman@gmail.com) +# ----------------------------------------------------------------------------- +# Solarized Light Skin +# Author: [@leg100](louisgarman@gmail.com) +# ----------------------------------------------------------------------------- + +# Styles... foreground: &foreground "#657b83" background: &background "#fdf6e3" current_line: ¤t_line "#eee8d5" @@ -12,6 +17,7 @@ magenta: &magenta "#d33682" blue: &blue "#268bd2" red: &red "#dc322f" +# Skin... k9s: body: fgColor: *foreground @@ -94,3 +100,5 @@ k9s: indicator: fgColor: *foreground bgColor: *selection + toggleOnColor: *magenta + toggleOffColor: *blue diff --git a/skins/stock.yml b/skins/stock.yml index a89df755..89b8b9d5 100644 --- a/skins/stock.yml +++ b/skins/stock.yml @@ -1,3 +1,8 @@ +# ----------------------------------------------------------------------------- +# Stock skin +# ----------------------------------------------------------------------------- + +# Skin... k9s: body: fgColor: dodgerblue @@ -81,3 +86,5 @@ k9s: indicator: fgColor: dodgerblue bgColor: black + toggleOnColor: papayawhip + toggleOffColor: steelblue diff --git a/skins/transparent.yml b/skins/transparent.yml index 917dbc24..be0a72e0 100644 --- a/skins/transparent.yml +++ b/skins/transparent.yml @@ -1,4 +1,9 @@ +# ----------------------------------------------------------------------------- +# Transparent skin # Preserve your terminal session background color +# ----------------------------------------------------------------------------- + +# Skin... k9s: body: bgColor: default @@ -32,6 +37,8 @@ k9s: bgColor: default indicator: bgColor: default + toggleOnColor: default + toggleOffColor: default yaml: colonColor: default valueColor: default