From 626bde11f31e08cf8081bced7d911f6d121582fc Mon Sep 17 00:00:00 2001 From: Prasad Katti Date: Sun, 16 Jun 2024 08:46:34 -0700 Subject: [PATCH 01/62] fix status for completed pods in workload view (#2729) --- internal/dao/workload.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/dao/workload.go b/internal/dao/workload.go index dfe4aa05b4..604c6ca9ad 100644 --- a/internal/dao/workload.go +++ b/internal/dao/workload.go @@ -158,7 +158,9 @@ func readiness(gvr client.GVR, r metav1.TableRow, h []metav1.TableColumnDefiniti func status(gvr client.GVR, r metav1.TableRow, h []metav1.TableColumnDefinition) string { switch gvr { case PodGVR: - if !isReady(r.Cells[indexOf("Ready", h)].(string)) || r.Cells[indexOf("Status", h)] != render.PhaseRunning { + if status := r.Cells[indexOf("Status", h)]; status == render.PhaseCompleted { + return StatusOK + } else if !isReady(r.Cells[indexOf("Ready", h)].(string)) || status != render.PhaseRunning { return DegradedStatus } case DpGVR, StsGVR: From 3901673dfbf94fa7a7ff96eaae00a5645f4092d7 Mon Sep 17 00:00:00 2001 From: Adrian Bridgett Date: Sun, 7 Jul 2024 15:15:06 +0100 Subject: [PATCH 02/62] install copyright file into correct location (#2780) --- .goreleaser.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 3788ceed95..b2ffc71807 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -110,7 +110,7 @@ nfpms: section: utils contents: - src: ./LICENSE - dst: /usr/share/doc/nfpm/copyright + dst: /usr/share/doc/k9s/copyright file_info: mode: 0644 From 8713fba02aed890ef8ef2283b98a7df546c87b8a Mon Sep 17 00:00:00 2001 From: yjqg6666 <1879641+yjqg6666@users.noreply.github.com> Date: Sun, 7 Jul 2024 22:28:51 +0800 Subject: [PATCH 03/62] [#2773] fix freebsd build failure (#2775) fix build error: vendor/github.com/knqyf263/go-rpmdb/pkg/ndb/ndb.go:99:8: undefined: syscallFlock vendor/github.com/knqyf263/go-rpmdb/pkg/ndb/ndb.go:99:37: undefined: syscallLOCK_SH vendor/github.com/knqyf263/go-rpmdb/pkg/ndb/ndb.go:135:6: undefined: syscallFlock vendor/github.com/knqyf263/go-rpmdb/pkg/ndb/ndb.go:135:38: undefined: syscallLOCK_UN Related to issue https://github.com/knqyf263/go-rpmdb/pull/53. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 37d48c50dd..043dfc496a 100644 --- a/go.mod +++ b/go.mod @@ -184,7 +184,7 @@ require ( github.com/klauspost/pgzip v1.2.5 // indirect github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f // indirect github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d // indirect - github.com/knqyf263/go-rpmdb v0.1.0 // indirect + github.com/knqyf263/go-rpmdb v0.1.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect diff --git a/go.sum b/go.sum index 49cb4ce384..6967b4539b 100644 --- a/go.sum +++ b/go.sum @@ -792,8 +792,8 @@ github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f h1:GvCU5GX github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f/go.mod h1:q59u9px8b7UTj0nIjEjvmTWekazka6xIt6Uogz5Dm+8= github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d h1:X4cedH4Kn3JPupAwwWuo4AzYp16P0OyLO9d7OnMZc/c= github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d/go.mod h1:o8sgWoz3JADecfc/cTYD92/Et1yMqMy0utV1z+VaZao= -github.com/knqyf263/go-rpmdb v0.1.0 h1:pOgjtOGtW0B+ibY905hP3ETrYFmLZsHiReKsplcs+to= -github.com/knqyf263/go-rpmdb v0.1.0/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww= +github.com/knqyf263/go-rpmdb v0.1.1 h1:oh68mTCvp1XzxdU7EfafcWzzfstUZAEa3MW0IJye584= +github.com/knqyf263/go-rpmdb v0.1.1/go.mod h1:9LQcoMCMQ9vrF7HcDtXfvqGO4+ddxFQ8+YF/0CVGDww= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= From 350439b98553f23672f7ce0b650637d0afdd4104 Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Sun, 7 Jul 2024 22:32:59 +0800 Subject: [PATCH 04/62] proper handle OwnerReference for manually created job (#2772) --- internal/dao/cronjob.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/dao/cronjob.go b/internal/dao/cronjob.go index b02b95759e..3153349571 100644 --- a/internal/dao/cronjob.go +++ b/internal/dao/cronjob.go @@ -81,6 +81,7 @@ func (c *CronJob) Run(path string) error { APIVersion: c.gvr.GV().String(), Kind: "CronJob", BlockOwnerDeletion: &true, + Controller: &true, Name: cj.Name, UID: cj.UID, }, From 379ddafdb72fa2ce3999c3e3fa1318aea9624db0 Mon Sep 17 00:00:00 2001 From: Caleb Meyer Date: Tue, 30 Jul 2024 14:30:12 -0500 Subject: [PATCH 05/62] Add comment about Escape keybinding (#2817) This was the first question I had, and took me using the `?` hotkey to answer (wasn't in the docs anywhere that I saw) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ff67c5ca4..41252a3afa 100644 --- a/README.md +++ b/README.md @@ -340,7 +340,8 @@ K9s uses aliases to navigate most K8s resources. |---------------------------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------| | Show active keyboard mnemonics and help | `?` | | | Show all available resource alias | `ctrl-a` | | -| To bail out of K9s | `:quit`, `:q`, `ctrl-c` | | +| To bail out of K9s | `:quit`, `:q`, `ctrl-c` | | +| To go up/back to the previous view | `esc` | If you have crumbs on, this will go to the previous one | | View a Kubernetes resource using singular/plural or short-name | `:`pod⏎ | accepts singular, plural, short-name or alias ie pod or pods | | View a Kubernetes resource in a given namespace | `:`pod ns-x⏎ | | | View filtered pods (New v0.30.0!) | `:`pod /fred⏎ | View all pods filtered by fred | From 71338d8a067d5c306ae015a4de7899844837f383 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:58:57 -0600 Subject: [PATCH 06/62] Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 (#2813) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.0.1 to 6.1.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.0.1...v6.1.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 76e5a481bd..17570b8e46 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: cache-dependency-path: go.sum - name: Lint - uses: golangci/golangci-lint-action@v6.0.1 + uses: golangci/golangci-lint-action@v6.1.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-pr-check \ No newline at end of file From 2de726a2fbd4a6ad36b713417177a57b7b776a14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:59:18 -0600 Subject: [PATCH 07/62] Bump github.com/docker/docker (#2816) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.0.1+incompatible to 26.1.4+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v26.0.1...v26.1.4) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 043dfc496a..ac462d4651 100644 --- a/go.mod +++ b/go.mod @@ -102,7 +102,7 @@ require ( github.com/distribution/reference v0.6.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v26.0.1+incompatible // indirect + github.com/docker/docker v26.1.4+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect diff --git a/go.sum b/go.sum index 6967b4539b..6694de0e64 100644 --- a/go.sum +++ b/go.sum @@ -404,8 +404,8 @@ github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbT github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.0.1+incompatible h1:t39Hm6lpXuXtgkF0dm1t9a5HkbUfdGy6XbWexmGr+hA= -github.com/docker/docker v26.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU= +github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= From 8e1a29fe64829a8c43a7a5c3389473ea108ca619 Mon Sep 17 00:00:00 2001 From: Daniel Gomes-Sebastiao Date: Thu, 8 Aug 2024 05:59:40 +1200 Subject: [PATCH 08/62] fix: align build image Go version with go.mod (#2812) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c76d4ba3b0..2c372a0e8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- # The base image for building the k9s binary -FROM golang:1.21.5-alpine3.17 AS build +FROM golang:1.22-alpine3.20 AS build WORKDIR /k9s COPY go.mod go.sum main.go Makefile ./ From 0a76cf78a29c6866146706c287dd50e932112114 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:07:17 -0600 Subject: [PATCH 09/62] Bump github.com/docker/docker (#2825) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.1.4+incompatible to 26.1.5+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v26.1.4...v26.1.5) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ac462d4651..3cd1f1d4d9 100644 --- a/go.mod +++ b/go.mod @@ -102,7 +102,7 @@ require ( github.com/distribution/reference v0.6.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v26.1.4+incompatible // indirect + github.com/docker/docker v26.1.5+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect diff --git a/go.sum b/go.sum index 6694de0e64..1b31c6e55a 100644 --- a/go.sum +++ b/go.sum @@ -404,8 +404,8 @@ github.com/docker/cli v25.0.1+incompatible h1:mFpqnrS6Hsm3v1k7Wa/BO23oz0k121MTbT github.com/docker/cli v25.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU= -github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.5+incompatible h1:NEAxTwEjxV6VbBMBoGG3zPqbiJosIApZjxlbrG9q3/g= +github.com/docker/docker v26.1.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= From e7ddea63ef00857002753250c72e34ac2a8266fd Mon Sep 17 00:00:00 2001 From: Pavan Gudiwada <25551553+pavangudiwada@users.noreply.github.com> Date: Fri, 16 Aug 2024 04:39:44 +0530 Subject: [PATCH 10/62] Adding HolmesGPT plugin (#2822) * Adding HolmesGPT plugin * Updated to use a temporary file --- plugins/README.md | 2 +- plugins/ai-incident-investigaton.yaml | 61 +++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 plugins/ai-incident-investigaton.yaml diff --git a/plugins/README.md b/plugins/README.md index 4afe2cf166..8d48715471 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -15,6 +15,6 @@ Following is an example of some of plugin files in this directory. Other files a | log_stern.yml | View resource logs using stern | pods | Ctrl-l | | | log_jq.yml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq | | log_full.yml | get full logs from pod/container | pods/containers | Ctrl-l | | - +| ai-incident-investigation.yaml | Run AI investigation on application issues to find the root cause in seconds | all | Shift-h/o | [HolmesGPT](https://github.com/robusta-dev/holmesgpt) | [1]: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container [2]: https://github.com/nicolaka/netshoot diff --git a/plugins/ai-incident-investigaton.yaml b/plugins/ai-incident-investigaton.yaml new file mode 100644 index 0000000000..eed0a1df30 --- /dev/null +++ b/plugins/ai-incident-investigaton.yaml @@ -0,0 +1,61 @@ +plugins: +# Author: Pavan Gudiwada +# Investigate incidents in your cluster to quickly find the root cause using HolmesGPT +# Requires HolmesGPT to be installed and configured (https://github.com/robusta-dev/holmesgpt) on your system +# Open any K9s view, then: +# Shift+H to run an investigation with default ask command +# Shift+O to customize the question before running an investigation. + holmesgpt: + shortCut: Shift-H + description: Ask HolmesGPT + scopes: + - all + command: bash + background: false + confirm: false + args: + - -c + - | + holmes ask "why is $NAME of $RESOURCE_NAME in -n $NAMESPACE not working as expected" + + echo "Press 'q' to exit" + while : ; do + read -n 1 k <&1 + if [[ $k = q ]] ; then + break + fi + done + custom-holmesgpt: + shortCut: Shift-Q + description: Custom HolmesGPT Ask + scopes: + - all + command: bash + background: false + confirm: false + args: + - -c + - | + INSTRUCTIONS="# Edit the line below. Lines starting with '#' will be ignored." + DEFAULT_ASK_COMMAND="why is $NAME of $RESOURCE_NAME in -n $NAMESPACE not working as expected" + + QUESTION_FILE=$(mktemp) + + echo "$INSTRUCTIONS" > "$QUESTION_FILE" + echo "$DEFAULT_ASK_COMMAND" >> "$QUESTION_FILE" + + # Open the line in the default text editor + ${EDITOR:-nano} "$QUESTION_FILE" + + # Read the modified line, ignoring lines starting with '#' + user_input=$(grep -v '^#' "$QUESTION_FILE") + + echo running: holmes ask "\"$user_input\"" + holmes ask "$user_input" + echo "Press 'q' to exit" + while : ; do + read -n 1 k <&1 + if [[ $k = q ]] ; then + break + fi + done \ No newline at end of file From 6096bfa0f994d668d571e6e2b91ab51efc9b0ffc Mon Sep 17 00:00:00 2001 From: Jacob Salway Date: Fri, 16 Aug 2024 09:10:47 +1000 Subject: [PATCH 11/62] Add a spark-operator plugin (#2821) --- plugins/spark-operator.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 plugins/spark-operator.yaml diff --git a/plugins/spark-operator.yaml b/plugins/spark-operator.yaml new file mode 100644 index 0000000000..17758f42c4 --- /dev/null +++ b/plugins/spark-operator.yaml @@ -0,0 +1,23 @@ +# See https://github.com/kubeflow/spark-operator +plugins: + toggleScheduledSparkApp: + shortCut: s + confirm: true + dangerous: true + scopes: + - scheduledsparkapp + description: Toggle suspend + command: kubectl + background: true + args: + - patch + - scheduledsparkapp + - $NAME + - -n + - $NAMESPACE + - --context + - $CONTEXT + - -p + - '{"spec": {"suspend": $!COL-SUSPEND}}' + - --type + - merge From 0ce238b8f0c810c74184932f7d4115518f5e768c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:14:24 -0600 Subject: [PATCH 12/62] Bump alpine from 3.20.0 to 3.20.2 (#2807) Bumps alpine from 3.20.0 to 3.20.2. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2c372a0e8c..c276a5664c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk --no-cache add --update make libx11-dev git gcc libc-dev curl && make bu # ----------------------------------------------------------------------------- # Build the final Docker image -FROM alpine:3.20.0 +FROM alpine:3.20.2 ARG KUBECTL_VERSION="v1.29.0" COPY --from=build /k9s/execs/k9s /bin/k9s From 3e6af46787c55579bdfb7f18fd5227e2e9ceef81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:14:53 -0600 Subject: [PATCH 13/62] Bump k8s.io/client-go from 0.30.1 to 0.30.3 (#2806) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.30.1 to 0.30.3. - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.30.1...v0.30.3) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 3cd1f1d4d9..5a90e9a37b 100644 --- a/go.mod +++ b/go.mod @@ -30,11 +30,11 @@ require ( gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.14.4 - k8s.io/api v0.30.1 + k8s.io/api v0.30.3 k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.30.1 + k8s.io/apimachinery v0.30.3 k8s.io/cli-runtime v0.30.1 - k8s.io/client-go v0.30.1 + k8s.io/client-go v0.30.3 k8s.io/klog/v2 v2.120.1 k8s.io/kubectl v0.30.1 k8s.io/metrics v0.30.1 diff --git a/go.sum b/go.sum index 1b31c6e55a..988c34986f 100644 --- a/go.sum +++ b/go.sum @@ -1871,18 +1871,18 @@ 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.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY= -k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM= +k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= +k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U= -k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= +k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= k8s.io/cli-runtime v0.30.1 h1:kSBBpfrJGS6lllc24KeniI9JN7ckOOJKnmFYH1RpTOw= k8s.io/cli-runtime v0.30.1/go.mod h1:zhHgbqI4J00pxb6gM3gJPVf2ysDjhQmQtnTxnMScab8= -k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q= -k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc= +k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= +k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= From 54ad9415ccc7b513be00f061b7f938a57877c631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:44:33 -0600 Subject: [PATCH 14/62] Bump k8s.io/cli-runtime from 0.30.1 to 0.31.0 (#2829) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.30.1 to 0.31.0. - [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.30.1...v0.31.0) --- updated-dependencies: - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 53 +++++++++++++------------- go.sum | 115 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 89 insertions(+), 79 deletions(-) diff --git a/go.mod b/go.mod index 5a90e9a37b..aa0ce978f6 100644 --- a/go.mod +++ b/go.mod @@ -23,19 +23,19 @@ require ( github.com/rakyll/hey v0.1.4 github.com/rs/zerolog v1.32.0 github.com/sahilm/fuzzy v0.1.1 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/text v0.14.0 + golang.org/x/text v0.16.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.14.4 - k8s.io/api v0.30.3 + k8s.io/api v0.31.0 k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.30.3 - k8s.io/cli-runtime v0.30.1 - k8s.io/client-go v0.30.3 - k8s.io/klog/v2 v2.120.1 + k8s.io/apimachinery v0.31.0 + k8s.io/cli-runtime v0.31.0 + k8s.io/client-go v0.31.0 + k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.30.1 k8s.io/metrics v0.30.1 sigs.k8s.io/yaml v1.4.0 @@ -43,8 +43,7 @@ require ( require ( cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.3 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/storage v1.35.1 // indirect dario.cat/mergo v1.0.0 // indirect @@ -82,6 +81,7 @@ require ( github.com/becheran/wildmatch-go v1.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v2 v2.0.4 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -120,6 +120,7 @@ require ( github.com/fatih/camelcase v1.0.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gdamore/encoding v1.0.0 // indirect github.com/github/go-spdx/v2 v2.2.0 // indirect @@ -129,11 +130,11 @@ require ( github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.12.0 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/go-restruct/restruct v1.2.0-alpha // indirect github.com/go-test/deep v1.1.0 // indirect github.com/gobwas/glob v0.2.3 // indirect @@ -147,7 +148,7 @@ require ( github.com/google/go-containerregistry v0.19.1 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/licensecheck v0.3.1 // indirect - github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect + github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect @@ -208,7 +209,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/moby/sys/mountinfo v0.7.1 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect @@ -224,7 +225,7 @@ require ( github.com/ncruces/go-strftime v0.1.9 // indirect github.com/nwaples/rardecode v1.1.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect - github.com/onsi/gomega v1.31.0 // indirect + github.com/onsi/gomega v1.33.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc6 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect @@ -276,6 +277,7 @@ require ( github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651 // indirect github.com/wagoodman/go-presenter v0.0.0-20211015174752-f9c01afc824b // indirect github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect @@ -291,23 +293,24 @@ require ( go.opentelemetry.io/otel/trace v1.19.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/oauth2 v0.19.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.152.0 // indirect google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect @@ -315,14 +318,14 @@ require ( k8s.io/apiserver v0.30.1 // indirect k8s.io/component-base v0.30.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect modernc.org/libc v1.41.0 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.7.2 // indirect modernc.org/sqlite v1.29.6 // indirect oras.land/oras-go v1.2.5 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect - sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/kustomize/api v0.17.2 // indirect + sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 988c34986f..f5715de95c 100644 --- a/go.sum +++ b/go.sum @@ -69,10 +69,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -301,6 +299,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmatcuk/doublestar/v2 v2.0.4 h1:6I6oUiT/sU27eE2OFcWqBhL1SwjyvQuOssxT4a1yidI= github.com/bmatcuk/doublestar/v2 v2.0.4/go.mod h1:QMmcs3H2AUQICWhfzLXz+IYln8lRQmTZRptLie8RgRw= github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= @@ -377,7 +377,7 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -476,6 +476,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= @@ -515,16 +517,17 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 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.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.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/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-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-restruct/restruct v1.2.0-alpha h1:2Lp474S/9660+SJjpVxoKuWX09JsXHSrdV7Nv3/gkvc= github.com/go-restruct/restruct v1.2.0-alpha/go.mod h1:KqrpKpn4M8OLznErihXTGLlsXFGeLxHUrLRRI/1YjGk= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= @@ -532,7 +535,8 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= @@ -639,8 +643,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= -github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -675,7 +679,6 @@ github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= @@ -903,8 +906,8 @@ github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3N github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= @@ -952,12 +955,12 @@ 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.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= 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.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= -github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= 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-rc6 h1:XDqvyKsJEbRtATzkgItUqBA7QHk58yxX1Ov9HERHNqU= @@ -1103,8 +1106,8 @@ github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -1170,6 +1173,8 @@ github.com/wagoodman/go-presenter v0.0.0-20211015174752-f9c01afc824b h1:uWNQ0khA github.com/wagoodman/go-presenter v0.0.0-20211015174752-f9c01afc824b/go.mod h1:ewlIKbKV8l+jCj8rkdXIs361ocR5x3qGyoCSca47Gx8= github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0 h1:0KGbf+0SMg+UFy4e1A/CPVvXn21f1qtWdeJwxZFoQG8= github.com/wagoodman/go-progress v0.0.0-20230925121702-07e42b3cdba0/go.mod h1:jLXFoL31zFaHKAAyZUh+sxiTDFe1L1ZHrcK2T1itVKA= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -1254,8 +1259,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1358,8 +1363,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= 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= @@ -1386,8 +1391,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= -golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1403,8 +1408,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1502,8 +1507,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1511,8 +1516,8 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= 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= @@ -1526,8 +1531,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -1590,8 +1595,8 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -1825,8 +1830,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 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= @@ -1835,6 +1840,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -1871,30 +1878,30 @@ 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.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= -k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= -k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= -k8s.io/cli-runtime v0.30.1 h1:kSBBpfrJGS6lllc24KeniI9JN7ckOOJKnmFYH1RpTOw= -k8s.io/cli-runtime v0.30.1/go.mod h1:zhHgbqI4J00pxb6gM3gJPVf2ysDjhQmQtnTxnMScab8= -k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= -k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= +k8s.io/cli-runtime v0.31.0 h1:V2Q1gj1u3/WfhD475HBQrIYsoryg/LrhhK4RwpN+DhA= +k8s.io/cli-runtime v0.31.0/go.mod h1:vg3H94wsubuvWfSmStDbekvbla5vFGC+zLWqcf+bGDw= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kubectl v0.30.1 h1:sHFIRI3oP0FFZmBAVEE8ErjnTyXDPkBcvO88mH9RjuY= k8s.io/kubectl v0.30.1/go.mod h1:7j+L0Cc38RYEcx+WH3y44jRBe1Q1jxdGPKkX0h4iDq0= k8s.io/metrics v0.30.1 h1:PeA9cP0kxVtaC8Wkzp4sTkr7YSkd9R0UYP6cCHOOY1M= k8s.io/metrics v0.30.1/go.mod h1:gVAhTTgfNKsn9D1kB7Nmb1T31relBuXzzGUE7klyOkM= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= @@ -1910,10 +1917,10 @@ 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-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= -sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= -sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= -sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= +sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g= +sigs.k8s.io/kustomize/api v0.17.2/go.mod h1:UWTz9Ct+MvoeQsHcJ5e+vziRRkwimm3HytpZgIYqye0= +sigs.k8s.io/kustomize/kyaml v0.17.1 h1:TnxYQxFXzbmNG6gOINgGWQt09GghzgTP6mIurOgrLCQ= +sigs.k8s.io/kustomize/kyaml v0.17.1/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 9e7b8236df45e04a8468353858fdf2d5ddd27ec0 Mon Sep 17 00:00:00 2001 From: Alfonso Cobo Canela <165585176+cobcan@users.noreply.github.com> Date: Fri, 16 Aug 2024 01:46:32 +0200 Subject: [PATCH 15/62] add new plugin current-ctx-terminal (#2795) Co-authored-by: acobo --- plugins/current-ctx-terminal.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/current-ctx-terminal.yaml diff --git a/plugins/current-ctx-terminal.yaml b/plugins/current-ctx-terminal.yaml new file mode 100644 index 0000000000..668a7ab4b1 --- /dev/null +++ b/plugins/current-ctx-terminal.yaml @@ -0,0 +1,16 @@ +plugins: + open-terminal: + shortCut: Ctrl-T + confirm: false + description: Open a terminal in the current context + scopes: + - all + command: /usr/bin/sh + background: false + args: + - -c + - bash -c "kubectl config use-context $CONTEXT && echo -e \"\e[1;42mk9s bash terminal.\nCtrl + d or 'exit' to go back to k9s\e[0m\" && bash" + # New window for terminal can be opened with any emulator + #- x-terminal-emulator -e bash -c "kubectl config use-context $CONTEXT && echo -e \"\e[1;42mk9s bash terminal.\nCtrl + d or 'exit' to go back to k9s\e[0m\" && bash" + # example with tilix: + #- tilix -e bash -c "kubectl config use-context $CONTEXT && echo -e \"\e[1;42mk9s bash terminal.\nCtrl + d or 'exit' to go back to k9s\e[0m\" && bash" \ No newline at end of file From 3293ba40eb304b905771960bb3c373a3c3db7c82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:46:49 -0600 Subject: [PATCH 16/62] Bump actions/setup-go from 5.0.1 to 5.0.2 (#2796) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v5.0.1...v5.0.2) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 17570b8e46..65c8b6b683 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v4.1.6 - name: Install Go - uses: actions/setup-go@v5.0.1 + uses: actions/setup-go@v5.0.2 with: go-version-file: go.mod cache-dependency-path: go.sum diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b229ce36c..3daa80825e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4.1.6 - name: Install Go - uses: actions/setup-go@v5.0.1 + uses: actions/setup-go@v5.0.2 with: go-version-file: go.mod cache-dependency-path: go.sum From a6e7b655bf5068163f2d39161ee6d449c1521052 Mon Sep 17 00:00:00 2001 From: Guillaume Berche Date: Fri, 16 Aug 2024 01:50:57 +0200 Subject: [PATCH 17/62] Create kubectl-get-in-shell.yaml (#2789) * Create kubectl-get-in-shell.yaml Provide a way to continue working on the currently selected object in a new shell without doing lengthy copy/pastes * Update kubectl-get-in-shell.yaml Refine comment --- plugins/kubectl-get-in-shell.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/kubectl-get-in-shell.yaml diff --git a/plugins/kubectl-get-in-shell.yaml b/plugins/kubectl-get-in-shell.yaml new file mode 100644 index 0000000000..047b959021 --- /dev/null +++ b/plugins/kubectl-get-in-shell.yaml @@ -0,0 +1,16 @@ +plugins: + # provides a way to continue working on the currently selected object in a new shell without doing lengthy copy/paste of current context. + # It simply formats the `kubectl get` command, taking care to omit -n when the namespace is not defined (typically for cluster-wide resources) + kubectl-get-cmd: + shortCut: Shift-B + confirm: false + description: get into shell + scopes: + - all + command: bash + background: false + args: + - -c + - (printf "copy/paste in a shell:\n\n"; if [ "$NAMESPACE" != "" -a "$NAMESPACE" != "-" ]; then printf "kubectl get --context $CONTEXT -n $NAMESPACE $RESOURCE_NAME $NAME \n" ; else printf "kubectl get --context $CONTEXT $RESOURCE_NAME $NAME \n"; fi ) |& less + + From 0cdf0f537cdc1daebe3ac7430668f0bbacfc5f40 Mon Sep 17 00:00:00 2001 From: Guillaume Berche Date: Fri, 16 Aug 2024 01:52:36 +0200 Subject: [PATCH 18/62] Update README.md plugin format (#2788) * Update README.md plugin for Shortcut and OverwriteOutput See https://github.com/derailed/k9s/blob/a07243dbb09ed8b7727e3229ac0314ed2e475d37/change_logs/release_0.8.0.md#L51 for supported * Update README.md with plugin dangerous field Relates to https://github.com/derailed/k9s/issues/2604 introduced in https://github.com/derailed/k9s/pull/2637 --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 41252a3afa..81c0993032 100644 --- a/README.md +++ b/README.md @@ -647,7 +647,7 @@ K9s allows you to extend your command line and tooling by defining your very own A plugin is defined as follows: -* Shortcut option represents the key combination a user would type to activate the plugin +* Shortcut option represents the key combination a user would type to activate the plugin. Valid values are [a-z], Shift-[A-Z], Ctrl-[A-Z]. * Override option make that the default action related to the shortcut will be overrided by the plugin * Confirm option (when enabled) lets you see the command that is going to be executed and gives you an option to confirm or prevent execution * Description will be printed next to the shortcut in the k9s menu @@ -655,7 +655,8 @@ A plugin is defined as follows: * Command represents ad-hoc commands the plugin runs upon activation * Background specifies whether or not the command runs in the background * Args specifies the various arguments that should apply to the command above -* OverwriteOutput options allows plugin developers to provide custom messages on plugin execution +* OverwriteOutput boolean option allows plugin developers to provide custom messages on plugin stdout execution. See example in [#2644](https://github.com/derailed/k9s/pull/2644) +* Dangerous boolean option enables disabling the plugin when read-only mode is set. See [#2604](https://github.com/derailed/k9s/issues/2604) K9s does provide additional environment variables for you to customize your plugins arguments. Currently, the available environment variables are as follows: @@ -687,7 +688,9 @@ plugins: fred: shortCut: Ctrl-L override: false + overwriteOutput: false confirm: false + dangerous: false description: Pod logs scopes: - pods From 2a1f4e13b28861a5fc724dad38884227551f2941 Mon Sep 17 00:00:00 2001 From: Guillaume Berche Date: Fri, 16 Aug 2024 01:53:35 +0200 Subject: [PATCH 19/62] Update helm-purge.yaml (#2787) * Update helm-purge.yaml Document prereq to install https://github.com/robertsmieja/kubectl-purge in order for kubectl purge Otherwise fails with > $ kubectl purge > error: unknown command "purge" for "kubectl" * Update helm-purge.yaml --- plugins/helm-purge.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/helm-purge.yaml b/plugins/helm-purge.yaml index c84a8eaa30..f81f8a554c 100644 --- a/plugins/helm-purge.yaml +++ b/plugins/helm-purge.yaml @@ -1,6 +1,7 @@ # $HOME/.k9s/plugin.yml plugins: # Issues a helm delete --purge for the resource associated with the selected pod + # Requires https://github.com/derailed/k9s/blob/master/plugins/kubectl/kubectl-purge helm-purge: shortCut: Ctrl-P description: Helm Purge From 8e506b66d90d008adb45082c9cc4ed305e56f806 Mon Sep 17 00:00:00 2001 From: Michele Zanotti Date: Fri, 16 Aug 2024 01:54:55 +0200 Subject: [PATCH 20/62] feat: add duplik8s plugin (#2771) Signed-off-by: Michele Zanotti --- plugins/duplik8s.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plugins/duplik8s.yaml diff --git a/plugins/duplik8s.yaml b/plugins/duplik8s.yaml new file mode 100644 index 0000000000..ed63d144e6 --- /dev/null +++ b/plugins/duplik8s.yaml @@ -0,0 +1,50 @@ +# Duplicate Pods, Deployments and StatefulSet for easy debugging +# and troubleshooting. +# +# See https://github.com/Telemaco019/duplik8s +plugins: + duplicate-pod: + shortCut: Ctrl-T + description: Duplicate Pod + scopes: + - po + command: kubectl + background: true + args: + - duplicate + - pod + - $NAME + - -n + - $NAMESPACE + - --context + - $CONTEXT + duplicate-deployment: + shortCut: Ctrl-T + description: Duplicate Deployment + scopes: + - deploy + command: kubectl + background: true + args: + - duplicate + - deploy + - $NAME + - -n + - $NAMESPACE + - --context + - $CONTEXT + duplicate-statefulset: + shortCut: Ctrl-T + description: Duplicate StatefulSet + scopes: + - statefulset + command: kubectl + background: true + args: + - duplicate + - statefulset + - $NAME + - -n + - $NAMESPACE + - --context + - $CONTEXT From b3fbf325227e4c468aabafa6cca259fc49f765aa Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Fri, 16 Aug 2024 02:01:20 +0200 Subject: [PATCH 21/62] feat: allow plugins block in plugin files (#2770) --- internal/config/plugin.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/internal/config/plugin.go b/internal/config/plugin.go index c676f87fad..3b83ffa458 100644 --- a/internal/config/plugin.go +++ b/internal/config/plugin.go @@ -82,13 +82,21 @@ func (p Plugins) loadPluginDir(dir string) error { if file.IsDir() || !isYamlFile(file.Name()) { continue } - bb, err := os.ReadFile(filepath.Join(dir, file.Name())) + fileName := filepath.Join(dir, file.Name()) + fileContent, err := os.ReadFile(fileName) if err != nil { errs = errors.Join(errs, err) } var plugin Plugin - if err = yaml.Unmarshal(bb, &plugin); err != nil { - return err + if err = yaml.Unmarshal(fileContent, &plugin); err != nil { + var plugins Plugins + if err = yaml.Unmarshal(fileContent, &plugins); err != nil { + return fmt.Errorf("cannot parse %s into either a single plugin nor plugins: %w", fileName, err) + } + for name, plugin := range plugins.Plugins { + p.Plugins[name] = plugin + } + continue } p.Plugins[strings.TrimSuffix(file.Name(), filepath.Ext(file.Name()))] = plugin } From 92bd181ac0ff5f4d48cd921b5c3098bee807a430 Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Fri, 16 Aug 2024 08:10:03 +0800 Subject: [PATCH 22/62] enable "jump to owner" for more kinds (#2763) --- internal/view/cm.go | 4 +++- internal/view/cm_test.go | 2 +- internal/view/command.go | 6 +++++- internal/view/crd.go | 2 +- internal/view/cronjob.go | 4 +++- internal/view/dp.go | 4 +++- internal/view/dp_test.go | 2 +- internal/view/ds.go | 4 +++- internal/view/ds_test.go | 2 +- internal/view/pvc.go | 2 +- internal/view/pvc_test.go | 2 +- internal/view/sa.go | 2 +- internal/view/secret.go | 2 +- internal/view/secret_test.go | 2 +- internal/view/sts.go | 4 +++- internal/view/sts_test.go | 2 +- internal/view/svc.go | 4 +++- internal/view/svc_test.go | 2 +- 18 files changed, 34 insertions(+), 18 deletions(-) diff --git a/internal/view/cm.go b/internal/view/cm.go index 32d3e47c92..3a18477d22 100644 --- a/internal/view/cm.go +++ b/internal/view/cm.go @@ -21,7 +21,9 @@ type ConfigMap struct { // NewConfigMap returns a new viewer. func NewConfigMap(gvr client.GVR) ResourceViewer { s := ConfigMap{ - ResourceViewer: NewBrowser(gvr), + ResourceViewer: NewOwnerExtender( + NewBrowser(gvr), + ), } s.AddBindKeysFn(s.bindKeys) diff --git a/internal/view/cm_test.go b/internal/view/cm_test.go index 02781af46d..6e787defc8 100644 --- a/internal/view/cm_test.go +++ b/internal/view/cm_test.go @@ -16,5 +16,5 @@ func TestConfigMapNew(t *testing.T) { assert.Nil(t, s.Init(makeCtx())) assert.Equal(t, "ConfigMaps", s.Name()) - assert.Equal(t, 6, len(s.Hints())) + assert.Equal(t, 7, len(s.Hints())) } diff --git a/internal/view/command.go b/internal/view/command.go index befa0b8dca..318f8f42f0 100644 --- a/internal/view/command.go +++ b/internal/view/command.go @@ -286,7 +286,11 @@ func (c *Command) viewMetaFor(p *cmd.Interpreter) (client.GVR, *MetaViewer, erro p.Amend(ap) } - v := MetaViewer{viewerFn: NewBrowser} + v := MetaViewer{ + viewerFn: func(gvr client.GVR) ResourceViewer { + return NewOwnerExtender(NewBrowser(gvr)) + }, + } if mv, ok := customViewers[gvr]; ok { v = mv } diff --git a/internal/view/crd.go b/internal/view/crd.go index 7ff1a1f969..36f5e40d29 100644 --- a/internal/view/crd.go +++ b/internal/view/crd.go @@ -16,7 +16,7 @@ type CRD struct { // NewCRD returns a new viewer. func NewCRD(gvr client.GVR) ResourceViewer { s := CRD{ - ResourceViewer: NewBrowser(gvr), + ResourceViewer: NewOwnerExtender(NewBrowser(gvr)), } s.AddBindKeysFn(s.bindKeys) s.GetTable().SetEnterFn(s.showCRD) diff --git a/internal/view/cronjob.go b/internal/view/cronjob.go index 864a3381a8..5b1411cfee 100644 --- a/internal/view/cronjob.go +++ b/internal/view/cronjob.go @@ -35,7 +35,9 @@ type CronJob struct { // NewCronJob returns a new viewer. func NewCronJob(gvr client.GVR) ResourceViewer { - c := CronJob{ResourceViewer: NewVulnerabilityExtender(NewBrowser(gvr))} + c := CronJob{ResourceViewer: NewVulnerabilityExtender( + NewOwnerExtender(NewBrowser(gvr)), + )} c.AddBindKeysFn(c.bindKeys) c.GetTable().SetEnterFn(c.showJobs) diff --git a/internal/view/dp.go b/internal/view/dp.go index 6db577dd07..3c6760c84b 100644 --- a/internal/view/dp.go +++ b/internal/view/dp.go @@ -28,7 +28,9 @@ func NewDeploy(gvr client.GVR) ResourceViewer { NewRestartExtender( NewScaleExtender( NewImageExtender( - NewLogsExtender(NewBrowser(gvr), d.logOptions), + NewOwnerExtender( + NewLogsExtender(NewBrowser(gvr), d.logOptions), + ), ), ), ), diff --git a/internal/view/dp_test.go b/internal/view/dp_test.go index aa2935c164..a3e8a51fd4 100644 --- a/internal/view/dp_test.go +++ b/internal/view/dp_test.go @@ -16,5 +16,5 @@ func TestDeploy(t *testing.T) { assert.Nil(t, v.Init(makeCtx())) assert.Equal(t, "Deployments", v.Name()) - assert.Equal(t, 15, len(v.Hints())) + assert.Equal(t, 16, len(v.Hints())) } diff --git a/internal/view/ds.go b/internal/view/ds.go index 6e89f4215b..08aad21363 100644 --- a/internal/view/ds.go +++ b/internal/view/ds.go @@ -24,7 +24,9 @@ func NewDaemonSet(gvr client.GVR) ResourceViewer { NewVulnerabilityExtender( NewRestartExtender( NewImageExtender( - NewLogsExtender(NewBrowser(gvr), d.logOptions), + NewOwnerExtender( + NewLogsExtender(NewBrowser(gvr), d.logOptions), + ), ), ), ), diff --git a/internal/view/ds_test.go b/internal/view/ds_test.go index 2a73445d5d..94545218e2 100644 --- a/internal/view/ds_test.go +++ b/internal/view/ds_test.go @@ -16,5 +16,5 @@ func TestDaemonSet(t *testing.T) { assert.Nil(t, v.Init(makeCtx())) assert.Equal(t, "DaemonSets", v.Name()) - assert.Equal(t, 16, len(v.Hints())) + assert.Equal(t, 17, len(v.Hints())) } diff --git a/internal/view/pvc.go b/internal/view/pvc.go index 27d15749de..b071ca4cf2 100644 --- a/internal/view/pvc.go +++ b/internal/view/pvc.go @@ -18,7 +18,7 @@ type PersistentVolumeClaim struct { // NewPersistentVolumeClaim returns a new viewer. func NewPersistentVolumeClaim(gvr client.GVR) ResourceViewer { v := PersistentVolumeClaim{ - ResourceViewer: NewBrowser(gvr), + ResourceViewer: NewOwnerExtender(NewBrowser(gvr)), } v.AddBindKeysFn(v.bindKeys) diff --git a/internal/view/pvc_test.go b/internal/view/pvc_test.go index cdaaaaf2bb..7434729bc9 100644 --- a/internal/view/pvc_test.go +++ b/internal/view/pvc_test.go @@ -16,5 +16,5 @@ func TestPVCNew(t *testing.T) { assert.Nil(t, v.Init(makeCtx())) assert.Equal(t, "PersistentVolumeClaims", v.Name()) - assert.Equal(t, 10, len(v.Hints())) + assert.Equal(t, 11, len(v.Hints())) } diff --git a/internal/view/sa.go b/internal/view/sa.go index 63145e7cd4..358a024089 100644 --- a/internal/view/sa.go +++ b/internal/view/sa.go @@ -21,7 +21,7 @@ type ServiceAccount struct { // NewServiceAccount returns a new viewer. func NewServiceAccount(gvr client.GVR) ResourceViewer { s := ServiceAccount{ - ResourceViewer: NewBrowser(gvr), + ResourceViewer: NewOwnerExtender(NewBrowser(gvr)), } s.AddBindKeysFn(s.bindKeys) s.SetContextFn(s.subjectCtx) diff --git a/internal/view/secret.go b/internal/view/secret.go index d59e77ee1c..1db2752611 100644 --- a/internal/view/secret.go +++ b/internal/view/secret.go @@ -21,7 +21,7 @@ type Secret struct { // NewSecret returns a new viewer. func NewSecret(gvr client.GVR) ResourceViewer { s := Secret{ - ResourceViewer: NewBrowser(gvr), + ResourceViewer: NewOwnerExtender(NewBrowser(gvr)), } s.AddBindKeysFn(s.bindKeys) diff --git a/internal/view/secret_test.go b/internal/view/secret_test.go index fc07d6825f..a02972af3d 100644 --- a/internal/view/secret_test.go +++ b/internal/view/secret_test.go @@ -16,5 +16,5 @@ func TestSecretNew(t *testing.T) { assert.Nil(t, s.Init(makeCtx())) assert.Equal(t, "Secrets", s.Name()) - assert.Equal(t, 7, len(s.Hints())) + assert.Equal(t, 8, len(s.Hints())) } diff --git a/internal/view/sts.go b/internal/view/sts.go index 18636d9a2e..fa25e4d4f9 100644 --- a/internal/view/sts.go +++ b/internal/view/sts.go @@ -25,7 +25,9 @@ func NewStatefulSet(gvr client.GVR) ResourceViewer { NewRestartExtender( NewScaleExtender( NewImageExtender( - NewLogsExtender(NewBrowser(gvr), s.logOptions), + NewOwnerExtender( + NewLogsExtender(NewBrowser(gvr), s.logOptions), + ), ), ), ), diff --git a/internal/view/sts_test.go b/internal/view/sts_test.go index 5651fd38df..4455194528 100644 --- a/internal/view/sts_test.go +++ b/internal/view/sts_test.go @@ -16,5 +16,5 @@ func TestStatefulSetNew(t *testing.T) { assert.Nil(t, s.Init(makeCtx())) assert.Equal(t, "StatefulSets", s.Name()) - assert.Equal(t, 13, len(s.Hints())) + assert.Equal(t, 14, len(s.Hints())) } diff --git a/internal/view/svc.go b/internal/view/svc.go index 1517116819..9c92a8ef6f 100644 --- a/internal/view/svc.go +++ b/internal/view/svc.go @@ -35,7 +35,9 @@ type Service struct { func NewService(gvr client.GVR) ResourceViewer { s := Service{ ResourceViewer: NewPortForwardExtender( - NewLogsExtender(NewBrowser(gvr), nil), + NewOwnerExtender( + NewLogsExtender(NewBrowser(gvr), nil), + ), ), } s.AddBindKeysFn(s.bindKeys) diff --git a/internal/view/svc_test.go b/internal/view/svc_test.go index cc50f92fe7..19978d8f48 100644 --- a/internal/view/svc_test.go +++ b/internal/view/svc_test.go @@ -173,5 +173,5 @@ func TestServiceNew(t *testing.T) { assert.Nil(t, s.Init(makeCtx())) assert.Equal(t, "Services", s.Name()) - assert.Equal(t, 11, len(s.Hints())) + assert.Equal(t, 12, len(s.Hints())) } From cd04b6c9d80d3ab5b45fb201a76502f6e61bc9ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:10:26 -0600 Subject: [PATCH 23/62] Bump github.com/hashicorp/go-getter from 1.7.4 to 1.7.5 (#2759) Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.4 to 1.7.5. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml) - [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.4...v1.7.5) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-getter dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index aa0ce978f6..40899d3cc2 100644 --- a/go.mod +++ b/go.mod @@ -162,7 +162,7 @@ require ( github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect diff --git a/go.sum b/go.sum index f5715de95c..dbcabd5965 100644 --- a/go.sum +++ b/go.sum @@ -700,8 +700,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= -github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= +github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= From 37a5f05d17dae09562f7123a156e987bc2323f2a Mon Sep 17 00:00:00 2001 From: Brian Dols Date: Thu, 15 Aug 2024 19:12:09 -0500 Subject: [PATCH 24/62] Loki plugin (#2755) * plugin for loki logs * typo * COL-NAME -> NAME --- plugins/log-loki.yaml | 95 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 plugins/log-loki.yaml diff --git a/plugins/log-loki.yaml b/plugins/log-loki.yaml new file mode 100644 index 0000000000..23da9d6583 --- /dev/null +++ b/plugins/log-loki.yaml @@ -0,0 +1,95 @@ +plugins: + # https://grafana.com/docs/loki/latest/query/logcli/ + # you must set the LOKI_ADDR environment variable ("export LOKI_ADDR=https://loki.internal" in bash) before starting k9s to use logcli + loki-container: + shortCut: Shift-L + description: "loki fmt" + scopes: + - cantainers + command: logcli + background: false + args: + - query + - "{ namespace = \"$NAMESPACE\", pod = \"$POD\", container = \"$NAME\" }" + - -f + loki-container-raw: + shortCut: Ctrl-L + description: "loki raw" + scopes: + - containers + command: logcli + background: false + args: + - query + - "{ namespace = \"$NAMESPACE\", pod = \"$POD\", container = \"$NAME\" }" + - -f + - -oraw + loki-pods: + shortCut: Shift-L + description: "loki fmt" + scopes: + - po + command: logcli + background: false + args: + - query + - "{ namespace = \"$NAMESPACE\", pod = \"$NAME\" }" + - -f + loki-pods-raw: + shortCut: Ctrl-L + description: "loki raw" + scopes: + - po + command: logcli + background: false + args: + - query + - "{ namespace = \"$NAMESPACE\", pod = \"$NAME\" }" + - -f + - -oraw + loki-node: + shortCut: Shift-L + description: "loki fmt" + scopes: + - node + command: logcli + background: false + args: + - query + - "{ node_name = \"$NAME\" }" + - -f + loki-node-raw: + shortCut: Ctrl-L + description: "loki raw" + scopes: + - node + command: logcli + background: false + args: + - query + - "{ node_name = \"$NAME\" }" + - -f + - -oraw + loki-ns: + shortCut: Shift-L + description: "loki fmt" + scopes: + - namespace + command: logcli + background: false + args: + - query + - "{ namespace = \"$NAME\" }" + - -f + loki-ns-raw: + shortCut: Ctrl-L + description: "loki raw" + scopes: + - namespace + command: logcli + background: false + args: + - query + - "{ namespace = \"$NAME\" }" + - -f + - -oraw From 4b2111e327c323a8724442466ccae6452f6b6dca Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Fri, 16 Aug 2024 08:28:26 +0800 Subject: [PATCH 25/62] should switching ctx before ns (#2750) --- internal/view/command.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/view/command.go b/internal/view/command.go index 318f8f42f0..bb81826c26 100644 --- a/internal/view/command.go +++ b/internal/view/command.go @@ -160,14 +160,6 @@ func (c *Command) run(p *cmd.Interpreter, fqn string, clearStack bool) error { return err } - ns := c.app.Config.ActiveNamespace() - if cns, ok := p.NSArg(); ok { - ns = cns - } - if err := c.app.switchNS(ns); err != nil { - return err - } - if context, ok := p.HasContext(); ok { if context != c.app.Config.ActiveContextName() { if err := c.app.Config.Save(true); err != nil { @@ -193,6 +185,14 @@ func (c *Command) run(p *cmd.Interpreter, fqn string, clearStack bool) error { } } + ns := c.app.Config.ActiveNamespace() + if cns, ok := p.NSArg(); ok { + ns = cns + } + if err := c.app.switchNS(ns); err != nil { + return err + } + co := c.componentFor(gvr, fqn, v) co.SetFilter("") co.SetLabelFilter(nil) From 2a931b84ab85be96e224ee827d67de7641cea141 Mon Sep 17 00:00:00 2001 From: Thorben Below <56894536+thorbenbelow@users.noreply.github.com> Date: Fri, 16 Aug 2024 18:15:44 +0200 Subject: [PATCH 26/62] Fix: ensure correct ns for helm actions (#2652) Signed-off-by: Thorben Below <56894536+thorbenbelow@users.noreply.github.com> --- internal/dao/helm_chart.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/internal/dao/helm_chart.go b/internal/dao/helm_chart.go index 2efe9f6b60..819a9c638a 100644 --- a/internal/dao/helm_chart.go +++ b/internal/dao/helm_chart.go @@ -124,7 +124,6 @@ func (h *HelmChart) Delete(_ context.Context, path string, _ *metav1.DeletionPro func (h *HelmChart) Uninstall(path string, keepHist bool) error { ns, n := client.Namespaced(path) flags := h.Client().Config().Flags() - flags.Namespace = &ns cfg, err := ensureHelmConfig(flags, ns) if err != nil { return err @@ -145,8 +144,21 @@ func (h *HelmChart) Uninstall(path string, keepHist bool) error { // ensureHelmConfig return a new configuration. func ensureHelmConfig(flags *genericclioptions.ConfigFlags, ns string) (*action.Configuration, error) { + settings := &genericclioptions.ConfigFlags{ + Namespace: &ns, + Context: flags.Context, + BearerToken: flags.BearerToken, + APIServer: flags.APIServer, + CAFile: flags.CAFile, + KubeConfig: flags.KubeConfig, + Impersonate: flags.Impersonate, + Insecure: flags.Insecure, + TLSServerName: flags.TLSServerName, + ImpersonateGroup: flags.ImpersonateGroup, + WrapConfigFn: flags.WrapConfigFn, + } cfg := new(action.Configuration) - err := cfg.Init(flags, ns, os.Getenv("HELM_DRIVER"), helmLogger) + err := cfg.Init(settings, ns, os.Getenv("HELM_DRIVER"), helmLogger) return cfg, err } From 66f57bebbc4eaa20d9271421632eec4ad42f484e Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Sat, 17 Aug 2024 00:44:28 +0800 Subject: [PATCH 27/62] container logs should be escaped when printed (#2751) * container logs should be escaped when printed * reduce additional memory allocation * upgrade deps and move escape to tview --- go.mod | 14 +++++++------- go.sum | 29 +++++++++++++++-------------- internal/dao/log_item_test.go | 15 +++++++++++++-- internal/dao/pod.go | 3 ++- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 40899d3cc2..dd2709afbb 100644 --- a/go.mod +++ b/go.mod @@ -11,13 +11,13 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/derailed/popeye v0.11.3 github.com/derailed/tcell/v2 v2.3.1-rc.3 - github.com/derailed/tview v0.8.3 + github.com/derailed/tview v0.8.4 github.com/fatih/color v1.16.0 github.com/fsnotify/fsnotify v1.7.0 github.com/fvbommel/sortorder v1.1.0 github.com/go-errors/errors v1.4.2 github.com/mattn/go-colorable v0.1.13 - github.com/mattn/go-runewidth v0.0.15 + github.com/mattn/go-runewidth v0.0.16 github.com/olekukonko/tablewriter v0.0.5 github.com/petergtz/pegomock v2.9.0+incompatible github.com/rakyll/hey v0.1.4 @@ -26,7 +26,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/text v0.16.0 + golang.org/x/text v0.17.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.14.4 @@ -122,7 +122,7 @@ require ( github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect - github.com/gdamore/encoding v1.0.0 // indirect + github.com/gdamore/encoding v1.0.1 // indirect github.com/github/go-spdx/v2 v2.2.0 // indirect github.com/glebarez/go-sqlite v1.21.2 // indirect github.com/glebarez/sqlite v1.11.0 // indirect @@ -298,9 +298,9 @@ require ( golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/go.sum b/go.sum index dbcabd5965..ae1f4e4f05 100644 --- a/go.sum +++ b/go.sum @@ -393,8 +393,8 @@ github.com/derailed/popeye v0.11.3 h1:gQUp6zuSIRDBdyLS1Ln0nFs8FbQ+KGE+iQxe0w4Ug8 github.com/derailed/popeye v0.11.3/go.mod h1:HygqX7A8BwidorJjJUnWDZ5AvbxHIU7uRwXgOtn9GwY= 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.3 h1:jhN7LW7pfCWf7Z6VC5Dpi/1usavOBZxz2mY90//TMsU= -github.com/derailed/tview v0.8.3/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw= +github.com/derailed/tview v0.8.4 h1:V/ifCGCYRnYWTrYqFhqZZ/UTD0GASlSs+MD9mpYc/9A= +github.com/derailed/tview v0.8.4/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= @@ -480,8 +480,8 @@ github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= -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/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uhw= +github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/github/go-spdx/v2 v2.2.0 h1:yBBLMasHA70Ujd35OpL/OjJOWWVNXcJGbars0GinGRI= github.com/github/go-spdx/v2 v2.2.0/go.mod h1:hMCrsFgT0QnCwn7G8gxy/MxMpy67WgZrwFeISTn0o6w= @@ -863,8 +863,8 @@ github.com/mattn/go-localereader v0.0.2-0.20220822084749-2491eb6c1c75/go.mod h1: github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= @@ -1408,8 +1408,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1507,8 +1507,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1516,8 +1516,8 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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= @@ -1531,8 +1531,9 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= diff --git a/internal/dao/log_item_test.go b/internal/dao/log_item_test.go index 711db12384..f805f96fc8 100644 --- a/internal/dao/log_item_test.go +++ b/internal/dao/log_item_test.go @@ -10,6 +10,7 @@ import ( "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" + "github.com/derailed/tview" "github.com/stretchr/testify/assert" ) @@ -76,14 +77,24 @@ func TestLogItemRender(t *testing.T) { ShowTimestamp: false, }, log: fmt.Sprintf("%s %s\n", "2018-12-14T10:36:43.326972-07:00", "2021-10-28T13:06:37Z [INFO] [blah-blah] Testing 1,2,3..."), - e: "[yellow::]fred[-::] 2021-10-28T13:06:37Z [INFO] [blah-blah] Testing 1,2,3...\n", + e: "[yellow::]fred[-::] 2021-10-28T13:06:37Z [INFO[] [blah-blah[] Testing 1,2,3...\n", + }, + "escape": { + opts: dao.LogOptions{ + Path: "blee/fred", + Container: "", + SingleContainer: false, + ShowTimestamp: false, + }, + log: fmt.Sprintf("%s %s\n", "2018-12-14T10:36:43.326972-07:00", `{"foo":["bar"]} Server listening on: [::]:5000`), + e: `[yellow::]fred[-::] {"foo":["bar"[]} Server listening on: [::[]:5000` + "\n", }, } for k := range uu { u := uu[k] t.Run(k, func(t *testing.T) { - i := dao.NewLogItem([]byte(u.log)) + i := dao.NewLogItem([]byte(tview.Escape(u.log))) _, n := client.Namespaced(u.opts.Path) i.Pod, i.Container = n, u.opts.Container diff --git a/internal/dao/pod.go b/internal/dao/pod.go index c836137dd6..6e5919381a 100644 --- a/internal/dao/pod.go +++ b/internal/dao/pod.go @@ -16,6 +16,7 @@ import ( "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/watch" + "github.com/derailed/tview" "github.com/rs/zerolog/log" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -381,7 +382,7 @@ func readLogs(ctx context.Context, wg *sync.WaitGroup, stream io.ReadCloser, out for { var item *LogItem if bytes, err := r.ReadBytes('\n'); err == nil { - item = opts.ToLogItem(bytes) + item = opts.ToLogItem(tview.EscapeBytes(bytes)) } else { if errors.Is(err, io.EOF) { e := fmt.Errorf("Stream closed %w for %s", err, opts.Info()) From 64e46b61add90790e60645bd5481b359299ad101 Mon Sep 17 00:00:00 2001 From: Jayson Wang Date: Sat, 17 Aug 2024 08:27:26 +0800 Subject: [PATCH 28/62] update tview to fix log escaping problem completely (#2830) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index dd2709afbb..4c39bf001e 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/derailed/popeye v0.11.3 github.com/derailed/tcell/v2 v2.3.1-rc.3 - github.com/derailed/tview v0.8.4 + github.com/derailed/tview v0.8.5 github.com/fatih/color v1.16.0 github.com/fsnotify/fsnotify v1.7.0 github.com/fvbommel/sortorder v1.1.0 diff --git a/go.sum b/go.sum index ae1f4e4f05..4004b6f8d6 100644 --- a/go.sum +++ b/go.sum @@ -395,6 +395,8 @@ github.com/derailed/tcell/v2 v2.3.1-rc.3 h1:9s1fmyRcSPRlwr/C9tcpJKCujbrtmPpST6dc github.com/derailed/tcell/v2 v2.3.1-rc.3/go.mod h1:nf68BEL8fjmXQHJT3xZjoZFs2uXOzyJcNAQqGUEMrFY= github.com/derailed/tview v0.8.4 h1:V/ifCGCYRnYWTrYqFhqZZ/UTD0GASlSs+MD9mpYc/9A= github.com/derailed/tview v0.8.4/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw= +github.com/derailed/tview v0.8.5 h1:pogM/OnWlgDo6j4zyzdiIXh7E7+eT7D4CPfBnyaETug= +github.com/derailed/tview v0.8.5/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= From 88394a4cc2735c0913a4fd739264beb9e66bff60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cm=C3=BCt=20=C3=96zalp?= <54961032+uozalp@users.noreply.github.com> Date: Sun, 18 Aug 2024 17:23:56 +0200 Subject: [PATCH 29/62] Add leading space to Kubernetes context suggestions (#2791) --- internal/view/cmd/helpers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/view/cmd/helpers.go b/internal/view/cmd/helpers.go index 9ceec0dae8..0068dcbeb6 100644 --- a/internal/view/cmd/helpers.go +++ b/internal/view/cmd/helpers.go @@ -113,6 +113,10 @@ func completeCtx(s string, cc []string) []string { var suggests []string for _, ctxName := range cc { if suggest, ok := ShouldAddSuggest(s, ctxName); ok { + if len(s) == 0 { + suggests = append(suggests, " "+suggest) + continue + } suggests = append(suggests, suggest) } } From df7f0c9825e90d399d91afd311b26fb0f2403f60 Mon Sep 17 00:00:00 2001 From: daniel <106453412+0xfbad@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:22:05 -0400 Subject: [PATCH 30/62] Bump required GO version for build (#2844) As changed in #2812 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81c0993032..c2eb3c95d8 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ Binaries for Linux, Windows and Mac are available as tarballs in the [release pa ## Building From Source - K9s is currently using GO v1.21.X or above. + K9s is currently using GO v1.22.X or above. In order to build K9s from source you must: 1. Clone the repo From 61ea4375741805bf7bfe1448f56d60e3155d8ffd Mon Sep 17 00:00:00 2001 From: Arthur Coelho Date: Mon, 26 Aug 2024 12:08:31 -0300 Subject: [PATCH 31/62] Add color to hpa line when replicas >= maxpods (#2333) * feat: paint hpa line when replicas >= maxpods * chore: add license headers * refactor: decrease Assignment Branch Condition * validate IndexOf returns a valid index --- internal/model/registry.go | 10 ++++++ internal/render/hpa.go | 45 ++++++++++++++++++++++++ internal/render/hpa_test.go | 70 +++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 internal/render/hpa.go create mode 100644 internal/render/hpa_test.go diff --git a/internal/model/registry.go b/internal/model/registry.go index 97c2539455..e2129c3bff 100644 --- a/internal/model/registry.go +++ b/internal/model/registry.go @@ -202,4 +202,14 @@ var Registry = map[string]ResourceMeta{ "rbac.authorization.k8s.io/v1/rolebindings": { Renderer: &render.RoleBinding{}, }, + + // Autoscaling... + "autoscaling/v1/horizontalpodautoscalers": { + Renderer: &render.HorizontalPodAutoscaler{}, + DAO: &dao.Table{}, + }, + "autoscaling/v2/horizontalpodautoscalers": { + Renderer: &render.HorizontalPodAutoscaler{}, + DAO: &dao.Table{}, + }, } diff --git a/internal/render/hpa.go b/internal/render/hpa.go new file mode 100644 index 0000000000..064b576f35 --- /dev/null +++ b/internal/render/hpa.go @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of K9s + +package render + +import ( + "strconv" + "strings" + + "github.com/derailed/tcell/v2" +) + +// HorizontalPodAutoscaler renders a K8s HorizontalPodAutoscaler to screen. +type HorizontalPodAutoscaler struct { + Generic +} + +// ColorerFunc colors a resource row. +func (hpa HorizontalPodAutoscaler) ColorerFunc() ColorerFunc { + return func(ns string, h Header, re RowEvent) tcell.Color { + c := DefaultColorer(ns, h, re) + + maxPodsIndex := h.IndexOf("MAXPODS", true) + replicasIndex := h.IndexOf("REPLICAS", true) + if (maxPodsIndex < 0 || maxPodsIndex >= len(re.Row.Fields)) || (replicasIndex < 0 || replicasIndex >= len(re.Row.Fields)) { + return c + } + + maxPodsS := strings.TrimSpace(re.Row.Fields[maxPodsIndex]) + currentReplicasS := strings.TrimSpace(re.Row.Fields[replicasIndex]) + + maxPods, err := strconv.Atoi(maxPodsS) + if err != nil { + return c + } + currentReplicas, err := strconv.Atoi(currentReplicasS) + if err != nil { + return c + } + if currentReplicas >= maxPods { + c = ErrColor + } + return c + } +} diff --git a/internal/render/hpa_test.go b/internal/render/hpa_test.go new file mode 100644 index 0000000000..095978ffb8 --- /dev/null +++ b/internal/render/hpa_test.go @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of K9s + +package render + +import ( + "testing" + + "github.com/derailed/tcell/v2" + "github.com/derailed/tview" + "github.com/stretchr/testify/assert" +) + +func TestHorizontalPodAutoscalerColorer(t *testing.T) { + hpaHeader := Header{ + HeaderColumn{Name: "NAMESPACE"}, + HeaderColumn{Name: "NAME"}, + HeaderColumn{Name: "REFERENCE"}, + HeaderColumn{Name: "TARGETS%"}, + HeaderColumn{Name: "MINPODS", Align: tview.AlignRight}, + HeaderColumn{Name: "MAXPODS", Align: tview.AlignRight}, + HeaderColumn{Name: "REPLICAS", Align: tview.AlignRight}, + HeaderColumn{Name: "AGE", Time: true}, + } + + uu := map[string]struct { + h Header + re RowEvent + e tcell.Color + }{ + "when replicas = maxpods": { + h: hpaHeader, + re: RowEvent{ + Kind: EventUnchanged, + Row: Row{ + Fields: Fields{"blee", "fred", "fred", "100%", "1", "5", "5", "1d"}, + }, + }, + e: ErrColor, + }, + "when replicas > maxpods, for some reason": { + h: hpaHeader, + re: RowEvent{ + Kind: EventUnchanged, + Row: Row{ + Fields: Fields{"blee", "fred", "fred", "100%", "1", "5", "6", "1d"}, + }, + }, + e: ErrColor, + }, + "when replicas < maxpods": { + h: hpaHeader, + re: RowEvent{ + Kind: EventUnchanged, + Row: Row{ + Fields: Fields{"blee", "fred", "fred", "100%", "1", "5", "1", "1d"}, + }, + }, + e: StdColor, + }, + } + + var r HorizontalPodAutoscaler + for k := range uu { + u := uu[k] + t.Run(k, func(t *testing.T) { + assert.Equal(t, u.e, r.ColorerFunc()("", u.h, u.re)) + }) + } +} From ea27e8d0024f0eb79baa9c8ba773458aa5ec52e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:44:12 -0600 Subject: [PATCH 32/62] Bump golang from 1.22-alpine3.20 to 1.23-alpine3.20 (#2837) Bumps golang from 1.22-alpine3.20 to 1.23-alpine3.20. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c276a5664c..bb1ad8dfa3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- # The base image for building the k9s binary -FROM golang:1.22-alpine3.20 AS build +FROM golang:1.23-alpine3.20 AS build WORKDIR /k9s COPY go.mod go.sum main.go Makefile ./ From 35893ce49b941c8a2b8706a50cfc35a449572231 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:44:34 -0600 Subject: [PATCH 33/62] Bump github.com/go-errors/errors from 1.4.2 to 1.5.1 (#2840) Bumps [github.com/go-errors/errors](https://github.com/go-errors/errors) from 1.4.2 to 1.5.1. - [Release notes](https://github.com/go-errors/errors/releases) - [Commits](https://github.com/go-errors/errors/compare/v1.4.2...v1.5.1) --- updated-dependencies: - dependency-name: github.com/go-errors/errors dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 4c39bf001e..d1f2fde43c 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/fatih/color v1.16.0 github.com/fsnotify/fsnotify v1.7.0 github.com/fvbommel/sortorder v1.1.0 - github.com/go-errors/errors v1.4.2 + github.com/go-errors/errors v1.5.1 github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-runewidth v0.0.16 github.com/olekukonko/tablewriter v0.0.5 diff --git a/go.sum b/go.sum index 4004b6f8d6..87017e2e31 100644 --- a/go.sum +++ b/go.sum @@ -393,8 +393,6 @@ github.com/derailed/popeye v0.11.3 h1:gQUp6zuSIRDBdyLS1Ln0nFs8FbQ+KGE+iQxe0w4Ug8 github.com/derailed/popeye v0.11.3/go.mod h1:HygqX7A8BwidorJjJUnWDZ5AvbxHIU7uRwXgOtn9GwY= 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.4 h1:V/ifCGCYRnYWTrYqFhqZZ/UTD0GASlSs+MD9mpYc/9A= -github.com/derailed/tview v0.8.4/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw= github.com/derailed/tview v0.8.5 h1:pogM/OnWlgDo6j4zyzdiIXh7E7+eT7D4CPfBnyaETug= github.com/derailed/tview v0.8.5/go.mod h1:q+odnnhO6QDPpBT+0dqaWj+X+uoJ6MJehXj9shgP+Cw= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= @@ -499,8 +497,8 @@ github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GM github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ= github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= +github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= From 86015601851bd7670b0ff2e9ca62ec03eebb88e1 Mon Sep 17 00:00:00 2001 From: Eric Bissonnette Date: Wed, 28 Aug 2024 11:26:27 -0400 Subject: [PATCH 34/62] fix internal/render/hpa.go merge issue (#2856) --- internal/render/hpa.go | 19 ++++++++----- internal/render/hpa_test.go | 53 +++++++++++++++++++------------------ 2 files changed, 39 insertions(+), 33 deletions(-) diff --git a/internal/render/hpa.go b/internal/render/hpa.go index 064b576f35..e12df95dac 100644 --- a/internal/render/hpa.go +++ b/internal/render/hpa.go @@ -7,6 +7,7 @@ import ( "strconv" "strings" + "github.com/derailed/k9s/internal/model1" "github.com/derailed/tcell/v2" ) @@ -16,13 +17,17 @@ type HorizontalPodAutoscaler struct { } // ColorerFunc colors a resource row. -func (hpa HorizontalPodAutoscaler) ColorerFunc() ColorerFunc { - return func(ns string, h Header, re RowEvent) tcell.Color { - c := DefaultColorer(ns, h, re) +func (hpa HorizontalPodAutoscaler) ColorerFunc() model1.ColorerFunc { + return func(ns string, h model1.Header, re *model1.RowEvent) tcell.Color { + c := model1.DefaultColorer(ns, h, re) - maxPodsIndex := h.IndexOf("MAXPODS", true) - replicasIndex := h.IndexOf("REPLICAS", true) - if (maxPodsIndex < 0 || maxPodsIndex >= len(re.Row.Fields)) || (replicasIndex < 0 || replicasIndex >= len(re.Row.Fields)) { + maxPodsIndex, ok := h.IndexOf("MAXPODS", true) + if !ok || maxPodsIndex >= len(re.Row.Fields) { + return c + } + + replicasIndex, ok := h.IndexOf("REPLICAS", true) + if !ok || replicasIndex >= len(re.Row.Fields) { return c } @@ -38,7 +43,7 @@ func (hpa HorizontalPodAutoscaler) ColorerFunc() ColorerFunc { return c } if currentReplicas >= maxPods { - c = ErrColor + c = model1.ErrColor } return c } diff --git a/internal/render/hpa_test.go b/internal/render/hpa_test.go index 095978ffb8..21bb0855ba 100644 --- a/internal/render/hpa_test.go +++ b/internal/render/hpa_test.go @@ -6,57 +6,58 @@ package render import ( "testing" + "github.com/derailed/k9s/internal/model1" "github.com/derailed/tcell/v2" "github.com/derailed/tview" "github.com/stretchr/testify/assert" ) func TestHorizontalPodAutoscalerColorer(t *testing.T) { - hpaHeader := Header{ - HeaderColumn{Name: "NAMESPACE"}, - HeaderColumn{Name: "NAME"}, - HeaderColumn{Name: "REFERENCE"}, - HeaderColumn{Name: "TARGETS%"}, - HeaderColumn{Name: "MINPODS", Align: tview.AlignRight}, - HeaderColumn{Name: "MAXPODS", Align: tview.AlignRight}, - HeaderColumn{Name: "REPLICAS", Align: tview.AlignRight}, - HeaderColumn{Name: "AGE", Time: true}, + hpaHeader := model1.Header{ + model1.HeaderColumn{Name: "NAMESPACE"}, + model1.HeaderColumn{Name: "NAME"}, + model1.HeaderColumn{Name: "REFERENCE"}, + model1.HeaderColumn{Name: "TARGETS%"}, + model1.HeaderColumn{Name: "MINPODS", Align: tview.AlignRight}, + model1.HeaderColumn{Name: "MAXPODS", Align: tview.AlignRight}, + model1.HeaderColumn{Name: "REPLICAS", Align: tview.AlignRight}, + model1.HeaderColumn{Name: "AGE", Time: true}, } uu := map[string]struct { - h Header - re RowEvent + h model1.Header + re *model1.RowEvent e tcell.Color }{ "when replicas = maxpods": { h: hpaHeader, - re: RowEvent{ - Kind: EventUnchanged, - Row: Row{ - Fields: Fields{"blee", "fred", "fred", "100%", "1", "5", "5", "1d"}, + re: &model1.RowEvent{ + Kind: model1.EventUnchanged, + Row: model1.Row{ + Fields: model1.Fields{"blee", "fred", "fred", "100%", "1", "5", "5", "1d"}, }, }, - e: ErrColor, + e: model1.ErrColor, }, "when replicas > maxpods, for some reason": { h: hpaHeader, - re: RowEvent{ - Kind: EventUnchanged, - Row: Row{ - Fields: Fields{"blee", "fred", "fred", "100%", "1", "5", "6", "1d"}, + re: &model1.RowEvent{ + Kind: model1.EventUnchanged, + Row: model1.Row{ + Fields: model1.Fields{"blee", "fred", "fred", "100%", "1", "5", "6", "1d"}, }, }, - e: ErrColor, + e: model1.ErrColor, }, "when replicas < maxpods": { h: hpaHeader, - re: RowEvent{ - Kind: EventUnchanged, - Row: Row{ - Fields: Fields{"blee", "fred", "fred", "100%", "1", "5", "1", "1d"}, + re: &model1.RowEvent{ + Kind: model1.EventUnchanged, + Row: model1.Row{ + Fields: model1.Fields{"blee", "fred", "fred", "100%", "1", "5", "1", "1d"}, }, }, - e: StdColor, + e: model1.StdColor, }, } From 85ffca2fe29d6d65e3793ce95c721cae6f412af9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:03:54 -0600 Subject: [PATCH 35/62] Bump github.com/adrg/xdg from 0.4.0 to 0.5.0 (#2839) Bumps [github.com/adrg/xdg](https://github.com/adrg/xdg) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/adrg/xdg/releases) - [Commits](https://github.com/adrg/xdg/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: github.com/adrg/xdg dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d1f2fde43c..8090d43220 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/derailed/k9s go 1.22.0 require ( - github.com/adrg/xdg v0.4.0 + github.com/adrg/xdg v0.5.0 github.com/anchore/clio v0.0.0-20240209204744-cb94e40a4f65 github.com/anchore/grype v0.77.0 github.com/anchore/syft v1.2.0 diff --git a/go.sum b/go.sum index 87017e2e31..d57a79fe1b 100644 --- a/go.sum +++ b/go.sum @@ -231,8 +231,8 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/O github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/acobaugh/osrelease v0.1.0 h1:Yb59HQDGGNhCj4suHaFQQfBps5wyoKLSSX/J/+UifRE= github.com/acobaugh/osrelease v0.1.0/go.mod h1:4bFEs0MtgHNHBrmHCt67gNisnabCRAlzdVasCEGHTWY= -github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= -github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= +github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY= +github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= From b5710af314250917466e1546f87aeb7cab033dab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:04:11 -0600 Subject: [PATCH 36/62] Bump k8s.io/kubectl from 0.30.1 to 0.31.0 (#2838) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.30.1 to 0.31.0. - [Commits](https://github.com/kubernetes/kubectl/compare/v0.30.1...v0.31.0) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 33 +++++++++++----------- go.sum | 86 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 59 insertions(+), 60 deletions(-) diff --git a/go.mod b/go.mod index 8090d43220..8475c342ae 100644 --- a/go.mod +++ b/go.mod @@ -36,8 +36,8 @@ require ( k8s.io/cli-runtime v0.31.0 k8s.io/client-go v0.31.0 k8s.io/klog/v2 v2.130.1 - k8s.io/kubectl v0.30.1 - k8s.io/metrics v0.30.1 + k8s.io/kubectl v0.31.0 + k8s.io/metrics v0.31.0 sigs.k8s.io/yaml v1.4.0 ) @@ -84,7 +84,7 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v2 v2.0.4 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/charmbracelet/lipgloss v0.10.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect @@ -119,7 +119,7 @@ require ( github.com/facebookincubator/nvdtools v0.1.5 // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gdamore/encoding v1.0.1 // indirect @@ -196,7 +196,6 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/mholt/archiver/v3 v3.5.1 // indirect github.com/microsoft/go-rustaudit v0.0.0-20220730194248-4b17361d90a5 // indirect @@ -242,10 +241,10 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rubenv/sql-migrate v1.5.2 // indirect @@ -287,10 +286,10 @@ require ( github.com/zclconf/go-cty v1.14.0 // indirect go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.24.0 // indirect @@ -306,9 +305,9 @@ require ( golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.152.0 // indirect google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -316,7 +315,7 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gorm.io/gorm v1.25.9 // indirect k8s.io/apiserver v0.30.1 // indirect - k8s.io/component-base v0.30.1 // indirect + k8s.io/component-base v0.31.0 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect modernc.org/libc v1.41.0 // indirect diff --git a/go.sum b/go.sum index d57a79fe1b..ab630ea307 100644 --- a/go.sum +++ b/go.sum @@ -323,8 +323,8 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= @@ -463,8 +463,8 @@ github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= @@ -533,8 +533,8 @@ github.com/go-restruct/restruct v1.2.0-alpha/go.mod h1:KqrpKpn4M8OLznErihXTGLlsX 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/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= @@ -687,8 +687,8 @@ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWet github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b h1:wDUNC2eKiL35DbLvsDhiblTUXHxcOPwQSCzi7xpQUN4= github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b/go.mod h1:VzxiSdG6j1pi7rwGm/xYI5RbtpBgM8sARDXlvEvxlu0= github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= @@ -820,6 +820,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= +github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= @@ -869,8 +871,6 @@ github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= @@ -1013,26 +1013,26 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= 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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= @@ -1218,23 +1218,23 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -1773,10 +1773,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1813,8 +1813,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1891,16 +1891,16 @@ k8s.io/cli-runtime v0.31.0 h1:V2Q1gj1u3/WfhD475HBQrIYsoryg/LrhhK4RwpN+DhA= k8s.io/cli-runtime v0.31.0/go.mod h1:vg3H94wsubuvWfSmStDbekvbla5vFGC+zLWqcf+bGDw= k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= -k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ= -k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI= +k8s.io/component-base v0.31.0 h1:/KIzGM5EvPNQcYgwq5NwoQBaOlVFrghoVGr8lG6vNRs= +k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/kubectl v0.30.1 h1:sHFIRI3oP0FFZmBAVEE8ErjnTyXDPkBcvO88mH9RjuY= -k8s.io/kubectl v0.30.1/go.mod h1:7j+L0Cc38RYEcx+WH3y44jRBe1Q1jxdGPKkX0h4iDq0= -k8s.io/metrics v0.30.1 h1:PeA9cP0kxVtaC8Wkzp4sTkr7YSkd9R0UYP6cCHOOY1M= -k8s.io/metrics v0.30.1/go.mod h1:gVAhTTgfNKsn9D1kB7Nmb1T31relBuXzzGUE7klyOkM= +k8s.io/kubectl v0.31.0 h1:kANwAAPVY02r4U4jARP/C+Q1sssCcN/1p9Nk+7BQKVg= +k8s.io/kubectl v0.31.0/go.mod h1:pB47hhFypGsaHAPjlwrNbvhXgmuAr01ZBvAIIUaI8d4= +k8s.io/metrics v0.31.0 h1:s7Vu7W0oEZPTN8jgcoiWIXIZBmVxt7YP9MRVyIgMdOc= +k8s.io/metrics v0.31.0/go.mod h1:UNsz6swyX8FWkDoKN9ixPF75TBREMbHZIKjD7fydaOY= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= From 4a9f4c31535914e658558d713b83d8dd7cdec7aa Mon Sep 17 00:00:00 2001 From: Ruslan Timofieiev Date: Sat, 14 Sep 2024 21:40:45 +0300 Subject: [PATCH 37/62] Fix Mark-Range command: ensure that NS Favorite doesn't exceed the limit (#2881) * ensure that number of favorite namespace is never exceeds hard limit * remove newlines from files --- internal/config/data/ns.go | 9 ++++++++- internal/config/data/ns_test.go | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/internal/config/data/ns.go b/internal/config/data/ns.go index 819430356b..fb1a515b2b 100644 --- a/internal/config/data/ns.go +++ b/internal/config/data/ns.go @@ -12,7 +12,7 @@ import ( const ( // MaxFavoritesNS number # favorite namespaces to keep in the configuration. - MaxFavoritesNS = 9 + MaxFavoritesNS = 10 ) // Namespace tracks active and favorites namespaces. @@ -68,6 +68,13 @@ func (n *Namespace) Validate(c client.Connection) { n.rmFavNS(ns) } } + + if len(n.Favorites) > MaxFavoritesNS { + log.Debug().Msgf("[Namespace] Number of favorite exceeds hard limit of %v. Trimming.", MaxFavoritesNS) + for _, ns := range n.Favorites[MaxFavoritesNS:] { + n.rmFavNS(ns) + } + } } // SetActive set the active namespace. diff --git a/internal/config/data/ns_test.go b/internal/config/data/ns_test.go index d66b6903ed..a6e94aa36f 100644 --- a/internal/config/data/ns_test.go +++ b/internal/config/data/ns_test.go @@ -35,6 +35,17 @@ func TestNSValidateNoNS(t *testing.T) { assert.Equal(t, []string{"default"}, ns.Favorites) } +func TestNsValidateMaxNS(t *testing.T) { + allNS := []string{"ns9","ns8","ns7","ns6","ns5","ns4", "ns3", "ns2", "ns1", "all", "default"} + ns := data.NewNamespace() + + ns.Favorites = allNS + + ns.Validate(mock.NewMockConnection()) + + assert.Equal(t, data.MaxFavoritesNS, len(ns.Favorites)) +} + func TestNSSetActive(t *testing.T) { allNS := []string{"ns4", "ns3", "ns2", "ns1", "all", "default"} uu := []struct { From 1352113b8366016968351fa46060615f1e65dee7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:31:35 -0600 Subject: [PATCH 38/62] Bump alpine from 3.20.2 to 3.20.3 (#2876) Bumps alpine from 3.20.2 to 3.20.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bb1ad8dfa3..44b5a19a0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk --no-cache add --update make libx11-dev git gcc libc-dev curl && make bu # ----------------------------------------------------------------------------- # Build the final Docker image -FROM alpine:3.20.2 +FROM alpine:3.20.3 ARG KUBECTL_VERSION="v1.29.0" COPY --from=build /k9s/execs/k9s /bin/k9s From 17fc72be5148bc864952b787faec8969366095cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:03:02 -0600 Subject: [PATCH 39/62] Bump github.com/fatih/color from 1.16.0 to 1.17.0 (#2869) Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/fatih/color/releases) - [Commits](https://github.com/fatih/color/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: github.com/fatih/color dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8475c342ae..7a9fa0a981 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/derailed/popeye v0.11.3 github.com/derailed/tcell/v2 v2.3.1-rc.3 github.com/derailed/tview v0.8.5 - github.com/fatih/color v1.16.0 + github.com/fatih/color v1.17.0 github.com/fsnotify/fsnotify v1.7.0 github.com/fvbommel/sortorder v1.1.0 github.com/go-errors/errors v1.5.1 diff --git a/go.sum b/go.sum index ab630ea307..e37b08e66a 100644 --- a/go.sum +++ b/go.sum @@ -457,8 +457,8 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= From 1c712fef73f1802ce74ef2d856c441865e6aa2ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:03:45 -0600 Subject: [PATCH 40/62] Bump github.com/rs/zerolog from 1.32.0 to 1.33.0 (#2868) Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.32.0 to 1.33.0. - [Commits](https://github.com/rs/zerolog/compare/v1.32.0...v1.33.0) --- updated-dependencies: - dependency-name: github.com/rs/zerolog dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7a9fa0a981..4adf286a4e 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/olekukonko/tablewriter v0.0.5 github.com/petergtz/pegomock v2.9.0+incompatible github.com/rakyll/hey v0.1.4 - github.com/rs/zerolog v1.32.0 + github.com/rs/zerolog v1.33.0 github.com/sahilm/fuzzy v0.1.1 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index e37b08e66a..644a0b7c5d 100644 --- a/go.sum +++ b/go.sum @@ -1046,8 +1046,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/rubenv/sql-migrate v1.5.2 h1:bMDqOnrJVV/6JQgQ/MxOpU+AdO8uzYYA/TxFUBzFtS0= github.com/rubenv/sql-migrate v1.5.2/go.mod h1:H38GW8Vqf8F0Su5XignRyaRcbXbJunSWxs+kmzlg0Is= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= From c1613feeef7496f15ef776fe4d1a85656abd8f6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 09:10:06 -0600 Subject: [PATCH 41/62] Bump k8s.io/apiextensions-apiserver from 0.30.1 to 0.31.1 (#2887) Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.30.1 to 0.31.1. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.30.1...v0.31.1) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 4adf286a4e..d7e1fce6c0 100644 --- a/go.mod +++ b/go.mod @@ -30,11 +30,11 @@ require ( gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.14.4 - k8s.io/api v0.31.0 - k8s.io/apiextensions-apiserver v0.30.1 - k8s.io/apimachinery v0.31.0 + k8s.io/api v0.31.1 + k8s.io/apiextensions-apiserver v0.31.1 + k8s.io/apimachinery v0.31.1 k8s.io/cli-runtime v0.31.0 - k8s.io/client-go v0.31.0 + k8s.io/client-go v0.31.1 k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.31.0 k8s.io/metrics v0.31.0 @@ -314,8 +314,8 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gorm.io/gorm v1.25.9 // indirect - k8s.io/apiserver v0.30.1 // indirect - k8s.io/component-base v0.31.0 // indirect + k8s.io/apiserver v0.31.1 // indirect + k8s.io/component-base v0.31.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect modernc.org/libc v1.41.0 // indirect diff --git a/go.sum b/go.sum index 644a0b7c5d..88856be471 100644 --- a/go.sum +++ b/go.sum @@ -1879,20 +1879,20 @@ 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.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= -k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= -k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= -k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= -k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= -k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= -k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= +k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= +k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= k8s.io/cli-runtime v0.31.0 h1:V2Q1gj1u3/WfhD475HBQrIYsoryg/LrhhK4RwpN+DhA= k8s.io/cli-runtime v0.31.0/go.mod h1:vg3H94wsubuvWfSmStDbekvbla5vFGC+zLWqcf+bGDw= -k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= -k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= -k8s.io/component-base v0.31.0 h1:/KIzGM5EvPNQcYgwq5NwoQBaOlVFrghoVGr8lG6vNRs= -k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= +k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= From 2492402ba3311ab6618f58d692ad15518c54cac6 Mon Sep 17 00:00:00 2001 From: linchizhen Date: Sun, 22 Sep 2024 23:56:55 +0800 Subject: [PATCH 42/62] chore: fix function name (#2861) Signed-off-by: linchizhen --- internal/render/pod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/render/pod.go b/internal/render/pod.go index 829834df5a..7acb6e2d43 100644 --- a/internal/render/pod.go +++ b/internal/render/pod.go @@ -401,7 +401,7 @@ func checkInitContainerStatus(cs v1.ContainerStatus, count, initCount int, resta return "Init:" + strconv.Itoa(count) + "/" + strconv.Itoa(initCount) } -// PosStatus computes pod status. +// PodStatus computes pod status. func PodStatus(pod *v1.Pod) string { reason := string(pod.Status.Phase) if pod.Status.Reason != "" { From 6e0e41670672d0aa524a3df859feb6f772381c07 Mon Sep 17 00:00:00 2001 From: Rob Quist Date: Sun, 29 Sep 2024 17:43:02 +0200 Subject: [PATCH 43/62] Update README.md (#2890) Update installation information for Ubuntu / Debian --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c2eb3c95d8..2bc7138b54 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,12 @@ Binaries for Linux, Windows and Mac are available as tarballs in the [release pa pkg install k9s ``` +* On Ubuntu + + ```shell + wget https://github.com/derailed/k9s/releases/download/v0.32.5/k9s_linux_amd64.deb && apt install ./k9s_linux_amd64.deb && rm k9s_linux_amd64.deb + ``` + * Via [Winget](https://github.com/microsoft/winget-cli) for Windows ```shell From a22cdbb2591f8250f24c830e91cbc3ee5c2a4492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:31:14 -0600 Subject: [PATCH 44/62] Bump golangci/golangci-lint-action from 6.1.0 to 6.1.1 (#2905) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.1.0...v6.1.1) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 65c8b6b683..d8cc69edd6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: cache-dependency-path: go.sum - name: Lint - uses: golangci/golangci-lint-action@v6.1.0 + uses: golangci/golangci-lint-action@v6.1.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-pr-check \ No newline at end of file From 6fc151bda25ee0bc9bf1d55e7704263ebcbb1c47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 09:31:38 -0600 Subject: [PATCH 45/62] Bump actions/checkout from 4.1.6 to 4.2.1 (#2906) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.2.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.6...v4.2.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d8cc69edd6..8023d80da1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.2.1 - name: Install Go uses: actions/setup-go@v5.0.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3daa80825e..e55078b7ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4.1.6 + uses: actions/checkout@v4.2.1 - name: Install Go uses: actions/setup-go@v5.0.2 From 8a16b57c09c46dc4be2c9f02ac02da10043610e3 Mon Sep 17 00:00:00 2001 From: Eric Bissonnette Date: Sun, 13 Oct 2024 10:06:52 -0400 Subject: [PATCH 46/62] Include sidecar containers requests and limits (#2848) * include sidecar container metrics * apply code review suggestions --- internal/render/pod.go | 18 +- internal/render/pod_int_test.go | 124 ++++++++-- internal/render/pod_test.go | 16 ++ internal/render/testdata/po_sidecar.json | 293 +++++++++++++++++++++++ 4 files changed, 432 insertions(+), 19 deletions(-) create mode 100644 internal/render/testdata/po_sidecar.json diff --git a/internal/render/pod.go b/internal/render/pod.go index 7acb6e2d43..e78073528a 100644 --- a/internal/render/pod.go +++ b/internal/render/pod.go @@ -132,7 +132,7 @@ func (p Pod) Render(o interface{}, ns string, row *model1.Row) error { if pwm.MX != nil { ccmx = pwm.MX.Containers } - c, r := gatherCoMX(po.Spec.Containers, ccmx) + c, r := gatherCoMX(&po.Spec, ccmx) phase := p.Phase(&po) row.ID = client.MetaFQN(po.ObjectMeta) @@ -223,7 +223,11 @@ func (p *PodWithMetrics) DeepCopyObject() runtime.Object { return p } -func gatherCoMX(cc []v1.Container, ccmx []mv1beta1.ContainerMetrics) (c, r metric) { +func gatherCoMX(spec *v1.PodSpec, ccmx []mv1beta1.ContainerMetrics) (c, r metric) { + cc := make([]v1.Container, 0, len(spec.InitContainers)+len(spec.Containers)) + cc = append(cc, filterRestartableInitCO(spec.InitContainers)...) + cc = append(cc, spec.Containers...) + rcpu, rmem := cosRequests(cc) r.cpu, r.mem = rcpu.MilliValue(), rmem.Value() @@ -490,3 +494,13 @@ func hasPodReadyCondition(conditions []v1.PodCondition) bool { func restartableInitCO(p *v1.ContainerRestartPolicy) bool { return p != nil && *p == v1.ContainerRestartPolicyAlways } + +func filterRestartableInitCO(cc []v1.Container) []v1.Container { + rcc := make([]v1.Container, 0, len(cc)) + for _, c := range cc { + if c.RestartPolicy != nil && *c.RestartPolicy == v1.ContainerRestartPolicyAlways { + rcc = append(rcc, c) + } + } + return rcc +} diff --git a/internal/render/pod_int_test.go b/internal/render/pod_int_test.go index 74d9bcee2c..08ca4ed402 100644 --- a/internal/render/pod_int_test.go +++ b/internal/render/pod_int_test.go @@ -295,16 +295,78 @@ func Test_restartableInitCO(t *testing.T) { } } +func Test_filterRestartableInitCO(t *testing.T) { + always := v1.ContainerRestartPolicyAlways + + uu := map[string]struct { + cc []v1.Container + ecc []v1.Container + }{ + "empty": { + cc: []v1.Container{}, + ecc: []v1.Container{}, + }, + "restartable": { + cc: []v1.Container{ + { + Name: "c1", + RestartPolicy: &always, + }, + }, + ecc: []v1.Container{ + { + Name: "c1", + RestartPolicy: &always, + }, + }, + }, + "not-restartable": { + cc: []v1.Container{ + { + Name: "c1", + }, + }, + ecc: []v1.Container{}, + }, + "mixed": { + cc: []v1.Container{ + { + Name: "c1", + }, + { + Name: "c2", + RestartPolicy: &always, + }, + }, + ecc: []v1.Container{ + { + Name: "c2", + RestartPolicy: &always, + }, + }, + }, + } + + for k := range uu { + u := uu[k] + t.Run(k, func(t *testing.T) { + assert.Equal(t, u.ecc, filterRestartableInitCO(u.cc)) + }) + } +} + func Test_gatherPodMx(t *testing.T) { uu := map[string]struct { - cc []v1.Container + spec *v1.PodSpec mx []mv1beta1.ContainerMetrics c, r metric perc string }{ "single": { - cc: []v1.Container{ - makeContainer("c1", false, "10m", "1Mi", "20m", "2Mi"), + spec: &v1.PodSpec{ + Containers: []v1.Container{ + makeContainer("c1", false, "10m", "1Mi", "20m", "2Mi"), + }, }, mx: []mv1beta1.ContainerMetrics{ makeCoMX("c1", "1m", "22Mi"), @@ -322,10 +384,12 @@ func Test_gatherPodMx(t *testing.T) { perc: "10", }, "multi": { - cc: []v1.Container{ - makeContainer("c1", false, "11m", "22Mi", "111m", "44Mi"), - makeContainer("c2", false, "93m", "1402Mi", "0m", "2804Mi"), - makeContainer("c3", false, "11m", "34Mi", "0m", "69Mi"), + spec: &v1.PodSpec{ + Containers: []v1.Container{ + makeContainer("c1", false, "11m", "22Mi", "111m", "44Mi"), + makeContainer("c2", false, "93m", "1402Mi", "0m", "2804Mi"), + makeContainer("c3", false, "11m", "34Mi", "0m", "69Mi"), + }, }, r: metric{ cpu: 11 + 93 + 11, @@ -344,12 +408,37 @@ func Test_gatherPodMx(t *testing.T) { }, perc: "46", }, + "sidecar": { + spec: &v1.PodSpec{ + Containers: []v1.Container{ + makeContainer("c1", false, "11m", "22Mi", "111m", "44Mi"), + }, + InitContainers: []v1.Container{ + makeContainer("c2", true, "93m", "1402Mi", "0m", "2804Mi"), + }, + }, + r: metric{ + cpu: 11 + 93, + mem: (22 + 1402) * client.MegaByte, + lcpu: 111 + 0, + lmem: (44 + 2804) * client.MegaByte, + }, + mx: []mv1beta1.ContainerMetrics{ + makeCoMX("c1", "1m", "22Mi"), + makeCoMX("c2", "51m", "1275Mi"), + }, + c: metric{ + cpu: 1 + 51, + mem: (22 + 1275) * client.MegaByte, + }, + perc: "50", + }, } for k := range uu { u := uu[k] t.Run(k, func(t *testing.T) { - c, r := gatherCoMX(u.cc, u.mx) + c, r := gatherCoMX(u.spec, u.mx) assert.Equal(t, u.c.cpu, c.cpu) assert.Equal(t, u.c.mem, c.mem) assert.Equal(t, u.c.lcpu, c.lcpu) @@ -427,18 +516,19 @@ func Test_podRequests(t *testing.T) { // Helpers... -func makeContainer(n string, init bool, rc, rm, lc, lm string) v1.Container { +func makeContainer(n string, restartable bool, rc, rm, lc, lm string) v1.Container { + always := v1.ContainerRestartPolicyAlways var res v1.ResourceRequirements - if init { - res = v1.ResourceRequirements{} - } else { - res = v1.ResourceRequirements{ - Requests: makeRes(rc, rm), - Limits: makeRes(lc, lm), - } + var rp *v1.ContainerRestartPolicy + res = v1.ResourceRequirements{ + Requests: makeRes(rc, rm), + Limits: makeRes(lc, lm), + } + if restartable { + rp = &always } - return v1.Container{Name: n, Resources: res} + return v1.Container{Name: n, Resources: res, RestartPolicy: rp} } func makeRes(c, m string) v1.ResourceList { diff --git a/internal/render/pod_test.go b/internal/render/pod_test.go index 57fe6c4da8..92b35ac02a 100644 --- a/internal/render/pod_test.go +++ b/internal/render/pod_test.go @@ -198,6 +198,22 @@ func TestPodInitRender(t *testing.T) { assert.Equal(t, e, r.Fields[:19]) } +func TestPodSidecarRender(t *testing.T) { + pom := render.PodWithMetrics{ + Raw: load(t, "po_sidecar"), + MX: makePodMX("sleep", "100m", "40Mi"), + } + + var po render.Pod + r := model1.NewRow(14) + err := po.Render(&pom, "", &r) + assert.Nil(t, err) + + assert.Equal(t, "default/sleep", r.ID) + e := model1.Fields{"default", "sleep", "0", "●", "1/1", "Running", "0", "100", "40", "50:250", "50:80", "200", "40", "80", "50", "10.244.0.8", "kind-control-plane", "", ""} + assert.Equal(t, e, r.Fields[:19]) +} + func TestCheckPodStatus(t *testing.T) { uu := map[string]struct { pod v1.Pod diff --git a/internal/render/testdata/po_sidecar.json b/internal/render/testdata/po_sidecar.json new file mode 100644 index 0000000000..b9caf349e1 --- /dev/null +++ b/internal/render/testdata/po_sidecar.json @@ -0,0 +1,293 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "creationTimestamp": "2024-08-24T01:54:32Z", + "name": "sleep", + "namespace": "default", + "resourceVersion": "17852", + "uid": "35079257-0ffb-4b09-b2c1-3c0d416f2523" + }, + "spec": { + "containers": [ + { + "command": [ + "/bin/sleep", + "60" + ], + "image": "istio/base", + "imagePullPolicy": "Always", + "name": "sleep", + "resources": { + "limits": { + "cpu": "230m", + "memory": "40Mi" + }, + "requests": { + "cpu": "30m", + "memory": "10Mi" + } + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mphcq", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "enableServiceLinks": true, + "initContainers": [ + { + "command": [ + "/bin/sleep", + "1" + ], + "image": "istio/base", + "imagePullPolicy": "Always", + "name": "init", + "resources": { + "limits": { + "cpu": "333m", + "memory": "333Mi" + }, + "requests": { + "cpu": "333m", + "memory": "333Mi" + } + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mphcq", + "readOnly": true + } + ] + }, + { + "command": [ + "/bin/sleep", + "60" + ], + "image": "istio/base", + "imagePullPolicy": "Always", + "name": "sidecar", + "resources": { + "limits": { + "cpu": "20m", + "memory": "40Mi" + }, + "requests": { + "cpu": "20m", + "memory": "40Mi" + } + }, + "restartPolicy": "Always", + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mphcq", + "readOnly": true + } + ] + } + ], + "nodeName": "kind-control-plane", + "preemptionPolicy": "PreemptLowerPriority", + "priority": 0, + "restartPolicy": "Never", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "default", + "serviceAccountName": "default", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoExecute", + "key": "node.kubernetes.io/not-ready", + "operator": "Exists", + "tolerationSeconds": 300 + }, + { + "effect": "NoExecute", + "key": "node.kubernetes.io/unreachable", + "operator": "Exists", + "tolerationSeconds": 300 + } + ], + "volumes": [ + { + "name": "kube-api-access-mphcq", + "projected": { + "defaultMode": 420, + "sources": [ + { + "serviceAccountToken": { + "expirationSeconds": 3607, + "path": "token" + } + }, + { + "configMap": { + "items": [ + { + "key": "ca.crt", + "path": "ca.crt" + } + ], + "name": "kube-root-ca.crt" + } + }, + { + "downwardAPI": { + "items": [ + { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + }, + "path": "namespace" + } + ] + } + } + ] + } + } + ] + }, + "status": { + "conditions": [ + { + "lastProbeTime": null, + "lastTransitionTime": "2024-08-24T01:54:36Z", + "status": "True", + "type": "PodReadyToStartContainers" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2024-08-24T01:54:38Z", + "status": "True", + "type": "Initialized" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2024-08-24T01:54:39Z", + "status": "True", + "type": "Ready" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2024-08-24T01:54:39Z", + "status": "True", + "type": "ContainersReady" + }, + { + "lastProbeTime": null, + "lastTransitionTime": "2024-08-24T01:54:32Z", + "status": "True", + "type": "PodScheduled" + } + ], + "containerStatuses": [ + { + "containerID": "containerd://a1848056a183e40afe3189fc4920bd565930180ebdf2f9e2daf778ea8105f93e", + "image": "docker.io/istio/base:latest", + "imageID": "docker.io/istio/base@sha256:61673929bc39a86dca7d978b27fc632d3e590bc59cd8b2f386408751d007c91e", + "lastState": {}, + "name": "sleep", + "ready": true, + "restartCount": 0, + "started": true, + "state": { + "running": { + "startedAt": "2024-08-24T01:54:38Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mphcq", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + } + ], + "hostIP": "172.18.0.2", + "hostIPs": [ + { + "ip": "172.18.0.2" + } + ], + "initContainerStatuses": [ + { + "containerID": "containerd://75295261e5d751382c9a6ffa4477b84af2934686c360dcba2d8a6b9bc0f8cada", + "image": "docker.io/istio/base:latest", + "imageID": "docker.io/istio/base@sha256:61673929bc39a86dca7d978b27fc632d3e590bc59cd8b2f386408751d007c91e", + "lastState": {}, + "name": "init", + "ready": true, + "restartCount": 0, + "started": false, + "state": { + "terminated": { + "containerID": "containerd://75295261e5d751382c9a6ffa4477b84af2934686c360dcba2d8a6b9bc0f8cada", + "exitCode": 0, + "finishedAt": "2024-08-24T01:54:37Z", + "reason": "Completed", + "startedAt": "2024-08-24T01:54:35Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mphcq", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + }, + { + "containerID": "containerd://7a0d216a09630040c5b165c42cc9d2a95d541d95b6ac0a5ca604bf767d1b2cf0", + "image": "docker.io/istio/base:latest", + "imageID": "docker.io/istio/base@sha256:61673929bc39a86dca7d978b27fc632d3e590bc59cd8b2f386408751d007c91e", + "lastState": {}, + "name": "sidecar", + "ready": true, + "restartCount": 0, + "started": true, + "state": { + "running": { + "startedAt": "2024-08-24T01:54:38Z" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "name": "kube-api-access-mphcq", + "readOnly": true, + "recursiveReadOnly": "Disabled" + } + ] + } + ], + "phase": "Running", + "podIP": "10.244.0.8", + "podIPs": [ + { + "ip": "10.244.0.8" + } + ], + "qosClass": "Burstable", + "startTime": "2024-08-24T01:54:32Z" + } +} \ No newline at end of file From 42bc8fcaacfab0feed1e341ff5fba7de8acf4bf2 Mon Sep 17 00:00:00 2001 From: Eitan Nargassi <155459646+eitan-papaya@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:16:26 +0300 Subject: [PATCH 47/62] Add argocd plugin (#2898) --- plugins/argocd.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/argocd.yaml diff --git a/plugins/argocd.yaml b/plugins/argocd.yaml new file mode 100644 index 0000000000..f69fadde34 --- /dev/null +++ b/plugins/argocd.yaml @@ -0,0 +1,15 @@ +plugins: + argocd: + shortCut: "s" + description: Sync ArgoCD Application + scopes: + - application + command: argocd + args: + - app + - sync + - $NAME + - --app-namespace + - $NAMESPACE + background: true + confirm: true From f139a5700d78c806eb7274bcd9155be44d0d5b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Kopeck=C3=BD?= Date: Mon, 14 Oct 2024 17:17:20 +0200 Subject: [PATCH 48/62] feat(2896): Add toggle keda plugin (#2897) * feat(2896): Add toggle keda plugin Also update formating of plugins readme table and fix links Signed-off-by: SamoKopecky * chore: Fix table formating Signed-off-by: SamoKopecky --------- Signed-off-by: SamoKopecky --- plugins/README.md | 28 ++++++++++++++++------------ plugins/keda-toggle.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 plugins/keda-toggle.yaml diff --git a/plugins/README.md b/plugins/README.md index 8d48715471..8b947f6dda 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -4,17 +4,21 @@ K9s plugins extend the tool to provide additional functionality via actions to f Following is an example of some of plugin files in this directory. Other files are not listed in this table. -| Plugin-Name | Description | Available on Views | Shortcut | Kubectl plugin, external dependencies | -|--------------------|------------------------------------------------------------------|--------------------------|----------|---------------------------------------------------------------------------------------| -| debug-container.yml| Add [ephemeral debug container][1]
([nicolaka/netshoot][2]) | containers | Shift-d | | -| dive.yml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) | -| get-all.yml | get all resources in a namespace | all | g | [Krew](https://krew.sigs.k8s.io/), [ketall](https://github.com/corneliusweig/ketall/) | -| job_suspend.yml | Suspends a running cronjob | cronjobs | Ctrl-s | | -| k3d_root_shell.yml | Root shell to k3d container | containers | Shift-s | [jq](https://stedolan.github.io/jq/) | -| resource-recommendations.yml | View recommendations for CPU/Memory requests based on historical data | deployments/daemonsets/statefulsets | Shift-k | [Robusta KRR](https://github.com/robusta-dev/krr) | -| log_stern.yml | View resource logs using stern | pods | Ctrl-l | | -| log_jq.yml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq | -| log_full.yml | get full logs from pod/container | pods/containers | Ctrl-l | | -| ai-incident-investigation.yaml | Run AI investigation on application issues to find the root cause in seconds | all | Shift-h/o | [HolmesGPT](https://github.com/robusta-dev/holmesgpt) | +| Plugin-Name | Description | Available on Views | Shortcut | Kubectl plugin, external dependencies | +| ------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------- | --------- | ------------------------------------------------------------------------------------- | +| debug-container.yml | Add [ephemeral debug container](1)
([nicolaka/netshoot](2)) | containers | Shift-d | | +| dive.yml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) | +| get-all.yml | get all resources in a namespace | all | g | [Krew](https://krew.sigs.k8s.io/), [ketall](https://github.com/corneliusweig/ketall/) | +| job_suspend.yml | Suspends a running cronjob | cronjobs | Ctrl-s | | +| k3d_root_shell.yml | Root shell to k3d container | containers | Shift-s | [jq](https://stedolan.github.io/jq/) | +| resource-recommendations.yml | View recommendations for CPU/Memory requests based on historical data | deployments/daemonsets/statefulsets | Shift-k | [Robusta KRR](https://github.com/robusta-dev/krr) | +| log_stern.yml | View resource logs using stern | pods | Ctrl-l | | +| log_jq.yml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq | +| log_full.yml | get full logs from pod/container | pods/containers | Ctrl-l | | +| ai-incident-investigation.yaml | Run AI investigation on application issues to find the root cause in seconds | all | Shift-h/o | [HolmesGPT](https://github.com/robusta-dev/holmesgpt) | +| toggle-keda | Enable/disable [keda](3) ScaledObject autoscaler | scaledobjects | Ctrl-N | | + + [1]: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container [2]: https://github.com/nicolaka/netshoot +[3]: https://keda.sh/ diff --git a/plugins/keda-toggle.yaml b/plugins/keda-toggle.yaml new file mode 100644 index 0000000000..a4370c0f72 --- /dev/null +++ b/plugins/keda-toggle.yaml @@ -0,0 +1,26 @@ +plugins: + toggle-keda: + shortCut: Ctrl-N + override: false + overwriteOutput: true + confirm: false + dangerous: true + description: Toggle autoscaling on keda scaledobject + scopes: + - scaledobjects + command: bash + background: true + args: + - -c + - | + ANNOTATION="autoscaling.keda.sh/paused-replicas" + + if kubectl get scaledobject $NAME -n $NAMESPACE -o yaml | grep -q "$ANNOTATION: \"0\""; then + # If annotation found, remove it + kubectl annotate scaledobject $NAME "$ANNOTATION"- -n $NAMESPACE --context $CONTEXT >/dev/null && echo "Keda autoscaling for $NAME enabled" + else + # If annotation not found, add it + kubectl annotate scaledobject $NAME "$ANNOTATION"=0 -n $NAMESPACE --context $CONTEXT >/dev/null && echo "Keda autoscaling for $NAME disabled" + fi + + From be1ec87840325d13f4fb74a35b2e3e4d33048aa6 Mon Sep 17 00:00:00 2001 From: ffais <42377700+ffais@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:54:57 +0200 Subject: [PATCH 49/62] feat: added StartupProbes status (S) to the PROBES column in the container render (#2920) * feat: added StartupProbes status (S) to the PROBES column in the container render Signed-off-by: ffais * fix: fix tests in container render Signed-off-by: ffais --------- Signed-off-by: ffais --- internal/render/container.go | 4 ++-- internal/render/container_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/render/container.go b/internal/render/container.go index 35f700f267..c4982b3b38 100644 --- a/internal/render/container.go +++ b/internal/render/container.go @@ -79,7 +79,7 @@ func (Container) Header(ns string) model1.Header { model1.HeaderColumn{Name: "STATE"}, model1.HeaderColumn{Name: "INIT"}, model1.HeaderColumn{Name: "RESTARTS", Align: tview.AlignRight}, - model1.HeaderColumn{Name: "PROBES(L:R)"}, + model1.HeaderColumn{Name: "PROBES(L:R:S)"}, model1.HeaderColumn{Name: "CPU", Align: tview.AlignRight, MX: true}, model1.HeaderColumn{Name: "MEM", Align: tview.AlignRight, MX: true}, model1.HeaderColumn{Name: "CPU/R:L", Align: tview.AlignRight}, @@ -116,7 +116,7 @@ func (c Container) Render(o interface{}, name string, r *model1.Row) error { state, boolToStr(co.IsInit), restarts, - probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe), + probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe) + ":" + probe(co.Container.StartupProbe), toMc(cur.cpu), toMi(cur.mem), toMc(res.cpu) + ":" + toMc(res.lcpu), diff --git a/internal/render/container_test.go b/internal/render/container_test.go index f790b3a541..b05d775ae9 100644 --- a/internal/render/container_test.go +++ b/internal/render/container_test.go @@ -38,7 +38,7 @@ func TestContainer(t *testing.T) { "Running", "false", "0", - "off:off", + "off:off:off", "10", "20", "20:20", From 6179ea4b8e5eeb6f1805e63484783cdc86ea736c Mon Sep 17 00:00:00 2001 From: Rfcku <6645880+rfcku@users.noreply.github.com> Date: Sun, 27 Oct 2024 09:00:21 -0700 Subject: [PATCH 50/62] chore: build-status tag url (#2933) updates the. build-status tag url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bc7138b54..e4cccce349 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Your donations will go a long way in keeping our servers lights on and beers in [![Go Report Card](https://goreportcard.com/badge/github.com/derailed/k9s?)](https://goreportcard.com/report/github.com/derailed/k9s) [![golangci badge](https://github.com/golangci/golangci-web/blob/master/src/assets/images/badge_a_plus_flat.svg)](https://golangci.com/r/github.com/derailed/k9s) [![codebeat badge](https://codebeat.co/badges/89e5a80e-dfe8-4426-acf6-6be781e0a12e)](https://codebeat.co/projects/github-com-derailed-k9s-master) -[![Build Status](https://travis-ci.com/derailed/k9s.svg?branch=master)](https://travis-ci.com/derailed/k9s) +[![Build Status](https://api.travis-ci.com/derailed/k9s.svg?branch=master)](https://travis-ci.com/derailed/k9s) [![Docker Repository on Quay](https://quay.io/repository/derailed/k9s/status "Docker Repository on Quay")](https://quay.io/repository/derailed/k9s) [![release](https://img.shields.io/github/release-pre/derailed/k9s.svg)](https://github.com/derailed/k9s/releases) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/mum4k/termdash/blob/master/LICENSE) From 47f92199c58fedc0464f55c3db94bc00cbff1d7b Mon Sep 17 00:00:00 2001 From: xfrancois Date: Sun, 27 Oct 2024 18:48:47 +0100 Subject: [PATCH 51/62] fix: add kubeconfig if k9s is launched with --kubeconfig (#2932) --- plugins/debug-container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/debug-container.yaml b/plugins/debug-container.yaml index aefba8801c..38d6fcc60f 100644 --- a/plugins/debug-container.yaml +++ b/plugins/debug-container.yaml @@ -12,4 +12,4 @@ plugins: confirm: true args: - -c - - "kubectl debug -it --context $CONTEXT -n=$NAMESPACE $POD --target=$NAME --image=nicolaka/netshoot:v0.12 --share-processes -- bash" \ No newline at end of file + - "kubectl --kubeconfig=$KUBECONFIG debug -it --context $CONTEXT -n=$NAMESPACE $POD --target=$NAME --image=nicolaka/netshoot:v0.12 --share-processes -- bash" From 88547dcc81ce8cf1c2b0a2baefd0899690c40824 Mon Sep 17 00:00:00 2001 From: fragolinux Date: Mon, 28 Oct 2024 01:20:53 +0100 Subject: [PATCH 52/62] fixed conflicting plugin shortcuts, and added 2 new plugins (#2930) * added flux suspended resources retrieval plugin using this plugin, you can press Shift-S in "kustomizations" and "helmreleases" k9s sections to get a list of all suspended resources... a temporary patch till k9s will allow custom columns based on .spec in its views... * Create rm-ns.yml to test: create an "undeletable" namespace, with wrong finalizers: ``` apiVersion: v1 kind: Namespace metadata: name: test spec: finalizers: - foregroundDeletion ``` apply to cluster: `kubectl create -f test.yaml` go in NS view in k9s, then select the test NS and press CTRL-D to delete it... it will stay in terminating state, because of the finalizers... now press "n", and confirm, to remove the finalizers... the NS should now be gone... do NOT run on the "all+" ns, it will crash k9s... * Update log-full.yaml * Update log-loki.yaml * Update log-stern.yaml * Update crossplane.yaml * Update duplik8s.yaml * Update flux.yaml * Update log-full.yaml * Delete plugins/rm-ns.yml * Update and rename get_suspended.yml to get_suspended.yaml * Delete plugins/get_suspended.yaml --- plugins/crossplane.yaml | 2 +- plugins/duplik8s.yaml | 2 +- plugins/flux.yaml | 2 +- plugins/log-full.yaml | 4 ++-- plugins/log-loki.yaml | 2 +- plugins/log-stern.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/crossplane.yaml b/plugins/crossplane.yaml index 14d7915e3f..8ad69ac085 100644 --- a/plugins/crossplane.yaml +++ b/plugins/crossplane.yaml @@ -1,7 +1,7 @@ plugins: # List all the resources managed by a Composite Resource kube-lineage: - shortCut: Ctrl-X + shortCut: Ctrl-U confirm: false description: "Kube Lineage" scopes: diff --git a/plugins/duplik8s.yaml b/plugins/duplik8s.yaml index ed63d144e6..3b72f9d662 100644 --- a/plugins/duplik8s.yaml +++ b/plugins/duplik8s.yaml @@ -4,7 +4,7 @@ # See https://github.com/Telemaco019/duplik8s plugins: duplicate-pod: - shortCut: Ctrl-T + shortCut: Ctrl-B description: Duplicate Pod scopes: - po diff --git a/plugins/flux.yaml b/plugins/flux.yaml index 72a9655542..96fbaf3767 100644 --- a/plugins/flux.yaml +++ b/plugins/flux.yaml @@ -152,7 +152,7 @@ plugins: -n $NAMESPACE $NAME | less -K trace: - shortCut: Shift-A + shortCut: Shift-P confirm: false description: Flux trace scopes: diff --git a/plugins/log-full.yaml b/plugins/log-full.yaml index 452c1dbc91..9bad01cd03 100644 --- a/plugins/log-full.yaml +++ b/plugins/log-full.yaml @@ -1,7 +1,7 @@ plugins: # See https://k9scli.io/topics/plugins/ raw-logs-follow: - shortCut: Ctrl-L + shortCut: Ctrl-G description: logs -f scopes: - po @@ -18,7 +18,7 @@ plugins: - --kubeconfig - $KUBECONFIG log-less: - shortCut: Shift-L + shortCut: Shift-K description: "logs|less" scopes: - po diff --git a/plugins/log-loki.yaml b/plugins/log-loki.yaml index 23da9d6583..c2642d6db2 100644 --- a/plugins/log-loki.yaml +++ b/plugins/log-loki.yaml @@ -13,7 +13,7 @@ plugins: - "{ namespace = \"$NAMESPACE\", pod = \"$POD\", container = \"$NAME\" }" - -f loki-container-raw: - shortCut: Ctrl-L + shortCut: Ctrl-E description: "loki raw" scopes: - containers diff --git a/plugins/log-stern.yaml b/plugins/log-stern.yaml index 1e850b385d..e3f60cc609 100644 --- a/plugins/log-stern.yaml +++ b/plugins/log-stern.yaml @@ -1,7 +1,7 @@ plugins: # Leverage stern (https://github.com/stern/stern) to output logs. stern: - shortCut: Ctrl-L + shortCut: Ctrl-Y confirm: false description: "Logs " scopes: From 20d37ba6b73513ac9a87d0712407f75c8f49fa60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:24:43 -0600 Subject: [PATCH 53/62] chore(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#2940) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.1...v4.2.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8023d80da1..95f11c5f45 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4.2.1 + uses: actions/checkout@v4.2.2 - name: Install Go uses: actions/setup-go@v5.0.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e55078b7ad..e381362c83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4.2.1 + uses: actions/checkout@v4.2.2 - name: Install Go uses: actions/setup-go@v5.0.2 From 0fd7fadae37d3bb40c5b4e2cceccf9bf7dd40f1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:24:59 -0600 Subject: [PATCH 54/62] chore(deps): bump actions/setup-go from 5.0.2 to 5.1.0 (#2939) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.1.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v5.0.2...v5.1.0) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 95f11c5f45..074996ecb5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v4.2.2 - name: Install Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version-file: go.mod cache-dependency-path: go.sum diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e381362c83..3b93bfa752 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4.2.2 - name: Install Go - uses: actions/setup-go@v5.0.2 + uses: actions/setup-go@v5.1.0 with: go-version-file: go.mod cache-dependency-path: go.sum From 9d659cf38780a9a349500138eafbab22aa228c80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 07:35:17 -0600 Subject: [PATCH 55/62] Bump helm.sh/helm/v3 from 3.14.4 to 3.16.2 (#2915) Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.14.4 to 3.16.2. - [Release notes](https://github.com/helm/helm/releases) - [Commits](https://github.com/helm/helm/compare/v3.14.4...v3.16.2) --- updated-dependencies: - dependency-name: helm.sh/helm/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 42 +++++++++---------- go.sum | 125 ++++++++++++++++++++++++--------------------------------- 2 files changed, 73 insertions(+), 94 deletions(-) diff --git a/go.mod b/go.mod index d7e1fce6c0..2b8638257d 100644 --- a/go.mod +++ b/go.mod @@ -26,18 +26,18 @@ require ( github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/text v0.17.0 + golang.org/x/text v0.18.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - helm.sh/helm/v3 v3.14.4 + helm.sh/helm/v3 v3.16.2 k8s.io/api v0.31.1 k8s.io/apiextensions-apiserver v0.31.1 k8s.io/apimachinery v0.31.1 - k8s.io/cli-runtime v0.31.0 + k8s.io/cli-runtime v0.31.1 k8s.io/client-go v0.31.1 k8s.io/klog/v2 v2.130.1 - k8s.io/kubectl v0.31.0 - k8s.io/metrics v0.31.0 + k8s.io/kubectl v0.31.1 + k8s.io/metrics v0.31.1 sigs.k8s.io/yaml v1.4.0 ) @@ -46,7 +46,7 @@ require ( cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/storage v1.35.1 // indirect - dario.cat/mergo v1.0.0 // indirect + dario.cat/mergo v1.0.1 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect @@ -56,8 +56,8 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect - github.com/Masterminds/sprig/v3 v3.2.3 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.11.4 // indirect @@ -75,7 +75,7 @@ require ( github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46 // indirect github.com/aquasecurity/go-version v0.0.0-20210121072130-637058cfe492 // indirect - github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.44.288 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/becheran/wildmatch-go v1.0.0 // indirect @@ -96,7 +96,7 @@ require ( github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/containerd/ttrpc v1.2.2 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/cyphar/filepath-securejoin v0.3.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da // indirect github.com/distribution/reference v0.6.0 // indirect @@ -114,7 +114,7 @@ require ( github.com/elliotchance/phpserialize v1.4.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/evanphx/json-patch v5.7.0+incompatible // indirect + github.com/evanphx/json-patch v5.9.0+incompatible // indirect github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/facebookincubator/nvdtools v0.1.5 // indirect github.com/fatih/camelcase v1.0.0 // indirect @@ -167,16 +167,16 @@ require ( github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/xstrings v1.4.0 // indirect + github.com/huandu/xstrings v1.5.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect - github.com/imdario/mergo v0.3.15 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jinzhu/copier v0.4.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jmoiron/sqlx v1.3.5 // indirect + github.com/jmoiron/sqlx v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953 // indirect @@ -226,7 +226,7 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/gomega v1.33.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc6 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/openvex/go-vex v0.2.5 // indirect @@ -247,7 +247,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/rubenv/sql-migrate v1.5.2 // indirect + github.com/rubenv/sql-migrate v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/saferwall/pe v1.5.2 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect @@ -256,13 +256,13 @@ require ( github.com/sassoftware/go-rpmutils v0.3.0 // indirect github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/shopspring/decimal v1.3.1 // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.2 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spdx/tools-golang v0.5.3 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cast v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.17.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect @@ -292,14 +292,14 @@ require ( go.opentelemetry.io/otel/trace v1.28.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.23.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/go.sum b/go.sum index 88856be471..d39909ec22 100644 --- a/go.sum +++ b/go.sum @@ -184,9 +184,11 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA= @@ -212,11 +214,10 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= -github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= +github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= @@ -281,8 +282,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -381,8 +382,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.3.1 h1:1V7cHiaW+C+39wEfpH6XlLBQo3j/PciWFrgfCLS8XrE= +github.com/cyphar/filepath-securejoin v0.3.1/go.mod h1:F7i41x/9cBF7lzCrVsYs9fuzwRZm4NQsGTBdpp6mETc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -445,8 +446,8 @@ github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPO github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= -github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= +github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/facebookincubator/flog v0.0.0-20190930132826-d2511d0ce33c/go.mod h1:QGzNH9ujQ2ZUr/CjDGZGWeDAVStrWNjHeEcjJL96Nuk= @@ -465,10 +466,10 @@ github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= -github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= +github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -530,8 +531,9 @@ github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogB github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-restruct/restruct v1.2.0-alpha h1:2Lp474S/9660+SJjpVxoKuWX09JsXHSrdV7Nv3/gkvc= github.com/go-restruct/restruct v1.2.0-alpha/go.mod h1:KqrpKpn4M8OLznErihXTGLlsXFGeLxHUrLRRI/1YjGk= -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-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= 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= @@ -539,12 +541,6 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= -github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= -github.com/gobuffalo/packd v1.0.1 h1:U2wXfRr4E9DH8IdsDLlRFwTZTK7hLfq9qT/QHXGVe/0= -github.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY= -github.com/gobuffalo/packr/v2 v2.8.3 h1:xE1yzvnO56cUC0sTpKR3DIbxZgB54AftTFMhB2XEWlY= -github.com/gobuffalo/packr/v2 v2.8.3/go.mod h1:0SahksCVcx4IMnigTjiFuyldmTrdTctXsOdiU5KwbKc= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -650,7 +646,6 @@ github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -735,18 +730,16 @@ github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -762,8 +755,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -775,8 +768,6 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= -github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953 h1:WdAeg/imY2JFPc/9CST4bZ80nNJbiBFCAdSZCSgrS5Y= github.com/kastenhq/goversion v0.0.0-20230811215019-93b2f8823953/go.mod h1:6o+UrvuZWc4UTyBhQf0LGjW9Ld7qJxLz/OqvSOWWlEc= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= @@ -815,7 +806,6 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= @@ -832,12 +822,6 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= 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= -github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= -github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg= github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08 h1:AevUBW4cc99rAF8q8vmddIP8qd/0J5s/UyltGbp66dg= @@ -867,7 +851,6 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -879,10 +862,10 @@ github.com/microsoft/go-rustaudit v0.0.0-20220730194248-4b17361d90a5 h1:tQRHcLQw github.com/microsoft/go-rustaudit v0.0.0-20220730194248-4b17361d90a5/go.mod h1:vYT9HE7WCvL64iVeZylKmCsWKfE+JZ8105iuh2Trk8g= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= +github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -899,7 +882,6 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= @@ -963,8 +945,8 @@ github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= 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-rc6 h1:XDqvyKsJEbRtATzkgItUqBA7QHk58yxX1Ov9HERHNqU= -github.com/opencontainers/image-spec v1.1.0-rc6/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= @@ -1048,8 +1030,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/rubenv/sql-migrate v1.5.2 h1:bMDqOnrJVV/6JQgQ/MxOpU+AdO8uzYYA/TxFUBzFtS0= -github.com/rubenv/sql-migrate v1.5.2/go.mod h1:H38GW8Vqf8F0Su5XignRyaRcbXbJunSWxs+kmzlg0Is= +github.com/rubenv/sql-migrate v1.7.0 h1:HtQq1xyTN2ISmQDggnh0c9U3JlP8apWh8YO2jzlXpTI= +github.com/rubenv/sql-migrate v1.7.0/go.mod h1:S4wtDEG1CKn+0ShpTtzWhFpHHI5PvCUtiGI+C+Z2THE= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1078,9 +1060,8 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1101,10 +1082,9 @@ github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY52 github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= @@ -1256,11 +1236,10 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1507,8 +1486,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1516,8 +1495,8 @@ golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= 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= @@ -1532,8 +1511,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -1870,8 +1849,8 @@ gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8= gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -helm.sh/helm/v3 v3.14.4 h1:6FSpEfqyDalHq3kUr4gOMThhgY55kXUEjdQoyODYnrM= -helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= +helm.sh/helm/v3 v3.16.2 h1:Y9v7ry+ubQmi+cb5zw1Llx8OKHU9Hk9NQ/+P+LGBe2o= +helm.sh/helm/v3 v3.16.2/go.mod h1:SyTXgKBjNqi2NPsHCW5dDAsHqvGIu0kdNYNH9gQaw70= 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= @@ -1887,8 +1866,8 @@ k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= -k8s.io/cli-runtime v0.31.0 h1:V2Q1gj1u3/WfhD475HBQrIYsoryg/LrhhK4RwpN+DhA= -k8s.io/cli-runtime v0.31.0/go.mod h1:vg3H94wsubuvWfSmStDbekvbla5vFGC+zLWqcf+bGDw= +k8s.io/cli-runtime v0.31.1 h1:/ZmKhmZ6hNqDM+yf9s3Y4KEYakNXUn5sod2LWGGwCuk= +k8s.io/cli-runtime v0.31.1/go.mod h1:pKv1cDIaq7ehWGuXQ+A//1OIF+7DI+xudXtExMCbe9U= k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= @@ -1897,10 +1876,10 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/kubectl v0.31.0 h1:kANwAAPVY02r4U4jARP/C+Q1sssCcN/1p9Nk+7BQKVg= -k8s.io/kubectl v0.31.0/go.mod h1:pB47hhFypGsaHAPjlwrNbvhXgmuAr01ZBvAIIUaI8d4= -k8s.io/metrics v0.31.0 h1:s7Vu7W0oEZPTN8jgcoiWIXIZBmVxt7YP9MRVyIgMdOc= -k8s.io/metrics v0.31.0/go.mod h1:UNsz6swyX8FWkDoKN9ixPF75TBREMbHZIKjD7fydaOY= +k8s.io/kubectl v0.31.1 h1:ih4JQJHxsEggFqDJEHSOdJ69ZxZftgeZvYo7M/cpp24= +k8s.io/kubectl v0.31.1/go.mod h1:aNuQoR43W6MLAtXQ/Bu4GDmoHlbhHKuyD49lmTC8eJM= +k8s.io/metrics v0.31.1 h1:h4I4dakgh/zKflWYAOQhwf0EXaqy8LxAIyE/GBvxqRc= +k8s.io/metrics v0.31.1/go.mod h1:JuH1S9tJiH9q1VCY0yzSCawi7kzNLsDzlWDJN4xR+iA= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= From a95c8b95850f4e597286aa4817afed525df46450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Badst=C3=BCbner?= Date: Wed, 30 Oct 2024 14:39:02 +0100 Subject: [PATCH 56/62] chore(plugins,remove-finalizers): make sure the resources api group is respected (#2926) I had an issue where RabbitMQ created a CRD called `policies`, but Kyverno also did and the finalizer removal did not hit the RabbitMQ CRD. --- plugins/remove-finalizers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/remove-finalizers.yaml b/plugins/remove-finalizers.yaml index b7a83d67d5..ebc59f207f 100644 --- a/plugins/remove-finalizers.yaml +++ b/plugins/remove-finalizers.yaml @@ -25,7 +25,7 @@ plugins: - $CONTEXT - --namespace - $NAMESPACE - - $RESOURCE_NAME + - $RESOURCE_NAME.$RESOURCE_GROUP - $NAME - -p - '{"metadata":{"finalizers":null}}' From 12ea38a7010ed04440f1daaa5d68d4f9f9ccbed0 Mon Sep 17 00:00:00 2001 From: thbits Date: Wed, 30 Oct 2024 15:40:21 +0200 Subject: [PATCH 57/62] Adding eks-node-viewer plugin (#2914) Co-authored-by: tomhalo --- plugins/eks-node-viewer.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/eks-node-viewer.yaml diff --git a/plugins/eks-node-viewer.yaml b/plugins/eks-node-viewer.yaml new file mode 100644 index 0000000000..4b04db0d00 --- /dev/null +++ b/plugins/eks-node-viewer.yaml @@ -0,0 +1,15 @@ +# plugin to easily open eks-node-viewer on viewed context +# requires eks-node-viewer installed on system +# https://github.com/awslabs/eks-node-viewer/ +plugins: + eks-node-viewer: + shortCut: Shift-X + description: "eks-node-viewer" + scopes: + - node + background: false + command: bash + args: + - -c + - | + env $(kubectl config view --context $CONTEXT --minify -o json | jq -r ".users[0].user.exec.env[] | select(.name == \"AWS_PROFILE\") | \"AWS_PROFILE=\" + .value" && kubectl config view --context $CONTEXT --minify -o json | jq -r ".users[0].user.exec.args | \"AWS_REGION=\" + .[1]") eks-node-viewer --context $CONTEXT --resources cpu,memory --extra-labels karpenter.sh/nodepool,eks-node-viewer/node-age --node-sort=creation=dsc From baa4ea5397c34d31e01e3427fb7bba0732a9b0fe Mon Sep 17 00:00:00 2001 From: David Mealo Date: Sun, 3 Nov 2024 10:23:12 -0500 Subject: [PATCH 58/62] Adding Argo Rollouts plugin version for PowerShell (#2937) * Update argo-rollouts.yaml with commented version for PowerShell * Update argo-rollouts.yaml * Moving Plugin - Argo Rollouts for Powershell - to separate file --- plugins/argo-rollouts-powershell.yaml | 86 +++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 plugins/argo-rollouts-powershell.yaml diff --git a/plugins/argo-rollouts-powershell.yaml b/plugins/argo-rollouts-powershell.yaml new file mode 100644 index 0000000000..fead287285 --- /dev/null +++ b/plugins/argo-rollouts-powershell.yaml @@ -0,0 +1,86 @@ +# Manage argo-rollouts from PowerShell +# See https://argoproj.github.io/argo-rollouts/ +# Get rollout details +# Watch rollout progress +#

(with confirmation) Promote rollout +# (with confirmation) Restart rollout +plugins: + argo-rollouts-get: + shortCut: g + confirm: false + description: Get details + scopes: + - rollouts + command: powershell + background: false + args: + - kubectl + - argo + - rollouts + - get + - rollout + - $NAME + - --context + - $CONTEXT + - -n + - $NAMESPACE; + - $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + argo-rollouts-watch: + shortCut: w + confirm: false + description: Watch progress + scopes: + - rollouts + command: powershell + background: false + args: + - kubectl + - argo + - rollouts + - get + - rollout + - $NAME + - --context + - $CONTEXT + - -n + - $NAMESPACE + - -w; + - $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + argo-rollouts-promote: + shortCut: p + confirm: true + description: Promote + scopes: + - rollouts + command: powershell + background: false + args: + - kubectl + - argo + - rollouts + - promote + - $NAME + - --context + - $CONTEXT + - -n + - $NAMESPACE; + - $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') + argo-rollouts-restart: + shortCut: r + confirm: true + description: Restart + scopes: + - rollouts + command: powershell + background: false + args: + - kubectl + - argo + - rollouts + - restart + - $NAME + - --context + - $CONTEXT + - -n + - $NAMESPACE; + - $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown') \ No newline at end of file From faa7a1dfd6aeb08f5e358645bc2c304f3d60c220 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 08:54:17 -0700 Subject: [PATCH 59/62] chore(deps): bump k8s.io/metrics from 0.31.0 to 0.31.2 (#2941) Bumps [k8s.io/metrics](https://github.com/kubernetes/metrics) from 0.31.0 to 0.31.2. - [Commits](https://github.com/kubernetes/metrics/compare/v0.31.0...v0.31.2) --- updated-dependencies: - dependency-name: k8s.io/metrics dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 2b8638257d..db00a1f254 100644 --- a/go.mod +++ b/go.mod @@ -30,14 +30,14 @@ require ( gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.16.2 - k8s.io/api v0.31.1 + k8s.io/api v0.31.2 k8s.io/apiextensions-apiserver v0.31.1 - k8s.io/apimachinery v0.31.1 + k8s.io/apimachinery v0.31.2 k8s.io/cli-runtime v0.31.1 - k8s.io/client-go v0.31.1 + k8s.io/client-go v0.31.2 k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.31.1 - k8s.io/metrics v0.31.1 + k8s.io/metrics v0.31.2 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index d39909ec22..39c4e5e116 100644 --- a/go.sum +++ b/go.sum @@ -1858,18 +1858,18 @@ 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.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= +k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= +k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= k8s.io/cli-runtime v0.31.1 h1:/ZmKhmZ6hNqDM+yf9s3Y4KEYakNXUn5sod2LWGGwCuk= k8s.io/cli-runtime v0.31.1/go.mod h1:pKv1cDIaq7ehWGuXQ+A//1OIF+7DI+xudXtExMCbe9U= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= +k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= @@ -1878,8 +1878,8 @@ k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7F k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kubectl v0.31.1 h1:ih4JQJHxsEggFqDJEHSOdJ69ZxZftgeZvYo7M/cpp24= k8s.io/kubectl v0.31.1/go.mod h1:aNuQoR43W6MLAtXQ/Bu4GDmoHlbhHKuyD49lmTC8eJM= -k8s.io/metrics v0.31.1 h1:h4I4dakgh/zKflWYAOQhwf0EXaqy8LxAIyE/GBvxqRc= -k8s.io/metrics v0.31.1/go.mod h1:JuH1S9tJiH9q1VCY0yzSCawi7kzNLsDzlWDJN4xR+iA= +k8s.io/metrics v0.31.2 h1:sQhujR9m3HN/Nu/0fTfTscjnswQl0qkQAodEdGBS0N4= +k8s.io/metrics v0.31.2/go.mod h1:QqqyReApEWO1UEgXOSXiHCQod6yTxYctbAAQBWZkboU= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= From 59918d0e891876b4181d3a4e90bafea6045a2542 Mon Sep 17 00:00:00 2001 From: Daniel Gomes-Sebastiao Date: Mon, 4 Nov 2024 04:56:43 +1300 Subject: [PATCH 60/62] feat: add irregular pod terminations to Faults view (#2738) (#2935) --- internal/render/pod.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/render/pod.go b/internal/render/pod.go index e78073528a..33ce957304 100644 --- a/internal/render/pod.go +++ b/internal/render/pod.go @@ -172,6 +172,9 @@ func (p Pod) diagnose(phase string, cr, ct int) error { if cr != ct || ct == 0 { return fmt.Errorf("container ready check failed: %d of %d", cr, ct) } + if phase == Terminating { + return fmt.Errorf("pod is terminating") + } return nil } From 99d47ab7e70bd2c2e721e506d1976228d0a58fed Mon Sep 17 00:00:00 2001 From: Zak Cook Date: Sat, 9 Nov 2024 20:26:36 +0100 Subject: [PATCH 61/62] Fix "Mark Range": reduce maximum namespaces in `favorites`, fix shadowing of ctrl+space (#2927) * fix: avoid creating a ctrl+space key when index out of range * fix: reduce maximum favorite namespaces to 9, making space for "all" * fix: correct index incrementation * refactor: remove usage of NumKeys * feat: check for favorite namespace index in NumKeys * feat: break when out of number keys, increment index when slot found --- internal/config/data/ns.go | 2 +- internal/view/browser.go | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/internal/config/data/ns.go b/internal/config/data/ns.go index fb1a515b2b..0e0e2228df 100644 --- a/internal/config/data/ns.go +++ b/internal/config/data/ns.go @@ -12,7 +12,7 @@ import ( const ( // MaxFavoritesNS number # favorite namespaces to keep in the configuration. - MaxFavoritesNS = 10 + MaxFavoritesNS = 9 ) // Namespace tracks active and favorites namespaces. diff --git a/internal/view/browser.go b/internal/view/browser.go index 7f0876d1ab..d5c9cfdf6f 100644 --- a/internal/view/browser.go +++ b/internal/view/browser.go @@ -585,13 +585,19 @@ func (b *Browser) namespaceActions(aa *ui.KeyActions) { aa.Add(ui.Key0, ui.NewKeyAction(client.NamespaceAll, b.switchNamespaceCmd, true)) b.namespaces[0] = client.NamespaceAll index := 1 - for _, ns := range b.app.Config.FavNamespaces() { + favNamespaces := b.app.Config.FavNamespaces() + for _, ns := range favNamespaces { if ns == client.NamespaceAll { continue } - aa.Add(ui.NumKeys[index], ui.NewKeyAction(ns, b.switchNamespaceCmd, true)) - b.namespaces[index] = ns - index++ + if numKey, ok := ui.NumKeys[index]; ok { + aa.Add(numKey, ui.NewKeyAction(ns, b.switchNamespaceCmd, true)) + b.namespaces[index] = ns + index++ + } else { + log.Warn().Msgf("No number key available for favorite namespace %s (%d of %d). Skipping...", ns, index, len(favNamespaces)) + break + } } } From 9984e3f4bfa0b88a4c0ae62cd69b61f80b7ce3c2 Mon Sep 17 00:00:00 2001 From: Fernand Galiana Date: Sun, 10 Nov 2024 10:08:54 -0700 Subject: [PATCH 62/62] Release v0.32.6 (#2955) * update releaser * fix err messages * make pf display the correct address * fix regex filters * fix cust res loading * add container index * update deps + clean up * release v0.32.6 --- .golangci.yml | 9 +-- .goreleaser.yml | 4 +- .travis.yml | 2 +- Makefile | 2 +- change_logs/release_v0.32.6.md | 97 ++++++++++++++++++++++++++++ go.mod | 6 +- go.sum | 8 +-- internal/client/metrics.go | 2 +- internal/config/data/ns.go | 2 +- internal/config/data/ns_test.go | 12 ++-- internal/config/feature.go | 14 ---- internal/config/views.go | 6 +- internal/dao/alias.go | 2 +- internal/dao/container.go | 46 ++++++++----- internal/dao/dir.go | 4 +- internal/dao/dp.go | 2 +- internal/dao/job.go | 2 +- internal/dao/non_resource.go | 2 +- internal/dao/pod.go | 6 +- internal/dao/port_forwarder.go | 5 ++ internal/dao/reference.go | 2 +- internal/dao/registry.go | 28 +++++++- internal/dao/rs.go | 2 +- internal/dao/sts.go | 2 +- internal/dao/svc.go | 2 +- internal/dao/table.go | 5 +- internal/model/helpers_int_test.go | 28 ++++++++ internal/model1/header.go | 1 - internal/model1/row_event.go | 3 +- internal/model1/table_data.go | 19 +++--- internal/render/container.go | 6 +- internal/render/container_test.go | 4 +- internal/render/node.go | 2 + internal/render/node_test.go | 4 +- internal/render/pod.go | 7 +- internal/render/pod_int_test.go | 7 +- internal/render/port_forward_test.go | 4 ++ internal/render/portforward.go | 11 ++-- internal/ui/dialog/selection.go | 3 + internal/ui/modal_list.go | 3 + internal/ui/pages.go | 1 + internal/view/container.go | 2 + internal/view/container_test.go | 2 +- internal/view/helpers.go | 2 +- internal/view/owner_extender.go | 18 +++--- internal/view/reference.go | 3 +- internal/view/table.go | 7 +- internal/view/workload.go | 10 +-- internal/watch/forwarders.go | 3 + internal/watch/forwarders_test.go | 21 +++--- internal/xray/pod.go | 7 +- snap/snapcraft.yaml | 2 +- 52 files changed, 317 insertions(+), 137 deletions(-) create mode 100644 change_logs/release_v0.32.6.md delete mode 100644 internal/config/feature.go diff --git a/.golangci.yml b/.golangci.yml index f880f84a8d..b91459128d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -53,10 +53,8 @@ linters-settings: - nilness goimports: local-prefixes: github.com/cilium/cilium - staticcheck: - go: "1.20" unused: - go: "1.20" + go: "1.23" goheader: values: regexp: @@ -93,7 +91,7 @@ issues: text: "SA9003: empty branch" - linters: [staticcheck] text: "SA2001: empty critical section" - - linters: [goerr113] + - linters: [err113] text: "do not define dynamic errors, use wrapped static errors instead" # This rule to avoid opinionated check fmt.Errorf("text") # Skip goimports check on generated files - path: \\.(generated\\.deepcopy|pb)\\.go$ @@ -107,13 +105,12 @@ issues: linters: disable-all: true enable: - - goerr113 + - err113 - gofmt - goimports - govet - ineffassign - misspell - - staticcheck - unused - goheader - gosec diff --git a/.goreleaser.yml b/.goreleaser.yml index b2ffc71807..bb65270347 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,5 @@ +version: 2 + project_name: k9s before: @@ -90,7 +92,7 @@ brews: commit_author: name: derailed email: fernand@imhotep.io - folder: Formula + directory: Formula homepage: https://k9scli.io/ description: Kubernetes CLI To Manage Your Clusters In Style! test: | diff --git a/.travis.yml b/.travis.yml index dc64775bc6..09bf491802 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go_import_path: github.com/derailed/k9s go: - - "1.15" + - "1.23" jobs: include: diff --git a/Makefile b/Makefile index a2b5a10ba3..686bfb1c3b 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.32.5 +VERSION ?= v0.32.6 IMG_NAME := derailed/k9s IMAGE := ${IMG_NAME}:${VERSION} diff --git a/change_logs/release_v0.32.6.md b/change_logs/release_v0.32.6.md new file mode 100644 index 0000000000..edb420208d --- /dev/null +++ b/change_logs/release_v0.32.6.md @@ -0,0 +1,97 @@ + + +# Release v0.32.6 + +## 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! + +--- + +## Videos Are In The Can! + +Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content... + +* [K9s v0.31.0 Configs+Sneak peek](https://youtu.be/X3444KfjguE) +* [K9s v0.30.0 Sneak peek](https://youtu.be/mVBc1XneRJ4) +* [Vulnerability Scans](https://youtu.be/ULkl0MsaidU) + +--- + +## Resolved Issues + +* [#2947](https://github.com/derailed/k9s/issues/2947) CTRL+Z causes k9s to crash +* [#2938](https://github.com/derailed/k9s/issues/2938) Critical Vulnerability CVE-2024-41110 in v26.0.1 of docker included in k9s +* [#2929](https://github.com/derailed/k9s/issues/2929) conflicting plugins shortcuts +* [#2896](https://github.com/derailed/k9s/issues/2896) Add a plugin to disable/enable a keda ScaledObject +* [#2811](https://github.com/derailed/k9s/issues/2811) Dockerfile build step fails due to misaligned Go versions (1.21.5 vs 1.22.0) +* [#2767](https://github.com/derailed/k9s/issues/2767) Manually triggered jobs don't get automatically cleaned up +* [#2761](https://github.com/derailed/k9s/issues/2761) Enable "jump to owner" for more kinds +* [#2754](https://github.com/derailed/k9s/issues/2754) Plugins not loaded/shown in UI +* [#2747](https://github.com/derailed/k9s/issues/2747) Combining context and namespace switching only works sporadically (e.g. ":pod foo-ns @ctx-dev") +* [#2746](https://github.com/derailed/k9s/issues/2746) k9s does not display "[::]" string in its logs +* [#2738](https://github.com/derailed/k9s/issues/2738) "Faults" view should show all Terminating pods + +--- + +## Contributed PRs + +Please be sure to give `Big Thanks!` and `ATTA Girls/Boys!` to all the fine contributors for making K9s better for all of us!! + +* [#2937](https://github.com/derailed/k9s/pull/2937) Adding Argo Rollouts plugin version for PowerShell +* [#2935](https://github.com/derailed/k9s/pull/2935) fix: show all terminating pods in Faults view (#2738) +* [#2933](https://github.com/derailed/k9s/pull/2933) chore: broken url in build-status tag in the readme.md +* [#2932](https://github.com/derailed/k9s/pull/2932) fix: add kubeconfig if k9s is launched with --kubeconfig +* [#2930](https://github.com/derailed/k9s/pull/2930) fixed conflicting plugin shortcuts, and added 2 new plugins +* [#2927](https://github.com/derailed/k9s/pull/2927) Fix "Mark Range": reduce maximum namespaces in favorites, fix shadowing of ctrl+space +* [#2926](https://github.com/derailed/k9s/pull/2926) chore(plugins,remove-finalizers): make sure the resources api group is respected +* [#2921](https://github.com/derailed/k9s/pull/2921) feat: Add plugins for kubectl node-shell +* [#2920](https://github.com/derailed/k9s/pull/2920) eat: added StartupProbes status (S) to the PROBES column in the container render +* [#2914](https://github.com/derailed/k9s/pull/2914) Adding eks-node-viewer plugin +* [#2898](https://github.com/derailed/k9s/pull/2898) Add argocd plugin to community plugins +* [#2896](https://github.com/derailed/k9s/pull/2896) feat(2896): Add toggle keda plugin +* [#2890](https://github.com/derailed/k9s/pull/2890) Update README.md +* [#2881](https://github.com/derailed/k9s/pull/2881) Fix Mark-Range command: ensure that NS Favorite doesn't exceed the limit +* [#2861](https://github.com/derailed/k9s/pull/2861) chore: fix function name +* [#2856](https://github.com/derailed/k9s/pull/2856) fix internal/render/hpa.go merge issue +* [#2848](https://github.com/derailed/k9s/pull/2848) Include sidecar containers requests and limits +* [#2844](https://github.com/derailed/k9s/pull/2844) Update README GO Version Required +* [#2830](https://github.com/derailed/k9s/pull/2830) update tview to fix log escaping problem completely +* [#2822](https://github.com/derailed/k9s/pull/2822) Adding HolmesGPT plugin +* [#2821](https://github.com/derailed/k9s/pull/2821) Add a spark-operator plugin +* [#2817](https://github.com/derailed/k9s/pull/2817) Add comment about Escape keybinding +* [#2812](https://github.com/derailed/k9s/pull/2812) fix: align build image Go version with go.mod +* [#2795](https://github.com/derailed/k9s/pull/2795) add new plugin current-ctx-terminal +* [#2791](https://github.com/derailed/k9s/pull/2791) Add leading space to Kubernetes context suggestions +* [#2789](https://github.com/derailed/k9s/pull/2789) Create kubectl-get-in-shell.yaml +* [#2788](https://github.com/derailed/k9s/pull/2788) Update README.md plugin format +* [#2787](https://github.com/derailed/k9s/pull/2787) Update helm-purge.yaml +* [#2786](https://github.com/derailed/k9s/pull/2786) Update README.md with plugin dangerous field +* [#2780](https://github.com/derailed/k9s/pull/2780) install copyright file into correct location +* [#2775](https://github.com/derailed/k9s/pull/2775) fix freebsd build failure +* [#2780](https://github.com/derailed/k9s/pull/2780) install copyright file into correct location +* [#2772](https://github.com/derailed/k9s/pull/2772) proper handle OwnerReference for manually created job +* [#2771](https://github.com/derailed/k9s/pull/2771) feat: add duplik8s plugin +* [#2770](https://github.com/derailed/k9s/pull/2770) feat: allow plugins block in plugin files +* [#2765](https://github.com/derailed/k9s/pull/2765) fix: Shellin -> ShellIn +* [#2763](https://github.com/derailed/k9s/pull/2763) enable "jump to owner" for more kinds +* [#2755](https://github.com/derailed/k9s/pull/2755) Loki plugin +* [#2751](https://github.com/derailed/k9s/pull/2751) container logs should be escaped when printed +* [#2750](https://github.com/derailed/k9s/pull/2750) fix: should switching ctx before ns + +--- + + © 2024 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) \ No newline at end of file diff --git a/go.mod b/go.mod index db00a1f254..8ad7a138f5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/derailed/k9s -go 1.22.0 +go 1.23.0 require ( github.com/adrg/xdg v0.5.0 @@ -314,8 +314,8 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gorm.io/gorm v1.25.9 // indirect - k8s.io/apiserver v0.31.1 // indirect - k8s.io/component-base v0.31.1 // indirect + k8s.io/apiserver v0.31.2 // indirect + k8s.io/component-base v0.31.2 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect modernc.org/libc v1.41.0 // indirect diff --git a/go.sum b/go.sum index 39c4e5e116..8b3aeeef8e 100644 --- a/go.sum +++ b/go.sum @@ -1864,14 +1864,14 @@ k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/ k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= -k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= +k8s.io/apiserver v0.31.2 h1:VUzOEUGRCDi6kX1OyQ801m4A7AUPglpsmGvdsekmcI4= +k8s.io/apiserver v0.31.2/go.mod h1:o3nKZR7lPlJqkU5I3Ove+Zx3JuoFjQobGX1Gctw6XuE= k8s.io/cli-runtime v0.31.1 h1:/ZmKhmZ6hNqDM+yf9s3Y4KEYakNXUn5sod2LWGGwCuk= k8s.io/cli-runtime v0.31.1/go.mod h1:pKv1cDIaq7ehWGuXQ+A//1OIF+7DI+xudXtExMCbe9U= k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= -k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= -k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= +k8s.io/component-base v0.31.2 h1:Z1J1LIaC0AV+nzcPRFqfK09af6bZ4D1nAOpWsy9owlA= +k8s.io/component-base v0.31.2/go.mod h1:9PeyyFN/drHjtJZMCTkSpQJS3U9OXORnHQqMLDz0sUQ= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= diff --git a/internal/client/metrics.go b/internal/client/metrics.go index 13485c71a4..f79aeac4d8 100644 --- a/internal/client/metrics.go +++ b/internal/client/metrics.go @@ -98,7 +98,7 @@ func (m *MetricsServer) checkAccess(ns, gvr, msg string) error { return err } if !auth { - return fmt.Errorf(msg) + return errors.New(msg) } return nil } diff --git a/internal/config/data/ns.go b/internal/config/data/ns.go index 0e0e2228df..14b1c667fe 100644 --- a/internal/config/data/ns.go +++ b/internal/config/data/ns.go @@ -72,7 +72,7 @@ func (n *Namespace) Validate(c client.Connection) { if len(n.Favorites) > MaxFavoritesNS { log.Debug().Msgf("[Namespace] Number of favorite exceeds hard limit of %v. Trimming.", MaxFavoritesNS) for _, ns := range n.Favorites[MaxFavoritesNS:] { - n.rmFavNS(ns) + n.rmFavNS(ns) } } } diff --git a/internal/config/data/ns_test.go b/internal/config/data/ns_test.go index a6e94aa36f..5d39cd378a 100644 --- a/internal/config/data/ns_test.go +++ b/internal/config/data/ns_test.go @@ -36,14 +36,12 @@ func TestNSValidateNoNS(t *testing.T) { } func TestNsValidateMaxNS(t *testing.T) { - allNS := []string{"ns9","ns8","ns7","ns6","ns5","ns4", "ns3", "ns2", "ns1", "all", "default"} - ns := data.NewNamespace() - - ns.Favorites = allNS - - ns.Validate(mock.NewMockConnection()) + allNS := []string{"ns9", "ns8", "ns7", "ns6", "ns5", "ns4", "ns3", "ns2", "ns1", "all", "default"} + ns := data.NewNamespace() + ns.Favorites = allNS - assert.Equal(t, data.MaxFavoritesNS, len(ns.Favorites)) + ns.Validate(mock.NewMockConnection()) + assert.Equal(t, data.MaxFavoritesNS, len(ns.Favorites)) } func TestNSSetActive(t *testing.T) { diff --git a/internal/config/feature.go b/internal/config/feature.go deleted file mode 100644 index 4b1fd75bcd..0000000000 --- a/internal/config/feature.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright Authors of K9s - -package config - -// // FeatureGates represents K9s opt-in features. -// type FeatureGates struct { -// NodeShell bool `yaml:"nodeShell"` -// } - -// // NewFeatureGates returns a new feature gate. -// func NewFeatureGates() *FeatureGates { -// return &FeatureGates{} -// } diff --git a/internal/config/views.go b/internal/config/views.go index cafb9053da..41c6b9b5e6 100644 --- a/internal/config/views.go +++ b/internal/config/views.go @@ -47,7 +47,7 @@ func (v *ViewSetting) SortCol() (string, bool, error) { return "", false, fmt.Errorf("invalid sort column spec: %q. must be col-name:asc|desc", v.SortColumn) } - return tt[0], tt[1] == "desc", nil + return tt[0], tt[1] == "asc", nil } func (v *ViewSetting) Equals(vs *ViewSetting) bool { @@ -116,8 +116,8 @@ func (v *CustomView) RemoveListener(gvr string) { func (v *CustomView) fireConfigChanged() { for gvr, list := range v.listeners { - if v, ok := v.Views[gvr]; ok { - list.ViewSettingsChanged(v) + if view, ok := v.Views[gvr]; ok { + list.ViewSettingsChanged(view) } else { list.ViewSettingsChanged(ViewSetting{}) } diff --git a/internal/dao/alias.go b/internal/dao/alias.go index bf4bf308d5..dc4e3df914 100644 --- a/internal/dao/alias.go +++ b/internal/dao/alias.go @@ -84,7 +84,7 @@ func (a *Alias) AsGVR(c string) (client.GVR, string, bool) { // Get fetch a resource. func (a *Alias) Get(_ context.Context, _ string) (runtime.Object, error) { - return nil, errors.New("NYI!!") + return nil, errors.New("nyi") } // Ensure makes sure alias are loaded. diff --git a/internal/dao/container.go b/internal/dao/container.go index 2074607f26..9ccae861c1 100644 --- a/internal/dao/container.go +++ b/internal/dao/container.go @@ -6,6 +6,7 @@ package dao import ( "context" "fmt" + "strconv" "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" @@ -22,6 +23,12 @@ var ( _ Loggable = (*Container)(nil) ) +const ( + initIDX = "I" + mainIDX = "M" + ephIDX = "E" +) + // Container represents a pod's container dao. type Container struct { NonResource @@ -46,12 +53,15 @@ func (c *Container) List(ctx context.Context, _ string) ([]runtime.Object, error if err != nil { return nil, err } - res := make([]runtime.Object, 0, len(po.Spec.InitContainers)+len(po.Spec.Containers)) - for _, co := range po.Spec.InitContainers { - res = append(res, makeContainerRes(co, po, cmx[co.Name], true)) + res := make([]runtime.Object, 0, len(po.Spec.InitContainers)+len(po.Spec.Containers)+len(po.Spec.EphemeralContainers)) + for i, co := range po.Spec.InitContainers { + res = append(res, makeContainerRes(initIDX, i, co, po, cmx[co.Name])) + } + for i, co := range po.Spec.Containers { + res = append(res, makeContainerRes(mainIDX, i, co, po, cmx[co.Name])) } - for _, co := range po.Spec.Containers { - res = append(res, makeContainerRes(co, po, cmx[co.Name], false)) + for i, co := range po.Spec.EphemeralContainers { + res = append(res, makeContainerRes(ephIDX, i, v1.Container(co.EphemeralContainerCommon), po, cmx[co.Name])) } return res, nil @@ -68,25 +78,29 @@ func (c *Container) TailLogs(ctx context.Context, opts *LogOptions) ([]LogChan, // ---------------------------------------------------------------------------- // Helpers... -func makeContainerRes(co v1.Container, po *v1.Pod, cmx *mv1beta1.ContainerMetrics, isInit bool) render.ContainerRes { +func makeContainerRes(kind string, idx int, co v1.Container, po *v1.Pod, cmx *mv1beta1.ContainerMetrics) render.ContainerRes { return render.ContainerRes{ + Idx: kind + strconv.Itoa(idx+1), Container: &co, - Status: getContainerStatus(co.Name, po.Status), + Status: getContainerStatus(kind, idx, po.Status), MX: cmx, - IsInit: isInit, Age: po.GetCreationTimestamp(), } } -func getContainerStatus(co string, status v1.PodStatus) *v1.ContainerStatus { - for _, c := range status.ContainerStatuses { - if c.Name == co { - return &c +func getContainerStatus(kind string, idx int, status v1.PodStatus) *v1.ContainerStatus { + switch kind { + case mainIDX: + if idx < len(status.ContainerStatuses) { + return &status.ContainerStatuses[idx] } - } - for _, c := range status.InitContainerStatuses { - if c.Name == co { - return &c + case initIDX: + if idx < len(status.InitContainerStatuses) { + return &status.InitContainerStatuses[idx] + } + case ephIDX: + if idx < len(status.EphemeralContainerStatuses) { + return &status.EphemeralContainerStatuses[idx] } } diff --git a/internal/dao/dir.go b/internal/dao/dir.go index 95239cc070..ef9c67baf1 100644 --- a/internal/dao/dir.go +++ b/internal/dao/dir.go @@ -37,7 +37,7 @@ var yamlRX = regexp.MustCompile(`.*\.(yml|yaml|json)`) func (a *Dir) List(ctx context.Context, _ string) ([]runtime.Object, error) { dir, ok := ctx.Value(internal.KeyPath).(string) if !ok { - return nil, errors.New("No dir in context") + return nil, errors.New("no dir in context") } files, err := os.ReadDir(dir) @@ -61,5 +61,5 @@ func (a *Dir) List(ctx context.Context, _ string) ([]runtime.Object, error) { // Get fetch a resource. func (a *Dir) Get(_ context.Context, _ string) (runtime.Object, error) { - return nil, errors.New("NYI!!") + return nil, errors.New("nyi") } diff --git a/internal/dao/dp.go b/internal/dao/dp.go index 5df3432113..600ee6c1a7 100644 --- a/internal/dao/dp.go +++ b/internal/dao/dp.go @@ -130,7 +130,7 @@ func (d *Deployment) TailLogs(ctx context.Context, opts *LogOptions) ([]LogChan, return nil, err } if dp.Spec.Selector == nil || len(dp.Spec.Selector.MatchLabels) == 0 { - return nil, fmt.Errorf("No valid selector found on Deployment %s", opts.Path) + return nil, fmt.Errorf("no valid selector found on deployment: %s", opts.Path) } return podLogs(ctx, dp.Spec.Selector.MatchLabels, opts) diff --git a/internal/dao/job.go b/internal/dao/job.go index 286cde59be..0c3ba1a12c 100644 --- a/internal/dao/job.go +++ b/internal/dao/job.go @@ -85,7 +85,7 @@ func (j *Job) TailLogs(ctx context.Context, opts *LogOptions) ([]LogChan, error) } if job.Spec.Selector == nil || len(job.Spec.Selector.MatchLabels) == 0 { - return nil, fmt.Errorf("No valid selector found on Job %s", opts.Path) + return nil, fmt.Errorf("no valid selector found for job: %s", opts.Path) } return podLogs(ctx, job.Spec.Selector.MatchLabels, opts) diff --git a/internal/dao/non_resource.go b/internal/dao/non_resource.go index 9840532ec4..0dc7208661 100644 --- a/internal/dao/non_resource.go +++ b/internal/dao/non_resource.go @@ -53,5 +53,5 @@ func (n *NonResource) GVR() string { // Get returns the given resource. func (n *NonResource) Get(context.Context, string) (runtime.Object, error) { - return nil, fmt.Errorf("NYI!") + return nil, fmt.Errorf("nyi") } diff --git a/internal/dao/pod.go b/internal/dao/pod.go index 6e5919381a..f4ee453dbe 100644 --- a/internal/dao/pod.go +++ b/internal/dao/pod.go @@ -385,11 +385,11 @@ func readLogs(ctx context.Context, wg *sync.WaitGroup, stream io.ReadCloser, out item = opts.ToLogItem(tview.EscapeBytes(bytes)) } else { if errors.Is(err, io.EOF) { - e := fmt.Errorf("Stream closed %w for %s", err, opts.Info()) + e := fmt.Errorf("stream closed %w for %s", err, opts.Info()) item = opts.ToErrLogItem(e) log.Warn().Err(e).Msg("log-reader EOF") } else { - e := fmt.Errorf("Stream canceled %w for %s", err, opts.Info()) + e := fmt.Errorf("stream canceled %w for %s", err, opts.Info()) item = opts.ToErrLogItem(e) log.Warn().Err(e).Msg("log-reader canceled") } @@ -439,7 +439,7 @@ func (p *Pod) SetImages(ctx context.Context, path string, imageSpecs ImageSpecs) return err } if isManaged { - return fmt.Errorf("Unable to set image. This pod is managed by %s. Please set the image on the controller", manager) + return fmt.Errorf("unable to set image. This pod is managed by %s. Please set the image on the controller", manager) } jsonPatch, err := GetJsonPatch(imageSpecs) if err != nil { diff --git a/internal/dao/port_forwarder.go b/internal/dao/port_forwarder.go index 454af94285..e0bef73f40 100644 --- a/internal/dao/port_forwarder.go +++ b/internal/dao/port_forwarder.go @@ -72,6 +72,11 @@ func (p *PortForwarder) Port() string { return p.tunnel.PortMap() } +// Address returns the port Address. +func (p *PortForwarder) Address() string { + return p.tunnel.Address +} + // ContainerPort returns the container port. func (p *PortForwarder) ContainerPort() string { return p.tunnel.ContainerPort diff --git a/internal/dao/reference.go b/internal/dao/reference.go index 8ea76f5159..3ea129f6c4 100644 --- a/internal/dao/reference.go +++ b/internal/dao/reference.go @@ -24,7 +24,7 @@ type Reference struct { func (r *Reference) List(ctx context.Context, ns string) ([]runtime.Object, error) { gvr, ok := ctx.Value(internal.KeyGVR).(client.GVR) if !ok { - return nil, errors.New("No context GVR found") + return nil, errors.New("no context for gvr found") } switch gvr { case SaGVR: diff --git a/internal/dao/registry.go b/internal/dao/registry.go index 85416a752b..f512bc60cd 100644 --- a/internal/dao/registry.go +++ b/internal/dao/registry.go @@ -11,6 +11,7 @@ import ( "github.com/derailed/k9s/internal/client" "github.com/rs/zerolog/log" + apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" @@ -413,11 +414,32 @@ func loadCRDs(f Factory, m ResourceMetas) { } for _, o := range oo { - meta, errs := extractMeta(o) - if len(errs) > 0 { - log.Error().Err(errs[0]).Msgf("Fail to extract CRD meta (%d) errors", len(errs)) + var crd apiext.CustomResourceDefinition + err = runtime.DefaultUnstructuredConverter.FromUnstructured(o.(*unstructured.Unstructured).Object, &crd) + if err != nil { + log.Err(err).Msg("boom") continue } + + var meta metav1.APIResource + meta.Kind = crd.Spec.Names.Kind + meta.Group = crd.Spec.Group + meta.Name = crd.Name + meta.SingularName = crd.Spec.Names.Singular + meta.ShortNames = crd.Spec.Names.ShortNames + meta.Namespaced = crd.Spec.Scope == apiext.NamespaceScoped + for _, v := range crd.Spec.Versions { + if v.Served && !v.Deprecated { + meta.Version = v.Name + break + } + } + + // meta, errs := extractMeta(o) + // if len(errs) > 0 { + // log.Error().Err(errs[0]).Msgf("Fail to extract CRD meta (%d) errors", len(errs)) + // continue + // } meta.Categories = append(meta.Categories, crdCat) gvr := client.NewGVRFromMeta(meta) m[gvr] = meta diff --git a/internal/dao/rs.go b/internal/dao/rs.go index fea9d3265d..07ad2fa378 100644 --- a/internal/dao/rs.go +++ b/internal/dao/rs.go @@ -80,7 +80,7 @@ func controllerInfo(rs *appsv1.ReplicaSet) (string, string, string, error) { } return ref.Name, ref.Kind, group, nil } - return "", "", "", fmt.Errorf("Unable to find controller for ReplicaSet %s", rs.ObjectMeta.Name) + return "", "", "", fmt.Errorf("unable to find controller for replicaset: %s", rs.ObjectMeta.Name) } // Rollback reverses the last deployment. diff --git a/internal/dao/sts.go b/internal/dao/sts.go index 9c111d523f..4e352f164b 100644 --- a/internal/dao/sts.go +++ b/internal/dao/sts.go @@ -152,7 +152,7 @@ func (s *StatefulSet) TailLogs(ctx context.Context, opts *LogOptions) ([]LogChan return nil, errors.New("expecting StatefulSet resource") } if sts.Spec.Selector == nil || len(sts.Spec.Selector.MatchLabels) == 0 { - return nil, fmt.Errorf("No valid selector found on StatefulSet %s", opts.Path) + return nil, fmt.Errorf("no valid selector found on statefulset: %s", opts.Path) } return podLogs(ctx, sts.Spec.Selector.MatchLabels, opts) diff --git a/internal/dao/svc.go b/internal/dao/svc.go index 1e8fcfe877..cee13178d5 100644 --- a/internal/dao/svc.go +++ b/internal/dao/svc.go @@ -32,7 +32,7 @@ func (s *Service) TailLogs(ctx context.Context, opts *LogOptions) ([]LogChan, er if err != nil { return nil, err } - if svc.Spec.Selector == nil || len(svc.Spec.Selector) == 0 { + if len(svc.Spec.Selector) == 0 { return nil, fmt.Errorf("no valid selector found on Service %s", opts.Path) } diff --git a/internal/dao/table.go b/internal/dao/table.go index 6936772f82..362ce0c21a 100644 --- a/internal/dao/table.go +++ b/internal/dao/table.go @@ -10,7 +10,6 @@ import ( "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/client-go/rest" @@ -66,7 +65,7 @@ func (t *Table) List(ctx context.Context, ns string) ([]runtime.Object, error) { LabelSelector: labelSel, FieldSelector: fieldSel, ResourceVersion: "0", - ResourceVersionMatch: v1.ResourceVersionMatchNotOlderThan, + ResourceVersionMatch: metav1.ResourceVersionMatchNotOlderThan, }, p). Do(ctx).Get() if err != nil { @@ -102,7 +101,7 @@ func (t *Table) getClient(f serializer.CodecFactory) (*rest.RESTClient, error) { func (t *Table) codec() (serializer.CodecFactory, runtime.ParameterCodec) { var tt metav1.Table - opts := metav1.TableOptions{IncludeObject: v1.IncludeObject} + opts := metav1.TableOptions{IncludeObject: metav1.IncludeObject} gv := t.gvr.GV() metav1.AddToGroupVersion(genScheme, gv) genScheme.AddKnownTypes(gv, &tt, &opts) diff --git a/internal/model/helpers_int_test.go b/internal/model/helpers_int_test.go index 5c3f39a911..3e7e54064f 100644 --- a/internal/model/helpers_int_test.go +++ b/internal/model/helpers_int_test.go @@ -36,6 +36,33 @@ func Test_rxFilter(t *testing.T) { }, }, }, + "start-rx-match": { + q: "(?i)^foo", + lines: []string{"foo", "fob", "barfoo"}, + e: fuzzy.Matches{ + { + Str: "(?i)^foo", + Index: 0, + MatchedIndexes: []int{0, 1, 2}, + }, + }, + }, + "end-rx-match": { + q: "foo$", + lines: []string{"foo", "fob", "barfoo"}, + e: fuzzy.Matches{ + { + Str: "foo$", + Index: 0, + MatchedIndexes: []int{0, 1, 2}, + }, + { + Str: "foo$", + Index: 2, + MatchedIndexes: []int{3, 4, 5}, + }, + }, + }, "multiple-matches": { q: "foo", lines: []string{"foo", "bar", "foo bar foo", "baz"}, @@ -58,6 +85,7 @@ func Test_rxFilter(t *testing.T) { }, }, } + for k := range uu { u := uu[k] t.Run(k, func(t *testing.T) { diff --git a/internal/model1/header.go b/internal/model1/header.go index 798f1d92ce..d4f6d4c850 100644 --- a/internal/model1/header.go +++ b/internal/model1/header.go @@ -16,7 +16,6 @@ type HeaderColumn struct { Name string Align int Decorator DecoratorFunc - Hide bool Wide bool MX bool Time bool diff --git a/internal/model1/row_event.go b/internal/model1/row_event.go index 628ddab057..c475f38d38 100644 --- a/internal/model1/row_event.go +++ b/internal/model1/row_event.go @@ -255,7 +255,7 @@ func (r *RowEvents) FindIndex(id string) (int, bool) { // Sort rows based on column index and order. func (r *RowEvents) Sort(ns string, sortCol int, isDuration, numCol, isCapacity, asc bool) { - if sortCol == -1 { + if sortCol == -1 || r == nil { return } @@ -290,6 +290,7 @@ func (r RowEventSorter) Len() int { } func (r RowEventSorter) Swap(i, j int) { + r.Events.events[i], r.Events.events[j] = r.Events.events[j], r.Events.events[i] } diff --git a/internal/model1/table_data.go b/internal/model1/table_data.go index 13ef48ce81..aa2c2f2269 100644 --- a/internal/model1/table_data.go +++ b/internal/model1/table_data.go @@ -167,19 +167,22 @@ func (t *TableData) rxFilter(q string, inverse bool) (*RowEvents, error) { return nil, fmt.Errorf("invalid rx filter %q: %w", q, err) } - ageIndex, ok := t.header.IndexOf("AGE", true) - - rr := NewRowEvents(t.RowCount() / 2) + var startIndex int + if _, ok := t.header.IndexOf("NAMESPACE", true); ok && client.IsNamespaced(t.namespace) { + startIndex = 1 + } + rr := NewRowEvents(50) + ageIndex, _ := t.header.IndexOf("AGE", true) t.rowEvents.Range(func(_ int, re RowEvent) bool { - ff := re.Row.Fields - if ok && ageIndex+1 <= len(ff) { + ff := re.Row.Fields[startIndex:] + if ageIndex >= 0 && ageIndex+1 <= len(ff) { ff = append(ff[0:ageIndex], ff[ageIndex+1:]...) } - fields := strings.Join(ff, spacer) - if (inverse && !rx.MatchString(fields)) || - ((!inverse) && rx.MatchString(fields)) { + match := rx.MatchString(strings.Join(ff, spacer)) + if (inverse && !match) || (!inverse && match) { rr.Add(re) } + return true }) diff --git a/internal/render/container.go b/internal/render/container.go index c4982b3b38..95f3e834f4 100644 --- a/internal/render/container.go +++ b/internal/render/container.go @@ -72,12 +72,12 @@ func (c Container) ColorerFunc() model1.ColorerFunc { // Header returns a header row. func (Container) Header(ns string) model1.Header { return model1.Header{ + model1.HeaderColumn{Name: "IDX"}, model1.HeaderColumn{Name: "NAME"}, model1.HeaderColumn{Name: "PF"}, model1.HeaderColumn{Name: "IMAGE"}, model1.HeaderColumn{Name: "READY"}, model1.HeaderColumn{Name: "STATE"}, - model1.HeaderColumn{Name: "INIT"}, model1.HeaderColumn{Name: "RESTARTS", Align: tview.AlignRight}, model1.HeaderColumn{Name: "PROBES(L:R:S)"}, model1.HeaderColumn{Name: "CPU", Align: tview.AlignRight, MX: true}, @@ -109,12 +109,12 @@ func (c Container) Render(o interface{}, name string, r *model1.Row) error { r.ID = co.Container.Name r.Fields = model1.Fields{ + co.Idx, co.Container.Name, "●", co.Container.Image, ready, state, - boolToStr(co.IsInit), restarts, probe(co.Container.LivenessProbe) + ":" + probe(co.Container.ReadinessProbe) + ":" + probe(co.Container.StartupProbe), toMc(cur.cpu), @@ -241,7 +241,7 @@ type ContainerRes struct { Container *v1.Container Status *v1.ContainerStatus MX *mv1beta1.ContainerMetrics - IsInit bool + Idx string Age metav1.Time } diff --git a/internal/render/container_test.go b/internal/render/container_test.go index b05d775ae9..d7f4f6f3d5 100644 --- a/internal/render/container_test.go +++ b/internal/render/container_test.go @@ -24,19 +24,18 @@ func TestContainer(t *testing.T) { Container: makeContainer(), Status: makeContainerStatus(), MX: makeContainerMetrics(), - IsInit: false, Age: makeAge(), } var r model1.Row assert.Nil(t, c.Render(cres, "blee", &r)) assert.Equal(t, "fred", r.ID) assert.Equal(t, model1.Fields{ + "", "fred", "●", "img", "false", "Running", - "false", "0", "off:off:off", "10", @@ -61,7 +60,6 @@ func BenchmarkContainerRender(b *testing.B) { Container: makeContainer(), Status: makeContainerStatus(), MX: makeContainerMetrics(), - IsInit: false, Age: makeAge(), } var r model1.Row diff --git a/internal/render/node.go b/internal/render/node.go index b207f61a2b..353816de0b 100644 --- a/internal/render/node.go +++ b/internal/render/node.go @@ -39,6 +39,7 @@ func (Node) Header(string) model1.Header { model1.HeaderColumn{Name: "ARCH", Wide: true}, model1.HeaderColumn{Name: "TAINTS"}, model1.HeaderColumn{Name: "VERSION"}, + model1.HeaderColumn{Name: "OS-IMAGE", Wide: true}, model1.HeaderColumn{Name: "KERNEL", Wide: true}, model1.HeaderColumn{Name: "INTERNAL-IP", Wide: true}, model1.HeaderColumn{Name: "EXTERNAL-IP", Wide: true}, @@ -95,6 +96,7 @@ func (n Node) Render(o interface{}, ns string, r *model1.Row) error { no.Status.NodeInfo.Architecture, strconv.Itoa(len(no.Spec.Taints)), no.Status.NodeInfo.KubeletVersion, + no.Status.NodeInfo.OSImage, no.Status.NodeInfo.KernelVersion, iIP, eIP, diff --git a/internal/render/node_test.go b/internal/render/node_test.go index 09fb4a6889..156b054cf1 100644 --- a/internal/render/node_test.go +++ b/internal/render/node_test.go @@ -25,8 +25,8 @@ func TestNodeRender(t *testing.T) { assert.Nil(t, err) assert.Equal(t, "minikube", r.ID) - e := model1.Fields{"minikube", "Ready", "master", "amd64", "0", "v1.15.2", "4.15.0", "192.168.64.107", "", "0", "10", "20", "0", "0", "4000", "7874"} - assert.Equal(t, e, r.Fields[:16]) + e := model1.Fields{"minikube", "Ready", "master", "amd64", "0", "v1.15.2", "Buildroot 2018.05.3", "4.15.0", "192.168.64.107", "", "0", "10", "20", "0", "0", "4000", "7874"} + assert.Equal(t, e, r.Fields[:17]) } func BenchmarkNodeRender(b *testing.B) { diff --git a/internal/render/pod.go b/internal/render/pod.go index 33ce957304..7366257d1f 100644 --- a/internal/render/pod.go +++ b/internal/render/pod.go @@ -194,7 +194,7 @@ func asReadinessGate(pod v1.Pod) string { return MissingValue } - trueConditions := 0 + var trueConditions int for _, readinessGate := range pod.Spec.ReadinessGates { conditionType := readinessGate.ConditionType for _, condition := range pod.Status.Conditions { @@ -228,7 +228,7 @@ func (p *PodWithMetrics) DeepCopyObject() runtime.Object { func gatherCoMX(spec *v1.PodSpec, ccmx []mv1beta1.ContainerMetrics) (c, r metric) { cc := make([]v1.Container, 0, len(spec.InitContainers)+len(spec.Containers)) - cc = append(cc, filterRestartableInitCO(spec.InitContainers)...) + cc = append(cc, filterSidecarCO(spec.InitContainers)...) cc = append(cc, spec.Containers...) rcpu, rmem := cosRequests(cc) @@ -498,12 +498,13 @@ func restartableInitCO(p *v1.ContainerRestartPolicy) bool { return p != nil && *p == v1.ContainerRestartPolicyAlways } -func filterRestartableInitCO(cc []v1.Container) []v1.Container { +func filterSidecarCO(cc []v1.Container) []v1.Container { rcc := make([]v1.Container, 0, len(cc)) for _, c := range cc { if c.RestartPolicy != nil && *c.RestartPolicy == v1.ContainerRestartPolicyAlways { rcc = append(rcc, c) } } + return rcc } diff --git a/internal/render/pod_int_test.go b/internal/render/pod_int_test.go index 08ca4ed402..c29f230d87 100644 --- a/internal/render/pod_int_test.go +++ b/internal/render/pod_int_test.go @@ -295,12 +295,11 @@ func Test_restartableInitCO(t *testing.T) { } } -func Test_filterRestartableInitCO(t *testing.T) { +func Test_filterSidecarCO(t *testing.T) { always := v1.ContainerRestartPolicyAlways uu := map[string]struct { - cc []v1.Container - ecc []v1.Container + cc, ecc []v1.Container }{ "empty": { cc: []v1.Container{}, @@ -350,7 +349,7 @@ func Test_filterRestartableInitCO(t *testing.T) { for k := range uu { u := uu[k] t.Run(k, func(t *testing.T) { - assert.Equal(t, u.ecc, filterRestartableInitCO(u.cc)) + assert.Equal(t, u.ecc, filterSidecarCO(u.cc)) }) } } diff --git a/internal/render/port_forward_test.go b/internal/render/port_forward_test.go index 6c4cd18819..20e0683ac0 100644 --- a/internal/render/port_forward_test.go +++ b/internal/render/port_forward_test.go @@ -66,3 +66,7 @@ func (f fwd) Active() bool { func (f fwd) Age() time.Time { return testTime() } + +func (f fwd) Address() string { + return "" +} diff --git a/internal/render/portforward.go b/internal/render/portforward.go index 267be33cf6..915e325b4b 100644 --- a/internal/render/portforward.go +++ b/internal/render/portforward.go @@ -24,9 +24,12 @@ type Forwarder interface { // Container returns a container name. Container() string - // Ports returns container exposed ports. + // Port returns container exposed port. Port() string + // Address returns the host address. + Address() string + // Active returns forwarder current state. Active() bool @@ -77,7 +80,7 @@ func (f PortForward) Render(o interface{}, gvr string, r *model1.Row) error { trimContainer(n), pf.Container(), pf.Port(), - UrlFor(pf.Config.Host, pf.Config.Path, ports[0]), + UrlFor(pf.Config.Host, pf.Config.Path, ports[0], pf.Address()), AsThousands(int64(pf.Config.C)), AsThousands(int64(pf.Config.N)), "", @@ -100,9 +103,9 @@ func trimContainer(n string) string { } // UrlFor computes fq url for a given benchmark configuration. -func UrlFor(host, path, port string) string { +func UrlFor(host, path, port, address string) string { if host == "" { - host = "localhost" + host = address } if path == "" { path = "/" diff --git a/internal/ui/dialog/selection.go b/internal/ui/dialog/selection.go index fc6e545cca..592105c4db 100644 --- a/internal/ui/dialog/selection.go +++ b/internal/ui/dialog/selection.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of K9s + package dialog import ( diff --git a/internal/ui/modal_list.go b/internal/ui/modal_list.go index 1827561a36..ac331a9eaf 100644 --- a/internal/ui/modal_list.go +++ b/internal/ui/modal_list.go @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of K9s + package ui import ( diff --git a/internal/ui/pages.go b/internal/ui/pages.go index b5864e3bec..eed87e5d53 100644 --- a/internal/ui/pages.go +++ b/internal/ui/pages.go @@ -5,6 +5,7 @@ package ui import ( "fmt" + "github.com/derailed/k9s/internal/model" "github.com/derailed/tview" "github.com/rs/zerolog/log" diff --git a/internal/view/container.go b/internal/view/container.go index 01f4f1e5e5..babcb2b8db 100644 --- a/internal/view/container.go +++ b/internal/view/container.go @@ -33,6 +33,7 @@ func NewContainer(gvr client.GVR) ResourceViewer { c.SetEnvFn(c.k9sEnv) c.GetTable().SetEnterFn(c.viewLogs) c.GetTable().SetDecorateFn(c.decorateRows) + c.GetTable().SetSortCol("IDX", true) c.AddBindKeysFn(c.bindKeys) c.GetTable().SetDecorateFn(c.portForwardIndicator) @@ -90,6 +91,7 @@ func (c *Container) bindKeys(aa *ui.KeyActions) { ui.KeyF: ui.NewKeyAction("Show PortForward", c.showPFCmd, true), ui.KeyShiftF: ui.NewKeyAction("PortForward", c.portFwdCmd, true), ui.KeyShiftT: ui.NewKeyAction("Sort Restart", c.GetTable().SortColCmd("RESTARTS", false), false), + ui.KeyShiftI: ui.NewKeyAction("Sort Idx", c.GetTable().SortColCmd("IDX", true), false), }) aa.Merge(resourceSorters(c.GetTable())) } diff --git a/internal/view/container_test.go b/internal/view/container_test.go index cc1133e88a..84787f6d1b 100644 --- a/internal/view/container_test.go +++ b/internal/view/container_test.go @@ -16,5 +16,5 @@ func TestContainerNew(t *testing.T) { assert.Nil(t, c.Init(makeCtx())) assert.Equal(t, "Containers", c.Name()) - assert.Equal(t, 18, len(c.Hints())) + assert.Equal(t, 19, len(c.Hints())) } diff --git a/internal/view/helpers.go b/internal/view/helpers.go index 8ec027a9b0..db90747299 100644 --- a/internal/view/helpers.go +++ b/internal/view/helpers.go @@ -153,7 +153,7 @@ func showPods(app *App, path, labelSel, fieldSel string) { } } -func podCtx(app *App, path, fieldSel string) ContextFunc { +func podCtx(_ *App, path, fieldSel string) ContextFunc { return func(ctx context.Context) context.Context { ctx = context.WithValue(ctx, internal.KeyPath, path) return context.WithValue(ctx, internal.KeyFields, fieldSel) diff --git a/internal/view/owner_extender.go b/internal/view/owner_extender.go index 89b42449ec..52679c6522 100644 --- a/internal/view/owner_extender.go +++ b/internal/view/owner_extender.go @@ -1,23 +1,25 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of K9s + package view import ( "context" "fmt" - "github.com/derailed/k9s/internal/ui/dialog" - "github.com/rs/zerolog/log" + "github.com/derailed/k9s/internal" + "github.com/derailed/k9s/internal/client" + "github.com/derailed/k9s/internal/dao" + "github.com/derailed/k9s/internal/render" + "github.com/derailed/k9s/internal/ui" + "github.com/derailed/k9s/internal/ui/dialog" "github.com/derailed/tcell/v2" "github.com/go-errors/errors" + "github.com/rs/zerolog/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/derailed/k9s/internal" - "github.com/derailed/k9s/internal/client" - "github.com/derailed/k9s/internal/dao" - "github.com/derailed/k9s/internal/render" - "github.com/derailed/k9s/internal/ui" ) // OwnerExtender adds owner actions to a given viewer. diff --git a/internal/view/reference.go b/internal/view/reference.go index 2f08cc7bba..5d2e97f42a 100644 --- a/internal/view/reference.go +++ b/internal/view/reference.go @@ -54,8 +54,9 @@ func (r *Reference) gotoCmd(evt *tcell.EventKey) *tcell.EventKey { } path := r.GetTable().GetSelectedItem() + ns, _ := client.Namespaced(path) gvr := ui.TrimCell(r.GetTable().SelectTable, row, 2) - r.App().gotoResource(client.NewGVR(gvr).R(), path, false) + r.App().gotoResource(client.NewGVR(gvr).R()+" "+ns, path, false) return evt } diff --git a/internal/view/table.go b/internal/view/table.go index d0f60d37a0..47a8d6163b 100644 --- a/internal/view/table.go +++ b/internal/view/table.go @@ -11,6 +11,7 @@ import ( "github.com/derailed/k9s/internal" "github.com/derailed/k9s/internal/client" + "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/model" "github.com/derailed/k9s/internal/render" "github.com/derailed/k9s/internal/ui" @@ -46,16 +47,16 @@ func (t *Table) Init(ctx context.Context) (err error) { if t.app.Conn() != nil { ctx = context.WithValue(ctx, internal.KeyHasMetrics, t.app.Conn().HasMetrics()) } + t.app.CustomView = config.NewCustomView() ctx = context.WithValue(ctx, internal.KeyStyles, t.app.Styles) + ctx = context.WithValue(ctx, internal.KeyViewConfig, t.app.CustomView) + t.Table.Init(ctx) if !t.app.Config.K9s.UI.Reactive { if err := t.app.RefreshCustomViews(); err != nil { log.Warn().Err(err).Msg("CustomViews load failed") t.app.Logo().Warn("Views load failed!") } } - - ctx = context.WithValue(ctx, internal.KeyViewConfig, t.app.CustomView) - t.Table.Init(ctx) t.SetInputCapture(t.keyboard) t.bindKeys() t.GetModel().SetRefreshRate(time.Duration(t.app.Config.K9s.GetRefreshRate()) * time.Second) diff --git a/internal/view/workload.go b/internal/view/workload.go index 4f0ba02fcd..78bba38fa2 100644 --- a/internal/view/workload.go +++ b/internal/view/workload.go @@ -79,7 +79,7 @@ func parsePath(path string) (client.GVR, string, bool) { func (w *Workload) showRes(app *App, _ ui.Tabular, _ client.GVR, path string) { gvr, fqn, ok := parsePath(path) if !ok { - app.Flash().Err(fmt.Errorf("Unable to parse path: %q", path)) + app.Flash().Err(fmt.Errorf("unable to parse path: %q", path)) return } app.gotoResource(gvr.R(), fqn, false) @@ -130,7 +130,7 @@ func (w *Workload) resourceDelete(selections []string, msg string) { for _, sel := range selections { gvr, fqn, ok := parsePath(sel) if !ok { - w.App().Flash().Err(fmt.Errorf("Unable to parse path: %q", sel)) + w.App().Flash().Err(fmt.Errorf("unable to parse path: %q", sel)) return } @@ -157,7 +157,7 @@ func (w *Workload) describeCmd(evt *tcell.EventKey) *tcell.EventKey { } gvr, fqn, ok := parsePath(path) if !ok { - w.App().Flash().Err(fmt.Errorf("Unable to parse path: %q", path)) + w.App().Flash().Err(fmt.Errorf("unable to parse path: %q", path)) return evt } @@ -173,7 +173,7 @@ func (w *Workload) editCmd(evt *tcell.EventKey) *tcell.EventKey { } gvr, fqn, ok := parsePath(path) if !ok { - w.App().Flash().Err(fmt.Errorf("Unable to parse path: %q", path)) + w.App().Flash().Err(fmt.Errorf("unable to parse path: %q", path)) return evt } @@ -193,7 +193,7 @@ func (w *Workload) yamlCmd(evt *tcell.EventKey) *tcell.EventKey { } gvr, fqn, ok := parsePath(path) if !ok { - w.App().Flash().Err(fmt.Errorf("Unable to parse path: %q", path)) + w.App().Flash().Err(fmt.Errorf("unable to parse path: %q", path)) return evt } diff --git a/internal/watch/forwarders.go b/internal/watch/forwarders.go index 8eab5c0657..0c16f38ddf 100644 --- a/internal/watch/forwarders.go +++ b/internal/watch/forwarders.go @@ -29,6 +29,9 @@ type Forwarder interface { // Port returns the port mapping. Port() string + // Address returns the host address. + Address() string + // FQN returns the full port-forward name. FQN() string diff --git a/internal/watch/forwarders_test.go b/internal/watch/forwarders_test.go index 19e847853b..eae8ae633c 100644 --- a/internal/watch/forwarders_test.go +++ b/internal/watch/forwarders_test.go @@ -173,15 +173,16 @@ func newNoOpForwarder() noOpForwarder { return noOpForwarder{} } -func (m noOpForwarder) Start(path string, tunnel port.PortTunnel) (*portforward.PortForwarder, error) { +func (noOpForwarder) Start(path string, tunnel port.PortTunnel) (*portforward.PortForwarder, error) { return nil, nil } -func (m noOpForwarder) Stop() {} -func (m noOpForwarder) ID() string { return "" } -func (m noOpForwarder) Container() string { return "" } -func (m noOpForwarder) Port() string { return "" } -func (m noOpForwarder) FQN() string { return "" } -func (m noOpForwarder) Active() bool { return false } -func (m noOpForwarder) SetActive(bool) {} -func (m noOpForwarder) Age() time.Time { return time.Now() } -func (m noOpForwarder) HasPortMapping(string) bool { return false } +func (noOpForwarder) Stop() {} +func (noOpForwarder) ID() string { return "" } +func (noOpForwarder) Container() string { return "" } +func (noOpForwarder) Port() string { return "" } +func (noOpForwarder) FQN() string { return "" } +func (noOpForwarder) Active() bool { return false } +func (noOpForwarder) SetActive(bool) {} +func (noOpForwarder) Age() time.Time { return time.Now() } +func (noOpForwarder) HasPortMapping(string) bool { return false } +func (noOpForwarder) Address() string { return "" } diff --git a/internal/xray/pod.go b/internal/xray/pod.go index dbcbf92008..0a618ef0e8 100644 --- a/internal/xray/pod.go +++ b/internal/xray/pod.go @@ -41,7 +41,7 @@ func (p *Pod) Render(ctx context.Context, ns string, o interface{}) error { node := NewTreeNode("v1/pods", client.FQN(po.Namespace, po.Name)) parent, ok := ctx.Value(KeyParent).(*TreeNode) if !ok { - return fmt.Errorf("Expecting a TreeNode but got %T", ctx.Value(KeyParent)) + return fmt.Errorf("expecting a TreeNode but got %T", ctx.Value(KeyParent)) } if err := p.containerRefs(ctx, node, po.Namespace, po.Spec); err != nil { @@ -95,6 +95,11 @@ func (*Pod) containerRefs(ctx context.Context, parent *TreeNode, ns string, spec return err } } + for i := 0; i < len(spec.EphemeralContainers); i++ { + if err := cre.Render(ctx, ns, render.ContainerRes{Container: &spec.Containers[i]}); err != nil { + return err + } + } return nil } diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d6ef0648a2..46510bf778 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: k9s base: core22 -version: 'v0.32.5' +version: 'v0.32.6' summary: K9s is a CLI to view and manage your Kubernetes clusters. description: | K9s is a CLI to view and manage your Kubernetes clusters. By leveraging a terminal UI, you can easily traverse Kubernetes resources and view the state of your clusters in a single powerful session.