Skip to content

Commit

Permalink
feat: add helm diff plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesky6529 committed Dec 7, 2024
1 parent 9b0ffb8 commit 100c07e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions plugins/helm-diff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Requires helm-diff plugin installed: https://github.com/databus23/helm-diff
# In helm view: <Shift-D> Diff Helm Release Previous Revision
# In helm-history view: <Shift-Q> Diff with Current Revision
plugins:
helm-diff-previous:
shortCut: Shift-D
confirm: false
description: Diff Helm Release 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

0 comments on commit 100c07e

Please sign in to comment.