release v0.27.1 (#1945)
parent
b5a7cfb3af
commit
d5c9cf5ed5
|
|
@ -56,5 +56,10 @@ brews:
|
|||
folder: Formula
|
||||
homepage: https://k9scli.io/
|
||||
description: Kubernetes CLI To Manage Your Clusters In Style!
|
||||
install: |
|
||||
system "make", "build"
|
||||
bin.install "execs/k9s"
|
||||
|
||||
generate_completions_from_executable(bin/"k9s", "completion")
|
||||
test: |
|
||||
system "k9s version"
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -1,5 +1,6 @@
|
|||
GO_FLAGS ?=
|
||||
NAME := k9s
|
||||
GO_FLAGS ?=
|
||||
CGO_ENABLED?=0
|
||||
OUTPUT_BIN ?= execs/${NAME}
|
||||
PACKAGE := github.com/derailed/$(NAME)
|
||||
GIT_REV ?= $(shell git rev-parse --short HEAD)
|
||||
|
|
@ -9,7 +10,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.0
|
||||
VERSION ?= v0.27.1
|
||||
IMG_NAME := derailed/k9s
|
||||
IMAGE := ${IMG_NAME}:${VERSION}
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ cover: ## Run test coverage suite
|
|||
@go tool cover --html=cov.out
|
||||
|
||||
build: ## Builds the CLI
|
||||
@go build ${GO_FLAGS} \
|
||||
@CGO_ENABLED=${CGO_ENABLED} go build ${GO_FLAGS} \
|
||||
-ldflags "-w -s -X ${PACKAGE}/cmd.version=${VERSION} -X ${PACKAGE}/cmd.commit=${GIT_REV} -X ${PACKAGE}/cmd.date=${DATE}" \
|
||||
-a -tags netgo -o ${OUTPUT_BIN} main.go
|
||||
|
||||
|
|
|
|||
29
README.md
29
README.md
|
|
@ -39,21 +39,6 @@ Wanna discuss K9s features with your fellow `K9sers` or simply show your support
|
|||
* Channel: [K9ersSlack](https://k9sers.slack.com/)
|
||||
* Invite: [K9slackers Invite](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
|
||||
|
||||
---
|
||||
|
||||
## K8S Compatibility Matrix
|
||||
| k9s | k8s client |
|
||||
| ------------------ | ---------- |
|
||||
| v0.26.7 - v0.26.6 | 0.25.3 |
|
||||
| v0.26.5 - v0.26.4 | 0.25.1 |
|
||||
| v0.26.3 - v0.26.1 | 0.24.3 |
|
||||
| v0.26.0 - v0.25.19 | 0.24.2 |
|
||||
| v0.25.18 - v0.25.3 | 0.22.3 |
|
||||
| v0.25.2 - v0.25.0 | 0.22.0 |
|
||||
| <= v0.24 | 0.21.3 |
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
K9s is available on Linux, macOS and Windows platforms.
|
||||
|
|
@ -197,6 +182,20 @@ K9s is available on Linux, macOS and Windows platforms.
|
|||
|
||||
---
|
||||
|
||||
## K8S Compatibility Matrix
|
||||
|
||||
| k9s | k8s client |
|
||||
| ------------------ | ---------- |
|
||||
| v0.26.7 - v0.26.6 | 0.25.3 |
|
||||
| v0.26.5 - v0.26.4 | 0.25.1 |
|
||||
| v0.26.3 - v0.26.1 | 0.24.3 |
|
||||
| v0.26.0 - v0.25.19 | 0.24.2 |
|
||||
| v0.25.18 - v0.25.3 | 0.22.3 |
|
||||
| v0.25.2 - v0.25.0 | 0.22.0 |
|
||||
| <= v0.24 | 0.21.3 |
|
||||
|
||||
---
|
||||
|
||||
## The Command Line
|
||||
|
||||
```shell
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s.png" align="center" width="800" height="auto"/>
|
||||
|
||||
# Release v0.27.1
|
||||
|
||||
## 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)
|
||||
|
||||
---
|
||||
|
||||
## Maintenance Release
|
||||
|
||||
---
|
||||
|
||||
## Resolved Issues
|
||||
|
||||
* [Issue #1943](https://github.com/derailed/k9s/issues/1943) k9s display is broken after switching to v0.27.0
|
||||
* [Issue #1935](https://github.com/derailed/k9s/issues/1935) Active namespace is dropped after accessing forbidden resources
|
||||
* [Issue #1913](https://github.com/derailed/k9s/issues/1913) Exit edit mode deadlock
|
||||
* [Issue #1895](https://github.com/derailed/k9s/issues/1895) AWS workspace. K9s fails on startup with unknown userid error
|
||||
* [Issue #1842](https://github.com/derailed/k9s/issues/1842) Strange one - brew installed k9s
|
||||
|
||||
---
|
||||
|
||||
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2022 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
14
go.mod
14
go.mod
|
|
@ -7,11 +7,11 @@ require (
|
|||
github.com/atotto/clipboard v0.1.4
|
||||
github.com/cenkalti/backoff/v4 v4.1.3
|
||||
github.com/derailed/popeye v0.10.1
|
||||
github.com/derailed/tview v0.8.0
|
||||
github.com/derailed/tcell/v2 v2.3.1-rc.3
|
||||
github.com/derailed/tview v0.8.1
|
||||
github.com/fatih/color v1.13.0
|
||||
github.com/fsnotify/fsnotify v1.6.0
|
||||
github.com/fvbommel/sortorder v1.0.2
|
||||
github.com/gdamore/tcell/v2 v2.5.4
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/mattn/go-colorable v0.1.13
|
||||
github.com/mattn/go-runewidth v0.0.14
|
||||
|
|
@ -20,8 +20,8 @@ require (
|
|||
github.com/rs/zerolog v1.28.0
|
||||
github.com/sahilm/fuzzy v0.1.0
|
||||
github.com/spf13/cobra v1.6.0
|
||||
github.com/stretchr/testify v1.8.0
|
||||
golang.org/x/text v0.5.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
golang.org/x/text v0.6.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
helm.sh/helm/v3 v3.10.1
|
||||
k8s.io/api v0.26.1
|
||||
|
|
@ -121,7 +121,7 @@ require (
|
|||
github.com/prometheus/client_model v0.3.0 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/rivo/uniseg v0.4.3 // indirect
|
||||
github.com/rubenv/sql-migrate v1.1.2 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/shopspring/decimal v1.2.0 // indirect
|
||||
|
|
@ -138,8 +138,8 @@ require (
|
|||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.3.0 // indirect
|
||||
golang.org/x/term v0.3.0 // indirect
|
||||
golang.org/x/sys v0.4.0 // indirect
|
||||
golang.org/x/term v0.4.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-20220502173005-c8bf987b8c21 // indirect
|
||||
|
|
|
|||
36
go.sum
36
go.sum
|
|
@ -128,8 +128,10 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||
github.com/derailed/popeye v0.10.1 h1:+lyLDGUyKANfMiSHV8X1pHD1HhcxEXCa8ple0ZvyRqc=
|
||||
github.com/derailed/popeye v0.10.1/go.mod h1:ChD8GPNvgsgjLG5fQBZIxm3VOhFrqd10Xn8IxfuGn4w=
|
||||
github.com/derailed/tview v0.8.0 h1:S5RMQ/Jito0pSyLO4ruqJG/60s0YAmyH6I4CU91G//w=
|
||||
github.com/derailed/tview v0.8.0/go.mod h1:7ezLKLaUxfeuURd2FHG3vwV8AR03E66em2dr/lTlllQ=
|
||||
github.com/derailed/tcell/v2 v2.3.1-rc.3 h1:9s1fmyRcSPRlwr/C9tcpJKCujbrtmPpST6dcMUD2piY=
|
||||
github.com/derailed/tcell/v2 v2.3.1-rc.3/go.mod h1:nf68BEL8fjmXQHJT3xZjoZFs2uXOzyJcNAQqGUEMrFY=
|
||||
github.com/derailed/tview v0.8.1 h1:hvNR3LLrWEuaQbPYfBnRn7bYkxCP26K6nX9J+MGlhyw=
|
||||
github.com/derailed/tview v0.8.1/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw=
|
||||
github.com/distribution/distribution/v3 v3.0.0-20220526142353-ffbd94cbe269 h1:hbCT8ZPPMqefiAWD2ZKjn7ypokIGViTvBBg/ExLSdCk=
|
||||
github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M=
|
||||
github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
|
|
@ -178,8 +180,6 @@ github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM4
|
|||
github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
||||
github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
|
||||
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
|
||||
github.com/gdamore/tcell/v2 v2.5.4 h1:TGU4tSjD3sCL788vFNeJnTdzpNKIw1H5dgLnJRQVv/k=
|
||||
github.com/gdamore/tcell/v2 v2.5.4/go.mod h1:dZgRy5v4iMobMEcWNYBtREnDZAT9DYmfqIkrgEMxLyw=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
|
||||
|
|
@ -541,8 +541,9 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5
|
|||
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
||||
github.com/rakyll/hey v0.1.4 h1:hhc8GIqHN4+rPFZvkM9lkCQGi7da0sINM83xxpFkbPA=
|
||||
github.com/rakyll/hey v0.1.4/go.mod h1:nAOTOo+L52KB9SZq/M6J18kxjto4yVtXQDjU2HgjUPI=
|
||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=
|
||||
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
|
|
@ -584,8 +585,9 @@ github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH
|
|||
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
|
|
@ -593,8 +595,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
|
|||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
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 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
|
|
@ -610,7 +613,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
|||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
|
||||
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
|
||||
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY=
|
||||
|
|
@ -646,7 +648,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
|||
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
|
|
@ -684,7 +685,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
|
@ -730,7 +730,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc=
|
||||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
|
|
@ -827,16 +826,14 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg=
|
||||
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
|
||||
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=
|
||||
|
|
@ -846,8 +843,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
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.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
|
||||
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
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=
|
||||
|
|
@ -907,7 +904,6 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
|
|||
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/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=
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ func (n *Node) List(ctx context.Context, ns string) ([]runtime.Object, error) {
|
|||
_, name := client.Namespaced(fqn)
|
||||
podCount, err := n.CountPods(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
log.Error().Err(err).Msgf("unable to get pods count for %s", name)
|
||||
}
|
||||
res = append(res, &render.NodeWithMetrics{
|
||||
Raw: u,
|
||||
|
|
|
|||
|
|
@ -175,6 +175,10 @@ func (d *Describe) reconcile(ctx context.Context) error {
|
|||
|
||||
// Describe describes a given resource.
|
||||
func (d *Describe) describe(ctx context.Context, gvr client.GVR, path string) (string, error) {
|
||||
defer func(t time.Time) {
|
||||
log.Debug().Msgf("Describe model elapsed: %v", time.Since(t))
|
||||
}(time.Now())
|
||||
|
||||
meta, err := getMeta(ctx, gvr)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package render
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ package render
|
|||
|
||||
// "github.com/derailed/k9s/internal/client"
|
||||
// "github.com/derailed/tview"
|
||||
// "github.com/gdamore/tcell/v2"
|
||||
// "github.com/derailed/tcell/v2"
|
||||
|
||||
// ofaas "github.com/openfaas/faas-provider/types"
|
||||
// metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
res "k8s.io/apimachinery/pkg/api/resource"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/popeye/pkg/config"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package render
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"image"
|
||||
"sync"
|
||||
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal/tchart"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"image"
|
||||
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"image"
|
||||
"math"
|
||||
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
var sparks = []rune{'▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -40,10 +40,8 @@ func ShowDelete(styles config.Dialog, pages *ui.Pages, msg string, ok okFunc, ca
|
|||
})
|
||||
propField := f.GetFormItemByLabel("Propagation:").(*tview.DropDown)
|
||||
propField.SetListStyles(
|
||||
styles.FgColor.Color(),
|
||||
styles.BgColor.Color(),
|
||||
styles.ButtonFocusFgColor.Color(),
|
||||
styles.ButtonFocusBgColor.Color(),
|
||||
styles.FgColor.Color(), styles.BgColor.Color(),
|
||||
styles.ButtonFocusFgColor.Color(), styles.ButtonFocusBgColor.Color(),
|
||||
)
|
||||
f.AddCheckbox("Force:", force, func(_ string, checked bool) {
|
||||
force = checked
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// ShowConfirm pops a confirmation dialog.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// StatusIndicator represents a status indicator when main header is collapsed.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package ui
|
||||
|
||||
import "github.com/gdamore/tcell/v2"
|
||||
import "github.com/derailed/tcell/v2"
|
||||
|
||||
func init() {
|
||||
initKeys()
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// SelectTable represents a table with selections.
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// KeyListenerFunc listens to key presses.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
const aliasTitle = "Aliases"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/view"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/derailed/k9s/internal/watch"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
|
@ -595,10 +595,9 @@ func (a *App) dirCmd(path string) error {
|
|||
path = dir
|
||||
}
|
||||
}
|
||||
a.Content.Stack.Clear()
|
||||
a.cmdHistory.Push("dir " + path)
|
||||
|
||||
return a.inject(NewDir(path))
|
||||
return a.inject(NewDir(path), true)
|
||||
}
|
||||
|
||||
func (a *App) helpCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
|
|
@ -613,7 +612,7 @@ func (a *App) helpCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
|
||||
if err := a.inject(NewHelp(a)); err != nil {
|
||||
if err := a.inject(NewHelp(a), false); err != nil {
|
||||
a.Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -630,7 +629,7 @@ func (a *App) aliasCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
|
||||
if err := a.inject(NewAlias(client.NewGVR("aliases"))); err != nil {
|
||||
if err := a.inject(NewAlias(client.NewGVR("aliases")), false); err != nil {
|
||||
a.Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -644,12 +643,17 @@ func (a *App) gotoResource(cmd, path string, clearStack bool) {
|
|||
}
|
||||
}
|
||||
|
||||
func (a *App) inject(c model.Component) error {
|
||||
func (a *App) inject(c model.Component, clearStack bool) error {
|
||||
ctx := context.WithValue(context.Background(), internal.KeyApp, a)
|
||||
if err := c.Init(ctx); err != nil {
|
||||
log.Error().Err(err).Msgf("component init failed for %q", c.Name())
|
||||
dialog.ShowError(a.Styles.Dialog(), a.Content.Pages, err.Error())
|
||||
//dialog.ShowError(a.Styles.Dialog(), a.Content.Pages, err.Error())
|
||||
return err
|
||||
}
|
||||
if clearStack {
|
||||
a.Content.Stack.Clear()
|
||||
}
|
||||
|
||||
a.Content.Push(c)
|
||||
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/perf"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// Benchmark represents a service benchmark results view.
|
||||
|
|
@ -45,7 +45,7 @@ func (b *Benchmark) viewBench(app *App, model ui.Tabular, gvr, path string) {
|
|||
}
|
||||
|
||||
details := NewDetails(b.App(), "Results", fileToSubject(path), false).Update(data)
|
||||
if err := app.inject(details); err != nil {
|
||||
if err := app.inject(details, false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
|
@ -261,7 +261,7 @@ func (b *Browser) viewCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
v := NewLiveView(b.app, "YAML", model.NewYAML(b.GVR(), path))
|
||||
if err := v.app.inject(v); err != nil {
|
||||
if err := v.app.inject(v, false); err != nil {
|
||||
v.app.Flash().Err(err)
|
||||
}
|
||||
return nil
|
||||
|
|
@ -464,7 +464,7 @@ func (b *Browser) defaultContext() context.Context {
|
|||
}
|
||||
|
||||
func (b *Browser) refreshActions() {
|
||||
if b.App().Content.Top().Name() != b.Name() {
|
||||
if b.App().Content.Top() != nil && b.App().Content.Top().Name() != b.Name() {
|
||||
return
|
||||
}
|
||||
aa := ui.KeyActions{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// ConfigMap represents a configmap viewer.
|
||||
|
|
@ -54,7 +54,7 @@ func scanRefs(evt *tcell.EventKey, a *App, t *Table, gvr string) *tcell.EventKey
|
|||
a.Flash().Infof("Viewing references for %s::%s", gvr, path)
|
||||
view := NewReference(client.NewGVR("references"))
|
||||
view.SetContextFn(refContext(gvr, path, false))
|
||||
if err := a.inject(view); err != nil {
|
||||
if err := a.inject(view, false); err != nil {
|
||||
a.Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ func (c *Command) specialCmd(cmd, path string) bool {
|
|||
}
|
||||
tokens := canRX.FindAllStringSubmatch(cmd, -1)
|
||||
if len(tokens) == 1 && len(tokens[0]) == 3 {
|
||||
if err := c.app.inject(NewPolicy(c.app, tokens[0][1], tokens[0][2])); err != nil {
|
||||
if err := c.app.inject(NewPolicy(c.app, tokens[0][1], tokens[0][2]), false); err != nil {
|
||||
log.Error().Err(err).Msgf("policy view load failed")
|
||||
return false
|
||||
}
|
||||
|
|
@ -268,13 +268,10 @@ func (c *Command) exec(cmd, gvr string, comp model.Component, clearStack bool) (
|
|||
if err := c.app.Config.Save(); err != nil {
|
||||
log.Error().Err(err).Msg("Config save failed!")
|
||||
}
|
||||
if clearStack {
|
||||
c.app.Content.Stack.Clear()
|
||||
}
|
||||
|
||||
if err := c.app.inject(comp); err != nil {
|
||||
if err := c.app.inject(comp, clearStack); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.app.cmdHistory.Push(cmd)
|
||||
|
||||
return
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/port"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
|
@ -125,7 +125,7 @@ func (c *Container) showPFCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
pf := NewPortForward(client.NewGVR("portforwards"))
|
||||
pf.SetContextFn(c.portForwardContext)
|
||||
if err := c.App().inject(pf); err != nil {
|
||||
if err := c.App().inject(pf, false); err != nil {
|
||||
c.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Cow represents a bomb viewer.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
|
@ -56,7 +56,7 @@ func (c *CronJob) showJobs(app *App, model ui.Tabular, gvr, path string) {
|
|||
|
||||
v := NewJob(client.NewGVR("batch/v1/jobs"))
|
||||
v.SetContextFn(jobCtx(path, string(cj.UID)))
|
||||
if err := app.inject(v); err != nil {
|
||||
if err := app.inject(v, false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/sahilm/fuzzy"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -95,7 +95,7 @@ func (d *Dir) viewCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
details := NewDetails(d.App(), "YAML", sel, true).Update(string(yaml))
|
||||
if err := d.App().inject(details); err != nil {
|
||||
if err := d.App().inject(details, false); err != nil {
|
||||
d.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ func (d *Dir) gotoCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
v := NewDir(sel)
|
||||
if err := d.App().inject(v); err != nil {
|
||||
if err := d.App().inject(v, false); err != nil {
|
||||
d.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ func (d *Dir) applyCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
details := NewDetails(d.App(), "Applied Manifest", sel, true).Update(res)
|
||||
if err := d.App().inject(details); err != nil {
|
||||
if err := d.App().inject(details, false); err != nil {
|
||||
d.App().Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -244,7 +244,7 @@ func (d *Dir) delCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
res = "message:\n" + fmtResults(res)
|
||||
}
|
||||
details := NewDetails(d.App(), "Deleted Manifest", sel, true).Update(res)
|
||||
if err := d.App().inject(details); err != nil {
|
||||
if err := d.App().inject(details, false); err != nil {
|
||||
d.App().Flash().Err(err)
|
||||
}
|
||||
}, func() {})
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package view
|
|||
import (
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// Event represents a command alias view.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// Group presents a RBAC group viewer.
|
||||
|
|
@ -40,7 +40,7 @@ func (g *Group) policyCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
if path == "" {
|
||||
return evt
|
||||
}
|
||||
if err := g.App().inject(NewPolicy(g.App(), "Group", path)); err != nil {
|
||||
if err := g.App().inject(NewPolicy(g.App(), "Group", path), false); err != nil {
|
||||
g.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ func (c *Helm) getValsCmd() func(evt *tcell.EventKey) *tcell.EventKey {
|
|||
v.actions.Add(ui.KeyActions{
|
||||
ui.KeyV: ui.NewKeyAction("Toggle All Values", c.toggleValuesCmd, true),
|
||||
})
|
||||
if err := v.app.inject(v); err != nil {
|
||||
if err := v.app.inject(v, false); err != nil {
|
||||
v.app.Flash().Err(err)
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ func defaultEnv(c *client.Config, path string, header render.Header, row render.
|
|||
|
||||
func describeResource(app *App, m ui.Tabular, gvr, path string) {
|
||||
v := NewLiveView(app, "Describe", model.NewDescribe(client.NewGVR(gvr), path))
|
||||
if err := app.inject(v); err != nil {
|
||||
if err := app.inject(v, false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ func showPods(app *App, path, labelSel, fieldSel string) {
|
|||
if err := app.Config.SetActiveNamespace(ns); err != nil {
|
||||
log.Error().Err(err).Msg("Config NS set failed!")
|
||||
}
|
||||
if err := app.inject(v); err != nil {
|
||||
if err := app.inject(v, false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/cli-runtime/pkg/genericclioptions"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/sahilm/fuzzy"
|
||||
)
|
||||
|
|
@ -94,14 +95,23 @@ func (v *LiveView) ResourceFailed(err error) {
|
|||
// ResourceChanged notifies when the filter changes.
|
||||
func (v *LiveView) ResourceChanged(lines []string, matches fuzzy.Matches) {
|
||||
v.app.QueueUpdateDraw(func() {
|
||||
defer func(t time.Time) {
|
||||
log.Debug().Msgf("Live view render time: %v", time.Since(t))
|
||||
}(time.Now())
|
||||
|
||||
v.text.SetTextAlign(tview.AlignLeft)
|
||||
v.maxRegions = len(matches)
|
||||
ll := make([]string, len(lines))
|
||||
var ll []string
|
||||
if len(matches) == 0 {
|
||||
ll = lines
|
||||
} else {
|
||||
ll = make([]string, len(lines))
|
||||
copy(ll, lines)
|
||||
for i, m := range matches {
|
||||
loc, line := m.MatchedIndexes, ll[m.Index]
|
||||
ll[m.Index] = line[:loc[0]] + `<<<"search_` + strconv.Itoa(i) + `">>>` + line[loc[0]:loc[1]] + `<<<"">>>` + line[loc[1]:]
|
||||
}
|
||||
}
|
||||
|
||||
if v.text.GetText(true) == "" {
|
||||
v.text.ScrollToBeginning()
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Logger represents a generic log viewer.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// LogsExtender adds log actions to a given viewer.
|
||||
|
|
@ -67,7 +67,7 @@ func (l *LogsExtender) showLogs(path string, prev bool) {
|
|||
return
|
||||
}
|
||||
}
|
||||
if err := l.App().inject(NewLog(l.GVR(), opts)); err != nil {
|
||||
if err := l.App().inject(NewLog(l.GVR(), opts), false); err != nil {
|
||||
l.App().Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
|
@ -189,7 +189,7 @@ func (n *Node) yamlCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
details := NewDetails(n.App(), "YAML", sel, true).Update(raw)
|
||||
if err := n.App().inject(details); err != nil {
|
||||
if err := n.App().inject(details, false); err != nil {
|
||||
n.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/perf"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ func (p *PortForward) bindKeys(aa ui.KeyActions) {
|
|||
func (p *PortForward) showBenchCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
b := NewBenchmark(client.NewGVR("benchmarks"))
|
||||
b.SetContextFn(p.getContext)
|
||||
if err := p.App().inject(b); err != nil {
|
||||
if err := p.App().inject(b, false); err != nil {
|
||||
p.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/port"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/watch"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// Picker represents a container picker.
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/fatih/color"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
|
@ -118,7 +118,7 @@ func (p *Pod) logOptions(prev bool) (*dao.LogOptions, error) {
|
|||
func (p *Pod) showContainers(app *App, model ui.Tabular, gvr, path string) {
|
||||
co := NewContainer(client.NewGVR("containers"))
|
||||
co.SetContextFn(p.coContext)
|
||||
if err := app.inject(co); err != nil {
|
||||
if err := app.inject(co, false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ func (p *Pod) showNode(evt *tcell.EventKey) *tcell.EventKey {
|
|||
no := NewNode(client.NewGVR("v1/nodes"))
|
||||
no.SetInstance(pod.Spec.NodeName)
|
||||
//no.SetContextFn(nodeContext(pod.Spec.NodeName))
|
||||
if err := p.App().inject(no); err != nil {
|
||||
if err := p.App().inject(no, false); err != nil {
|
||||
p.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ func (p *Pod) showPFCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
pf := NewPortForward(client.NewGVR("portforwards"))
|
||||
pf.SetContextFn(p.portForwardContext)
|
||||
if err := p.App().inject(pf); err != nil {
|
||||
if err := p.App().inject(pf, false); err != nil {
|
||||
p.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ func containerShellin(a *App, comp model.Component, path, co string) error {
|
|||
resumeShellIn(a, comp, path, co)
|
||||
})
|
||||
|
||||
return a.inject(picker)
|
||||
return a.inject(picker, false)
|
||||
}
|
||||
|
||||
func resumeShellIn(a *App, c model.Component, path, co string) {
|
||||
|
|
@ -315,7 +315,7 @@ func containerAttachIn(a *App, comp model.Component, path, co string) error {
|
|||
picker.SetSelectedFunc(func(_ int, co, _ string, _ rune) {
|
||||
resumeAttachIn(a, comp, path, co)
|
||||
})
|
||||
if err := a.inject(picker); err != nil {
|
||||
if err := a.inject(picker, false); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// Popeye represents a sanitizer view.
|
||||
|
|
@ -79,7 +79,7 @@ func (p *Popeye) gotoCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
v := NewSanitizer(client.NewGVR("sanitizer"))
|
||||
v.SetContextFn(sanitizerCtx(path))
|
||||
if err := p.App().inject(v); err != nil {
|
||||
if err := p.App().inject(v, false); err != nil {
|
||||
p.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package view
|
|||
import (
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// PriorityClass presents a priority class viewer.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"fmt"
|
||||
"image"
|
||||
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package view
|
|||
import (
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// PersistentVolumeClaim represents a PVC custom viewer.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// Rbac presents an RBAC policy viewer.
|
||||
|
|
@ -37,7 +37,7 @@ func showRules(app *App, _ ui.Tabular, gvr, path string) {
|
|||
v := NewRbac(client.NewGVR("rbac"))
|
||||
v.SetContextFn(rbacCtx(gvr, path))
|
||||
|
||||
if err := app.inject(v); err != nil {
|
||||
if err := app.inject(v, false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// Reference represents resource references.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// RestartExtender represents a restartable resource.
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
)
|
||||
|
||||
// ReplicaSet presents a replicaset viewer.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// ServiceAccount represents a serviceaccount viewer.
|
||||
|
|
@ -46,7 +46,7 @@ func (s *ServiceAccount) policyCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
if path == "" {
|
||||
return evt
|
||||
}
|
||||
if err := s.App().inject(NewPolicy(s.App(), sa, path)); err != nil {
|
||||
if err := s.App().inject(NewPolicy(s.App(), sa, path), false); err != nil {
|
||||
s.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ func scanSARefs(evt *tcell.EventKey, a *App, t *Table, gvr string) *tcell.EventK
|
|||
a.Flash().Infof("Viewing references for %s::%s", gvr, path)
|
||||
view := NewReference(client.NewGVR("references"))
|
||||
view.SetContextFn(refContext(gvr, path, false))
|
||||
if err := a.inject(view); err != nil {
|
||||
if err := a.inject(view, false); err != nil {
|
||||
a.Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/xray"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"github.com/derailed/k9s/internal/dao"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package view
|
|||
import (
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
|
|
@ -67,7 +67,7 @@ func (s *Secret) decodeCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
details := NewDetails(s.App(), "Secret Decoder", path, true).Update(string(raw))
|
||||
if err := s.App().inject(details); err != nil {
|
||||
if err := s.App().inject(details, false); err != nil {
|
||||
s.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/perf"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/derailed/tcell/v2"
|
||||
)
|
||||
|
||||
// User presents a user viewer.
|
||||
|
|
@ -40,7 +40,7 @@ func (u *User) policyCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
if path == "" {
|
||||
return evt
|
||||
}
|
||||
if err := u.App().inject(NewPolicy(u.App(), "User", path)); err != nil {
|
||||
if err := u.App().inject(NewPolicy(u.App(), "User", path), false); err != nil {
|
||||
u.App().Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ import (
|
|||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/ui/dialog"
|
||||
"github.com/derailed/k9s/internal/xray"
|
||||
"github.com/derailed/tcell/v2"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/sahilm/fuzzy"
|
||||
"golang.org/x/text/cases"
|
||||
|
|
@ -274,7 +274,7 @@ func (x *Xray) showLogs(spec *xray.NodeSpec, prev bool) {
|
|||
Container: co,
|
||||
Previous: prev,
|
||||
}
|
||||
if err := x.app.inject(NewLog(client.NewGVR("v1/pods"), &opts)); err != nil {
|
||||
if err := x.app.inject(NewLog(client.NewGVR("v1/pods"), &opts), false); err != nil {
|
||||
x.app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -340,7 +340,7 @@ func (x *Xray) viewCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
details := NewDetails(x.app, "YAML", spec.Path(), true).Update(raw)
|
||||
if err := x.app.inject(details); err != nil {
|
||||
if err := x.app.inject(details, false); err != nil {
|
||||
x.app.Flash().Err(err)
|
||||
}
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ func (x *Xray) describe(gvr, path string) {
|
|||
}
|
||||
|
||||
details := NewDetails(x.app, "Describe", path, true).Update(yaml)
|
||||
if err := x.app.inject(details); err != nil {
|
||||
if err := x.app.inject(details, false); err != nil {
|
||||
x.app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue