c4k-nextcloud/main/resources/cloud/configure-as-user.sh

22 lines
799 B
Bash

#!/bin/bash
kubectl delete --ignore-not-found=true -f cloud-ingress.yml
kubectl delete --ignore-not-found=true -f cloud-pod.yml
kubectl delete --ignore-not-found=true -f cloud-pvc.yml
kubectl delete --ignore-not-found=true -f cloud-service.yml
kubectl delete --ignore-not-found=true -f cloud-secret.yml
kubectl delete --ignore-not-found=true -f cloud-persistent-volume.yml
#Wait for postgres to be running
while [$POSTGRES = ""]
do
POSTGRES=$(kubectl get pods --selector=app=postgresql -o jsonpath='{.items[*].metadata.name}')
done
kubectl wait --for=condition=ready pod/$POSTGRES
kubectl apply -f cloud-persistent-volume.yml
kubectl apply -f cloud-secret.yml
kubectl apply -f cloud-service.yml
kubectl apply -f cloud-pvc.yml
kubectl apply -f cloud-pod.yml
kubectl apply -f cloud-ingress.yml