diff --git a/plugins/README.md b/plugins/README.md index 4511d974a9..2151fc54ab 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -6,18 +6,19 @@ Following is an example of some of plugin files in this directory. Other files a | 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 | | -| trace-dns | Trace DNS resolution using Inspektor Gadget (4) | containers/pods/nodes | Shift-d | | +| debug-container.yaml | Add [ephemeral debug container](1)
([nicolaka/netshoot](2)) | containers | Shift-d | | +| dive.yaml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) | +| get-all.yaml | get all resources in a namespace | all | g | [Krew](https://krew.sigs.k8s.io/), [ketall](https://github.com/corneliusweig/ketall/) | +| helm-diff.yaml | Diff with previous revision / current revision | helm/history | Shift-D/Q | [helm-diff](https://github.com/databus23/helm-diff) | +| job_suspend.yaml | Suspends a running cronjob | cronjobs | Ctrl-s | | +| k3d_root_shell.yaml | Root shell to k3d container | containers | Shift-s | [jq](https://stedolan.github.io/jq/) | +| keda-toggle.yaml | Enable/disable [keda](3) ScaledObject autoscaler | scaledobjects | Ctrl-N | | +| log_stern.yaml | View resource logs using stern | pods | Ctrl-l | | +| log_jq.yaml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq | +| log_full.yaml | get full logs from pod/container | pods/containers | Ctrl-l | | +| 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) | +| trace-dns.yaml | Trace DNS resolution using Inspektor Gadget (4) | containers/pods/nodes | Shift-d | | [1]: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container [2]: https://github.com/nicolaka/netshoot diff --git a/plugins/helm-diff.yaml b/plugins/helm-diff.yaml new file mode 100644 index 0000000000..2aaaf48010 --- /dev/null +++ b/plugins/helm-diff.yaml @@ -0,0 +1,31 @@ +# Requires helm-diff plugin installed: https://github.com/databus23/helm-diff +# In helm view: Diff with Previous Revision +# In helm-history view: Diff with Current Revision +plugins: + helm-diff-previous: + shortCut: Shift-D + confirm: false + description: Diff with Previous Revision + scopes: + - helm + command: bash + background: false + args: + - -c + - >- + LAST_REVISION=$(($COL-REVISION-1)); + helm diff revision $COL-NAME $COL-REVISION $LAST_REVISION --kube-context $CONTEXT --namespace $NAMESPACE --color | less -RK + helm-diff-current: + shortCut: Shift-Q + confirm: false + description: Diff with Current Revision + scopes: + - history + command: bash + background: false + args: + - -c + - >- + RELEASE_NAME=$(echo $NAME | cut -d':' -f1); + LATEST_REVISION=$(helm history -n $NAMESPACE --kube-context $CONTEXT $RELEASE_NAME | grep deployed | cut -d$'\t' -f1 | tr -d ' \t'); + helm diff revision $RELEASE_NAME $LATEST_REVISION $COL-REVISION --kube-context $CONTEXT --namespace $NAMESPACE --color | less -RK \ No newline at end of file