Files
oc-deploy/k8s/start.sh

22 lines
622 B
Bash
Raw Normal View History

2025-03-27 13:21:52 +01:00
#!/bin/bash
2026-02-06 10:27:42 +01:00
mode=${1:-all}
2025-03-27 13:21:52 +01:00
branch=${2:-main}
2026-01-12 13:35:25 +01:00
clustername=${3:-opencloud}
2026-01-27 16:04:45 +01:00
path=${4:-.}
2025-03-27 13:21:52 +01:00
2026-02-06 10:27:42 +01:00
echo "Create values for $clustername"
2025-03-27 13:21:52 +01:00
2026-01-27 16:04:45 +01:00
if [ -f "./conf/$clustername.conf" ]; then
2026-02-06 10:27:42 +01:00
oc-k8s create values -n $clustername -r $clustername -f $path -c "./conf/$clustername.conf"
2026-01-27 16:04:45 +01:00
else
2026-02-06 10:27:42 +01:00
oc-k8s create values -n $clustername -r $clustername -f $path
2026-01-27 16:04:45 +01:00
fi
2026-02-06 10:27:42 +01:00
echo "Start $clustername"
oc-k8s start -f $path -r $clustername -n $clustername -t $mode -b $branch
#if [ -d "./datas/$clustername" ]; then
# echo "Import datas for $clustername"
# oc-k8s upgrade db -d opencloud -r $clustername -n $clustername -f ./datas/$clustername
#fi