Skip to content

Commit 8807dc0

Browse files
jadolgderailed
andauthored
Add plugin to temporarily scale down/up all deployments, statefulsets, and daemonsets in a namespace using szero (#3259)
* Add plugin to temporarily scale down/up all deployments, statefulsets, and daemonsets in a namespace using szero * Add szero to documentation readme --------- Co-authored-by: Fernand Galiana <[email protected]>
1 parent 9f37a64 commit 8807dc0

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

plugins/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ K9s plugins extend the tool to provide additional functionality via actions to f
55
Following is an example of some plugin files in this directory. Other files are not listed in this table.
66

77
| Plugin-Name | Description | Available on Views | Shortcut | Kubectl plugin, external dependencies |
8-
| ------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------- |-----------| ------------------------------------------------------------------------------------- |
8+
|--------------------------------| ---------------------------------------------------------------------------- |-------------------------------------|-----------|---------------------------------------------------------------------------------------|
99
| 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) |
1010
| argocd.yaml | Perform argocd operation quickly | applications | Shift-r | [ArgoCD](https://argo-cd.readthedocs.io/en/stable/getting_started/) |
1111
| debug-container.yaml | Add [ephemeral debug container](1)<br>([nicolaka/netshoot](2)) | containers | Shift-d | |
@@ -18,9 +18,10 @@ Following is an example of some plugin files in this directory. Other files are
1818
| keda-toggle.yaml | Enable/disable [keda](3) ScaledObject autoscaler | scaledobjects | Ctrl-N | |
1919
| log-stern.yaml | View resource logs using stern | pods | Ctrl-l | |
2020
| log-jq.yaml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq |
21-
| log-bunyan.yaml | View pods, service, deployment logs using bunyan | pods, service, deployment | Ctrl-l | [Bunyan](https://www.npmjs.com/package/bunyan) |
21+
| log-bunyan.yaml | View pods, service, deployment logs using bunyan | pods, service, deployment | Ctrl-l | [Bunyan](https://www.npmjs.com/package/bunyan) |
2222
| log-full.yaml | get full logs from pod/container | pods/containers | Ctrl-l | |
2323
| resource-recommendations.yaml | View recommendations for CPU/Memory requests based on historical data | deployments/daemonsets/statefulsets | Shift-k | [Robusta KRR](https://github.com/robusta-dev/krr) |
24+
| szero.yaml | Temporarily scale down/up all deployments, statefulsets, and daemonsets | namespaces | Shift-d/u | [szero](https://github.com/jadolg/szero) |
2425
| trace-dns.yaml | Trace DNS resolution using Inspektor Gadget (4) | containers/pods/nodes | Shift-d | |
2526
| vector-dev-top.yaml | Run `vector top` in vector.dev container | pods/container | h | [vector top](https://vector.dev/highlights/2020-12-23-vector-top/) |
2627

plugins/szero.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Temporarily scale down/up all deployments, statefulsets, and daemonsets in a namespace using szero
2+
# Uses https://github.com/jadolg/szero
3+
4+
plugins:
5+
szero-down:
6+
shortCut: Shift-D
7+
confirm: true
8+
dangerous: true
9+
description: Scale all down
10+
scopes:
11+
- namespace
12+
command: sh
13+
background: false
14+
args:
15+
- -c
16+
- "szero down --context $CONTEXT --namespace $NAME"
17+
szero-up:
18+
shortCut: Shift-U
19+
confirm: true
20+
dangerous: true
21+
description: Scale all up
22+
scopes:
23+
- namespace
24+
command: sh
25+
background: false
26+
args:
27+
- -c
28+
- "szero up --context $CONTEXT --namespace $NAME"

0 commit comments

Comments
 (0)