-
Notifications
You must be signed in to change notification settings - Fork 4
/
helm-update.sh
executable file
·78 lines (72 loc) · 1.71 KB
/
helm-update.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# ./helm-update.sh index
# create new index for the chart
# ./helm-update.sh template
# process the chart to a template
# ./helm-update.sh delete
# delete the chart from kubernetes
# ./helm-update.sh install
# install the chart into kubernetes
# ./helm-update.sh install-tgz
# install the chart from one of the tgz files present locally into kubernetes
case $1 in
index)
pushd charts
helm package dbaas-operator
helm repo index .
popd
;;
index-psql)
pushd charts
helm package postgresqlprovider
helm repo index .
popd
;;
index-msql)
pushd charts
helm package mariadbprovider
helm repo index .
popd
;;
index-mongo)
pushd charts
helm package mongodbprovider
helm repo index .
popd
;;
template)
helm template charts/dbaas-operator -f charts/dbaas-operator/values.yaml
;;
delete)
helm delete -n dbaas-operator dbaas-operator
;;
install)
helm repo add dbaas-operator https://raw.githubusercontent.com/amazeeio/dbaas-operator/master/charts
helm upgrade --install -n dbaas-operator dbaas-operator dbaas-operator/dbaas-operator
;;
install-tgz)
options=($(ls charts | grep tgz))
if [ ${#options[@]} -ne 0 ]; then
select chart in "${options[@]}";
do
case $chart in
"$QUIT")
echo "Unknown option, exiting."
break
;;
*)
break
;;
esac
done
if [ "$chart" != "" ]; then
helm upgrade --install -n dbaas-operator dbaas-operator charts/$chart
fi
else
echo "No chart files, exiting."
fi
;;
*)
echo "nothing"
;;
esac