Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[OOM] Update Linux SSL Truststore /etc/ssl"
[oom.git]
/
kubernetes
/
helm
/
plugins
/
undeploy
/
undeploy.sh
diff --git
a/kubernetes/helm/plugins/undeploy/undeploy.sh
b/kubernetes/helm/plugins/undeploy/undeploy.sh
index
02b5d34
..
72c6424
100755
(executable)
--- a/
kubernetes/helm/plugins/undeploy/undeploy.sh
+++ b/
kubernetes/helm/plugins/undeploy/undeploy.sh
@@
-2,7
+2,7
@@
usage() {
cat << EOF
usage() {
cat << EOF
-Delete an umbrella Helm Chart, and its subcharts, that was previously deployed using 'Helm deploy'.
+Delete an umbrella Helm Chart, and its subcharts, that was previously deployed using 'Helm deploy'.
Example of deleting all Releases that have the prefix 'demo'.
$ helm undeploy demo
Example of deleting all Releases that have the prefix 'demo'.
$ helm undeploy demo
@@
-21,15
+21,15
@@
undeploy() {
RELEASE=$1
FLAGS=$2
RELEASE=$1
FLAGS=$2
- array=($(helm ls -q | grep $RELEASE))
+ array=($(helm ls -q
--all
| grep $RELEASE))
n=${#array[*]}
n=${#array[*]}
- for
(( i = n-1; i >= 0; i-- )
)
+ for
i in $(seq $(($n-1)) -1 0
)
do
helm del "${array[i]}" $FLAGS
done
}
do
helm del "${array[i]}" $FLAGS
done
}
-if [
[ $# < 1 ]
]; then
+if [
$# < 1
]; then
echo "Error: command 'undeploy' requires a release name"
exit 0
fi
echo "Error: command 'undeploy' requires a release name"
exit 0
fi
@@
-45,8
+45,8
@@
case "${1:-"help"}" in
usage
;;
*)
usage
;;
*)
- undeploy $1 $
{@:2}
+ undeploy $1 $
(echo ${@} | sed 's/^ *[^ ]* *//')
;;
esac
;;
esac
-exit 0
\ No newline at end of file
+exit 0