19 lines
447 B
Bash
Executable File
19 lines
447 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export NAMESPACE=$(cat namespace)
|
|
|
|
kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl -f - apply
|
|
|
|
kubectl apply -f ./database/main.yml -n $NAMESPACE
|
|
while true; do
|
|
kubectl get -n $NAMESPACE pod database-0 && break
|
|
echo "pod not yet available"
|
|
sleep 5
|
|
done
|
|
echo "waiting for database to get ready"
|
|
kubectl wait --for=condition=ready -n $NAMESPACE --timeout=600s pod database-0
|
|
|
|
./database/setup-database.sh
|
|
|
|
|