diff --git a/Makefile b/Makefile
index 06dfb4c1..29f751e9 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.30.0
+VERSION ?= v0.30.1
IMG_NAME := derailed/k9s
IMAGE := ${IMG_NAME}:${VERSION}
diff --git a/change_logs/release_v0.30.1.md b/change_logs/release_v0.30.1.md
new file mode 100644
index 00000000..a983a8d4
--- /dev/null
+++ b/change_logs/release_v0.30.1.md
@@ -0,0 +1,57 @@
+
+
+# Release v0.30.1
+
+## Notes
+
+Thank you to all that contributed with flushing out issues and enhancements for K9s!
+I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev
+and see if we're happier with some of the fixes!
+If you've filed an issue please help me verify and close.
+
+Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated!
+Also big thanks to all that have allocated their own time to help others on both slack and on this repo!!
+
+As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey,
+please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
+
+On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
+
+## 🎄 Maintenance Release! 🎄
+
+🎵 `On The twentyfouth day of Christmas my true love gave to me... Bugs!!` 🎵
+
+Got to love the aftermath... Thank you all for pitch'in in and help flesh out bugs!! The gift that keeps on... giving?
+
+🎅 Merry Christmas to all and Best wishes for the new year!!🧑🎄
+
+---
+
+### Videos Are In The Can!
+
+Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content...
+
+* [K9s v0.30.0 Sneak peek](https://youtu.be/mVBc1XneRJ4)
+* [Vulnerability Scans](https://youtu.be/ULkl0MsaidU)
+
+---
+
+## Resolved Issues
+
+* [#2368](https://github.com/derailed/k9s/issues/2368) Pod CPU and MEM columns are empty in 0.30.0
+* [#2367](https://github.com/derailed/k9s/issues/2367) k9s 0.30.0 issue loading plugins
+* [#2366](https://github.com/derailed/k9s/issues/2366) List pods of deployment is now impossible
+* [#2264](https://github.com/derailed/k9s/issues/2264) k9s 0.30.0 fields and values missed in action in the "namespace view"
+* [#2263](https://github.com/derailed/k9s/issues/2263) Default 0.30.0 default skin on macOS is no good
+
+---
+
+## 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!!
+
+* [#2360](https://github.com/derailed/k9s/pull/2360) adding cancelable launch prompts to NodeShell
+
+---
+
+
© 2023 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)
diff --git a/internal/config/styles.go b/internal/config/styles.go
index 2ad1956c..5dd3c099 100644
--- a/internal/config/styles.go
+++ b/internal/config/styles.go
@@ -541,7 +541,6 @@ func (s *Styles) Load(path string) error {
if err != nil {
return err
}
-
if err := yaml.Unmarshal(f, s); err != nil {
return err
}
diff --git a/internal/config/templates/stock-skin.yaml b/internal/config/templates/stock-skin.yaml
index 02e68ab2..3d677bf8 100644
--- a/internal/config/templates/stock-skin.yaml
+++ b/internal/config/templates/stock-skin.yaml
@@ -17,24 +17,24 @@ k9s:
bgColor: black
suggestColor: dodgerblue
border:
- default: seagreen
command: aqua
- info:
- fgColor: orange
- sectionColor: white
- dialog:
- fgColor: dodgerblue
+ default: seagreen
+ help:
+ fgColor: cadetblue
bgColor: black
- buttonFgColor: black
- buttonBgColor: dodgerblue
- buttonFocusFgColor: white
- buttonFocusBgColor: fuchsia
- labelFgColor: fuchsia
- fieldFgColor: dodgerblue
+ sectionColor: green
+ keyColor: dodgerblue
+ numKeyColor: fuchsia
frame:
+ title:
+ fgColor: aqua
+ bgColor: black
+ highlightColor: fuchsia
+ counterColor: papayawhip
+ filterColor: seagreen
border:
fgColor: dodgerblue
- focusColor: aqua
+ focusColor: lightskyblue
menu:
fgColor: white
keyColor: dodgerblue
@@ -46,52 +46,71 @@ k9s:
status:
newColor: lightskyblue
modifyColor: greenyellow
- addColor: white
- errorColor: orangered
+ addColor: dodgerblue
pendingColor: darkorange
+ errorColor: orangered
highlightColor: aqua
killColor: mediumpurple
- completedColor: gray
- title:
- fgColor: aqua
- highlightColor: fuchsia
- counterColor: papayawhip
- filterColor: steelblue
+ completedColor: lightslategray
+ info:
+ sectionColor: white
+ fgColor: orange
views:
- # Charts skins...
- charts:
- bgColor: black
- defaultDialColors:
- - linegreen
- - orangered
- defaultChartColors:
- - linegreen
- - orangered
table:
fgColor: aqua
bgColor: black
- cursorFgColor: white
- cursorBgColor: black
- markColor: darkgoldenrod
+ cursorFgColor: black
+ cursorBgColor: aqua
+ markColor: palegreen
header:
- fgColor: lightGray
+ fgColor: white
bgColor: black
- sorterColor: orange
+ sorterColor: aqua
xray:
- fgColor: blue
+ fgColor: aqua
bgColor: black
- cursorColor: aqua
- graphicColor: darkgoldenrod
- showIcons: false
+ cursorColor: dodgerblue
+ cursorTextColor: black
+ graphicColor: cadetblue
+ charts:
+ bgColor: black
+ dialBgColor: black
+ chartBgColor: black
+ defaultDialColors:
+ - palegreen
+ - orangered
+ defaultChartColors:
+ - palegreen
+ - orangered
+ resourceColors:
+ cpu:
+ - dodgerblue
+ - darkslateblue
+ mem:
+ - yellow
+ - goldenrod
yaml:
keyColor: steelblue
- colonColor: white
valueColor: papayawhip
+ colonColor: white
+ picker:
+ mainColor: white
+ focusColor: aqua
+ shortcutColor: aqua
logs:
- fgColor: white
+ fgColor: lightskyblue
bgColor: black
indicator:
fgColor: dodgerblue
bgColor: black
toggleOnColor: limegreen
- toggleOffColor: steelblue
\ No newline at end of file
+ toggleOffColor: gray
+ dialog:
+ fgColor: cadetblue
+ bgColor: black
+ buttonFgColor: black
+ buttonBgColor: darkslateblue
+ buttonFocusFgColor: black
+ buttonFocusBgColor: dodgerblue
+ labelFgColor: white
+ fieldFgColor: white
\ No newline at end of file
diff --git a/internal/dao/container.go b/internal/dao/container.go
index df8cd766..f90d74c9 100644
--- a/internal/dao/container.go
+++ b/internal/dao/container.go
@@ -38,7 +38,7 @@ func (c *Container) List(ctx context.Context, _ string) ([]runtime.Object, error
cmx client.ContainersMetrics
err error
)
- if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); withMx || !ok {
+ if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); ok && withMx {
cmx, _ = client.DialMetrics(c.Client()).FetchContainersMetrics(ctx, fqn)
}
diff --git a/internal/dao/node.go b/internal/dao/node.go
index 4f8058f4..db0c8fff 100644
--- a/internal/dao/node.go
+++ b/internal/dao/node.go
@@ -139,7 +139,7 @@ func (n *Node) Get(ctx context.Context, path string) (runtime.Object, error) {
}
var nmx *mv1beta1.NodeMetrics
- if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); withMx || !ok {
+ if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); ok && withMx {
nmx, _ = client.DialMetrics(n.Client()).FetchNodeMetrics(ctx, path)
}
diff --git a/internal/dao/pod.go b/internal/dao/pod.go
index d4404f5f..4c11879f 100644
--- a/internal/dao/pod.go
+++ b/internal/dao/pod.go
@@ -70,7 +70,7 @@ func (p *Pod) Get(ctx context.Context, path string) (runtime.Object, error) {
}
var pmx *mv1beta1.PodMetrics
- if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); withMx || !ok {
+ if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); ok && withMx {
pmx, _ = client.DialMetrics(p.Client()).FetchPodMetrics(ctx, path)
}
@@ -95,7 +95,7 @@ func (p *Pod) List(ctx context.Context, ns string) ([]runtime.Object, error) {
}
var pmx client.PodsMetricsMap
- if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); false && ok && withMx {
+ if withMx, ok := ctx.Value(internal.KeyWithMetrics).(bool); ok && withMx {
pmx, _ = client.DialMetrics(p.Client()).FetchPodsMetricsMap(ctx, ns)
}
sel, _ := ctx.Value(internal.KeyLabels).(string)
diff --git a/internal/render/pod.go b/internal/render/pod.go
index fb7ab88d..4433ce19 100644
--- a/internal/render/pod.go
+++ b/internal/render/pod.go
@@ -101,8 +101,8 @@ func (Pod) Header(ns string) Header {
HeaderColumn{Name: "%CPU/L", Align: tview.AlignRight, MX: true},
HeaderColumn{Name: "%MEM/R", Align: tview.AlignRight, MX: true},
HeaderColumn{Name: "%MEM/L", Align: tview.AlignRight, MX: true},
- HeaderColumn{Name: "IP", Wide: true},
- HeaderColumn{Name: "NODE", Wide: true},
+ HeaderColumn{Name: "IP"},
+ HeaderColumn{Name: "NODE"},
HeaderColumn{Name: "NOMINATED NODE", Wide: true},
HeaderColumn{Name: "READINESS GATES", Wide: true},
HeaderColumn{Name: "QOS", Wide: true},
diff --git a/internal/ui/config.go b/internal/ui/config.go
index d6f3bc76..6ca8a495 100644
--- a/internal/ui/config.go
+++ b/internal/ui/config.go
@@ -148,8 +148,7 @@ func (c *Configurator) RefreshStyles(context string) {
var skin string
if c.Config != nil {
skin = c.Config.K9s.UI.Skin
- ct, err := c.Config.K9s.ActiveContext()
- if err != nil {
+ if ct, err := c.Config.K9s.ActiveContext(); err != nil {
log.Warn().Msgf("No active context found. Using default skin")
} else if ct.Skin != "" {
skin = ct.Skin
diff --git a/internal/ui/dialog/prompt.go b/internal/ui/dialog/prompt.go
index 622ae4a9..8232d2d2 100644
--- a/internal/ui/dialog/prompt.go
+++ b/internal/ui/dialog/prompt.go
@@ -1,3 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Authors of K9s
+
package dialog
import (
diff --git a/internal/ui/dialog/prompt_test.go b/internal/ui/dialog/prompt_test.go
index 7d4ade05..a5a7c022 100644
--- a/internal/ui/dialog/prompt_test.go
+++ b/internal/ui/dialog/prompt_test.go
@@ -1,14 +1,18 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Authors of K9s
+
package dialog
import (
"context"
+ "testing"
+ "time"
+
"github.com/derailed/k9s/internal/config"
"github.com/derailed/k9s/internal/ui"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
"github.com/stretchr/testify/assert"
- "testing"
- "time"
)
func TestShowPrompt(t *testing.T) {
diff --git a/internal/ui/table.go b/internal/ui/table.go
index d2f2f7ad..acf4d866 100644
--- a/internal/ui/table.go
+++ b/internal/ui/table.go
@@ -22,6 +22,8 @@ import (
"golang.org/x/text/language"
)
+const maxTruncate = 50
+
type (
// ColorerFunc represents a row colorer.
ColorerFunc func(ns string, evt render.RowEvent) tcell.Color
@@ -469,9 +471,9 @@ func (t *Table) styleTitle() string {
buff := t.cmdBuff.GetText()
if IsLabelSelector(buff) {
- buff = TrimLabelSelector(buff)
+ buff = truncate(TrimLabelSelector(buff), maxTruncate)
} else if l := t.GetModel().GetLabelFilter(); l != "" {
- buff = l
+ buff = truncate(l, maxTruncate)
}
if buff == "" {
diff --git a/internal/ui/table_helper.go b/internal/ui/table_helper.go
index 85a6e689..2f7a4f0e 100644
--- a/internal/ui/table_helper.go
+++ b/internal/ui/table_helper.go
@@ -104,6 +104,14 @@ func TrimLabelSelector(s string) string {
return s
}
+func truncate(s string, max int) string {
+ if len(s) < max {
+ return s
+ }
+
+ return s[:max] + "..."
+}
+
// SkinTitle decorates a title.
func SkinTitle(fmat string, style config.Frame) string {
bgColor := style.Title.BgColor
diff --git a/internal/ui/table_helper_test.go b/internal/ui/table_helper_test.go
index 072e7297..01fc7afe 100644
--- a/internal/ui/table_helper_test.go
+++ b/internal/ui/table_helper_test.go
@@ -9,6 +9,29 @@ import (
"github.com/stretchr/testify/assert"
)
+func TestTruncate(t *testing.T) {
+ uu := map[string]struct {
+ s, e string
+ }{
+ "empty": {},
+ "max": {
+ s: "/app.kubernetes.io/instance=prom,app.kubernetes.io/name=prometheus,app.kubernetes.io/component=server",
+ e: "/app.kubernetes.io/instance=prom,app.kubernetes.io...",
+ },
+ "less": {
+ s: "app=fred,env=blee",
+ e: "app=fred,env=blee",
+ },
+ }
+
+ for k := range uu {
+ u := uu[k]
+ t.Run(k, func(t *testing.T) {
+ assert.Equal(t, u.e, truncate(u.s, 50))
+ })
+ }
+}
+
func TestIsLabelSelector(t *testing.T) {
uu := map[string]struct {
s string
diff --git a/internal/view/cmd/args.go b/internal/view/cmd/args.go
index 73afbffb..aaef7d61 100644
--- a/internal/view/cmd/args.go
+++ b/internal/view/cmd/args.go
@@ -38,7 +38,7 @@ func newArgs(p *Interpreter, aa []string) args {
args[filterKey] = a[1:]
case strings.Contains(a, labelFlag):
- if ll := toLabels(a); len(ll) != 0 {
+ if ll := ToLabels(a); len(ll) != 0 {
args[labelKey] = a
}
diff --git a/internal/view/cmd/helpers.go b/internal/view/cmd/helpers.go
index 5d53d633..bc4978f3 100644
--- a/internal/view/cmd/helpers.go
+++ b/internal/view/cmd/helpers.go
@@ -11,7 +11,7 @@ import (
"github.com/rs/zerolog/log"
)
-func toLabels(s string) map[string]string {
+func ToLabels(s string) map[string]string {
ll := strings.Split(s, ",")
lbls := make(map[string]string, len(ll))
for _, l := range ll {
diff --git a/internal/view/cmd/helpers_test.go b/internal/view/cmd/helpers_test.go
index 9b9f5dc4..da4f821d 100644
--- a/internal/view/cmd/helpers_test.go
+++ b/internal/view/cmd/helpers_test.go
@@ -53,7 +53,7 @@ func Test_toLabels(t *testing.T) {
for k := range uu {
u := uu[k]
t.Run(k, func(t *testing.T) {
- assert.Equal(t, u.ll, toLabels(u.s))
+ assert.Equal(t, u.ll, ToLabels(u.s))
})
}
}
diff --git a/internal/view/cmd/interpreter.go b/internal/view/cmd/interpreter.go
index fce8980e..4b142e51 100644
--- a/internal/view/cmd/interpreter.go
+++ b/internal/view/cmd/interpreter.go
@@ -196,5 +196,5 @@ func (c *Interpreter) LabelsArg() (map[string]string, bool) {
return nil, false
}
- return toLabels(ll), true
+ return ToLabels(ll), true
}
diff --git a/internal/view/helpers.go b/internal/view/helpers.go
index 5f7f4365..6648b1da 100644
--- a/internal/view/helpers.go
+++ b/internal/view/helpers.go
@@ -18,6 +18,7 @@ import (
"github.com/derailed/k9s/internal/model"
"github.com/derailed/k9s/internal/render"
"github.com/derailed/k9s/internal/ui"
+ "github.com/derailed/k9s/internal/view/cmd"
"github.com/derailed/tcell/v2"
"github.com/derailed/tview"
"github.com/rs/zerolog/log"
@@ -116,13 +117,9 @@ func toLabelsStr(labels map[string]string) string {
}
func showPods(app *App, path, labelSel, fieldSel string) {
- // !!BOZO!! needed??
- // if err := app.switchNS(client.BlankNamespace); err != nil {
- // app.Flash().Err(err)
- // return
- // }
v := NewPod(client.NewGVR("v1/pods"))
- v.SetContextFn(podCtx(app, path, labelSel, fieldSel))
+ v.SetContextFn(podCtx(app, path, fieldSel))
+ v.SetLabelFilter(cmd.ToLabels(labelSel))
ns, _ := client.Namespaced(path)
if err := app.Config.SetActiveNamespace(ns); err != nil {
@@ -133,11 +130,9 @@ func showPods(app *App, path, labelSel, fieldSel string) {
}
}
-func podCtx(app *App, path, labelSel, fieldSel string) ContextFunc {
+func podCtx(app *App, path, fieldSel string) ContextFunc {
return func(ctx context.Context) context.Context {
ctx = context.WithValue(ctx, internal.KeyPath, path)
- ctx = context.WithValue(ctx, internal.KeyLabels, labelSel)
-
return context.WithValue(ctx, internal.KeyFields, fieldSel)
}
}
diff --git a/internal/view/log_indicator.go b/internal/view/log_indicator.go
index ee95f97f..35962b92 100644
--- a/internal/view/log_indicator.go
+++ b/internal/view/log_indicator.go
@@ -9,7 +9,6 @@ import (
"github.com/derailed/k9s/internal/config"
"github.com/derailed/tview"
- "github.com/rs/zerolog/log"
)
const spacer = " "
@@ -155,7 +154,5 @@ func (l *LogIndicator) Refresh() {
l.indicator = append(l.indicator, fmt.Sprintf(toggleOffFmt, "Wrap", "")...)
}
- log.Debug().Msgf("INDICATOR: %q", l.indicator)
-
_, _ = l.Write(l.indicator)
}
diff --git a/internal/view/log_indicator_test.go b/internal/view/log_indicator_test.go
index 2316354d..0c793f59 100644
--- a/internal/view/log_indicator_test.go
+++ b/internal/view/log_indicator_test.go
@@ -18,10 +18,10 @@ func TestLogIndicatorRefresh(t *testing.T) {
e string
}{
"all-containers": {
- view.NewLogIndicator(config.NewConfig(nil), defaults, true), "[::b]AllContainers:[steelblue::d]Off[-::] [::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[steelblue::d]Off[-::] [::b]Timestamps:[steelblue::d]Off[-::] [::b]Wrap:[steelblue::d]Off[-::]\n",
+ view.NewLogIndicator(config.NewConfig(nil), defaults, true), "[::b]AllContainers:[gray::d]Off[-::] [::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[gray::d]Off[-::] [::b]Timestamps:[gray::d]Off[-::] [::b]Wrap:[gray::d]Off[-::]\n",
},
"plain": {
- view.NewLogIndicator(config.NewConfig(nil), defaults, false), "[::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[steelblue::d]Off[-::] [::b]Timestamps:[steelblue::d]Off[-::] [::b]Wrap:[steelblue::d]Off[-::]\n",
+ view.NewLogIndicator(config.NewConfig(nil), defaults, false), "[::b]Autoscroll:[limegreen::b]On[-::] [::b]FullScreen:[gray::d]Off[-::] [::b]Timestamps:[gray::d]Off[-::] [::b]Wrap:[gray::d]Off[-::]\n",
},
}
diff --git a/internal/view/node.go b/internal/view/node.go
index 63603195..c5a14b93 100644
--- a/internal/view/node.go
+++ b/internal/view/node.go
@@ -14,6 +14,7 @@ import (
"github.com/derailed/k9s/internal/ui"
"github.com/derailed/k9s/internal/ui/dialog"
"github.com/derailed/tcell/v2"
+ "github.com/rs/zerolog/log"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
diff --git a/plugins/carvel.yaml b/plugins/carvel.yaml
index eea45ca7..d3bfeb7a 100644
--- a/plugins/carvel.yaml
+++ b/plugins/carvel.yaml
@@ -1,5 +1,5 @@
# $HOME/.k9s/plugin.yml
-plugin:
+plugins:
kapp-inspect:
shortCut: Shift-Z
confirm: false
diff --git a/plugins/crossplane.yaml b/plugins/crossplane.yaml
index fb7015e1..14d7915e 100644
--- a/plugins/crossplane.yaml
+++ b/plugins/crossplane.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# List all the resources managed by a Composite Resource
kube-lineage:
shortCut: Ctrl-X
@@ -11,11 +11,11 @@ plugin:
args:
- -c
- >-
- kubectl lineage
+ kubectl lineage
-d 6
--exclude-types Event,ProviderConfigUsage.aws.upbound.io,ProviderConfigUsage.kubernetes.crossplane.io
--show-group
- --context $CONTEXT
- $RESOURCE_NAME
- $NAME
+ --context $CONTEXT
+ $RESOURCE_NAME
+ $NAME
| less -K
diff --git a/plugins/debug-container.yaml b/plugins/debug-container.yaml
index 2040cefc..0d1e387a 100644
--- a/plugins/debug-container.yaml
+++ b/plugins/debug-container.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
#--- Create debug container for selected pod in current namespace
# See https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container
debug:
diff --git a/plugins/dive.yaml b/plugins/dive.yaml
index c92205ac..090bc2c6 100644
--- a/plugins/dive.yaml
+++ b/plugins/dive.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
dive:
shortCut: d
confirm: false
diff --git a/plugins/flux.yaml b/plugins/flux.yaml
index ca5c68e6..cbe887d3 100644
--- a/plugins/flux.yaml
+++ b/plugins/flux.yaml
@@ -2,7 +2,7 @@
# move selected line to chosen resource in K9s, then:
# Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
# Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
-plugin:
+plugins:
toggle-helmrelease:
shortCut: Shift-T
confirm: true
@@ -19,7 +19,7 @@ plugin:
flux
$verb helmrelease
--context $CONTEXT
- -n $NAMESPACE $NAME
+ -n $NAMESPACE $NAME
| less -K
toggle-kustomization:
shortCut: Shift-T
@@ -34,10 +34,10 @@ plugin:
- >-
suspended=$(kubectl --context $CONTEXT get kustomizations -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1);
verb=$([ $suspended = "true" ] && echo "resume" || echo "suspend");
- flux
- $verb kustomization
- --context $CONTEXT
- -n $NAMESPACE $NAME
+ flux
+ $verb kustomization
+ --context $CONTEXT
+ -n $NAMESPACE $NAME
| less -K
reconcile-git:
shortCut: Shift-R
@@ -53,7 +53,7 @@ plugin:
flux
reconcile source git
--context $CONTEXT
- -n $NAMESPACE $NAME
+ -n $NAMESPACE $NAME
| less -K
reconcile-hr:
shortCut: Shift-R
@@ -66,10 +66,10 @@ plugin:
args:
- -c
- >-
- flux
- reconcile helmrelease
- --context $CONTEXT
- -n $NAMESPACE $NAME
+ flux
+ reconcile helmrelease
+ --context $CONTEXT
+ -n $NAMESPACE $NAME
| less -K
reconcile-helm-repo:
shortCut: Shift-Z
@@ -82,10 +82,10 @@ plugin:
args:
- -c
- >-
- flux
- reconcile source helm
- --context $CONTEXT
- -n $NAMESPACE $NAME
+ flux
+ reconcile source helm
+ --context $CONTEXT
+ -n $NAMESPACE $NAME
| less -K
reconcile-oci-repo:
shortCut: Shift-Z
@@ -98,10 +98,10 @@ plugin:
args:
- -c
- >-
- flux
- reconcile source oci
- --context $CONTEXT
- -n $NAMESPACE $NAME
+ flux
+ reconcile source oci
+ --context $CONTEXT
+ -n $NAMESPACE $NAME
| less -K
reconcile-ks:
shortCut: Shift-R
@@ -133,7 +133,7 @@ plugin:
flux
reconcile image repository
--context $CONTEXT
- -n $NAMESPACE $NAME
+ -n $NAMESPACE $NAME
| less -K
reconcile-iua:
shortCut: Shift-R
@@ -146,10 +146,10 @@ plugin:
args:
- -c
- >-
- flux
- reconcile image update
+ flux
+ reconcile image update
--context $CONTEXT
- -n $NAMESPACE $NAME
+ -n $NAMESPACE $NAME
| less -K
trace:
shortCut: Shift-A
@@ -163,12 +163,12 @@ plugin:
- -c
- >-
resource=$(echo $RESOURCE_NAME | sed -E 's/ies$/y/' | sed -E 's/ses$/se/' | sed -E 's/(s|es)$//g')
- flux
- trace
- --context $CONTEXT
- --kind $resource
- --api-version $RESOURCE_GROUP/$RESOURCE_VERSION
- --namespace $NAMESPACE $NAME
+ flux
+ trace
+ --context $CONTEXT
+ --kind $resource
+ --api-version $RESOURCE_GROUP/$RESOURCE_VERSION
+ --namespace $NAMESPACE $NAME
| less -K
# credits: https://github.com/fluxcd/flux2/discussions/2494
get-suspended-helmreleases:
@@ -182,10 +182,10 @@ plugin:
args:
- -c
- >-
- kubectl get
- --all-namespaces
- helmreleases.helm.toolkit.fluxcd.io -o json
- | jq -r '.items[] | select(.spec.suspend==true) | [.metadata.namespace,.metadata.name,.spec.suspend] | @tsv'
+ kubectl get
+ --all-namespaces
+ helmreleases.helm.toolkit.fluxcd.io -o json
+ | jq -r '.items[] | select(.spec.suspend==true) | [.metadata.namespace,.metadata.name,.spec.suspend] | @tsv'
| less
get-suspended-kustomizations:
shortCut: Shift-S
@@ -198,7 +198,7 @@ plugin:
args:
- -c
- >-
- kubectl get
+ kubectl get
--all-namespaces
kustomizations.kustomize.toolkit.fluxcd.io -o json
| jq -r '.items[] | select(.spec.suspend==true) | [.metadata.name,.spec.suspend] | @tsv'
diff --git a/plugins/get-all.yaml b/plugins/get-all.yaml
index d872dd0d..58f65d71 100644
--- a/plugins/get-all.yaml
+++ b/plugins/get-all.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
#get all resources in a namespace using the krew get-all plugin
get-all-namespace:
shortCut: g
diff --git a/plugins/helm-default-values.yaml b/plugins/helm-default-values.yaml
index ce587347..253d03d6 100644
--- a/plugins/helm-default-values.yaml
+++ b/plugins/helm-default-values.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
helm-default-values:
shortCut: Shift-V
confirm: false
diff --git a/plugins/helm-purge.yaml b/plugins/helm-purge.yaml
index eb106c07..300053a7 100644
--- a/plugins/helm-purge.yaml
+++ b/plugins/helm-purge.yaml
@@ -1,5 +1,5 @@
# $HOME/.k9s/plugin.yml
-plugin:
+plugins:
# Issues a helm delete --purge for the resource associated with the selected pod
helm-purge:
shortCut: Ctrl-P
diff --git a/plugins/helm_values.yaml b/plugins/helm_values.yaml
index 8efc0d0f..97e70cf8 100644
--- a/plugins/helm_values.yaml
+++ b/plugins/helm_values.yaml
@@ -1,6 +1,6 @@
# View user-supplied values when the helm chart was created
-plugin:
+plugins:
helm-values:
shortCut: v
confirm: false
diff --git a/plugins/job_suspend.yaml b/plugins/job_suspend.yaml
index d674dd2d..abee83bc 100644
--- a/plugins/job_suspend.yaml
+++ b/plugins/job_suspend.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# Suspends/Resumes a cronjob
toggleCronjob:
shortCut: Ctrl-S
diff --git a/plugins/k3d_root_shell.yaml b/plugins/k3d_root_shell.yaml
index 295c6808..79707b4b 100644
--- a/plugins/k3d_root_shell.yaml
+++ b/plugins/k3d_root_shell.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# Opens a shell to k3d container as root
k3d-root-shell:
shortCut: Shift-S
diff --git a/plugins/log_full.yaml b/plugins/log_full.yaml
index 304a86d3..452c1dbc 100644
--- a/plugins/log_full.yaml
+++ b/plugins/log_full.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# See https://k9scli.io/topics/plugins/
raw-logs-follow:
shortCut: Ctrl-L
diff --git a/plugins/log_jq.yaml b/plugins/log_jq.yaml
index f4c40e02..331427b9 100644
--- a/plugins/log_jq.yaml
+++ b/plugins/log_jq.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# Sends logs over to jq for processing. This leverages kubectl plugin kubectl-jq.
jqlogs:
shortCut: Ctrl-J
diff --git a/plugins/log_stern.yaml b/plugins/log_stern.yaml
index 9f7b9ed0..1e850b38 100644
--- a/plugins/log_stern.yaml
+++ b/plugins/log_stern.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# Leverage stern (https://github.com/stern/stern) to output logs.
stern:
shortCut: Ctrl-L
diff --git a/plugins/rm-ns.yaml b/plugins/rm-ns.yaml
index 14a2a251..88509dc9 100644
--- a/plugins/rm-ns.yaml
+++ b/plugins/rm-ns.yaml
@@ -1,4 +1,4 @@
-plugin:
+plugins:
# remove finalizers from a stuck namespace
rm-ns:
shortCut: n
diff --git a/plugins/watch_events.yaml b/plugins/watch_events.yaml
index ffd8b2fc..db96c6eb 100644
--- a/plugins/watch_events.yaml
+++ b/plugins/watch_events.yaml
@@ -2,7 +2,7 @@
# requires linux "watch" command
# change '-n' to adjust refresh time in seconds
-plugin:
+plugins:
watch-events:
shortCut: Shift-E
confirm: false
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index f6da3461..b56bd219 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -31,7 +31,7 @@ apps:
parts:
build:
- plugin: go
+ plugins: go
source: https://github.com/derailed/k9s.git
source-tag: $SNAPCRAFT_PROJECT_VERSION
override-build: |