-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.sh
executable file
·49 lines (35 loc) · 1.34 KB
/
script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
case $1 in
"-h" )
echo "
Usage:
1) upgrade-interactive bind {repository}/{chart}
Helm2 does not return repository for the installed chart. In some cases tool can find same chart name in multiple repos - this chard is marked as deprecated. In such case we can manually bind chart to selected repository.
Example:
helm upgrade-interactive bind jetstack/cert-manager
In this case 'helm search cert-manager' tells that chart is situated in 'jetstack/cert-manager' and 'stable/cert-manager'. Now versions will be always checked against 'jetstack' repository only.
2) upgrade-interactive ...
We can pass usual flags we pass to 'helm upgrade'
Example:
helm upgrade-interactive --force --recreate-pods --atomic
"
;;
"bind" )
$HELM_PLUGIN_DIR/bin/parser -bind $2
;;
*)
input=$(mktemp /tmp/helm-upgrade-interactive.XXXXXX)
output=$(mktemp /tmp/helm-upgrade-interactive.XXXXXX)
$HELM_BIN repo update
$HELM_BIN list --output json > $input
$HELM_PLUGIN_DIR/bin/parser -input $input -output $output
while IFS=" " read -r release chart version
do
cmd="$HELM_BIN upgrade $release $chart --version $version --reuse-values $*"
echo ">>> $cmd"
$cmd
done < $output
rm -f $input
rm -f $output
;;
esac