97 lines
3.0 KiB
Bash
Executable File
97 lines
3.0 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
expected_context=kubernetes-admin@kubernetes
|
|
current_context=$(kubectl config current-context)
|
|
if [ "${current_context}" != "${expected_context}" ]; then
|
|
echo "Refusing to bootstrap through unexpected context: ${current_context}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
repository_dir=$(dirname -- "${script_dir}")
|
|
root_application="${repository_dir}/root-application.yaml"
|
|
kubectl apply --dry-run=server --filename "${root_application}"
|
|
kubectl apply --filename "${root_application}"
|
|
kubectl --namespace argocd wait application/homelab-bootstrap \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/homelab-bootstrap \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/immich-sync \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/immich-sync \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/sealed-secrets \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/sealed-secrets \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/immichframe \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/immichframe \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/metallb \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/metallb \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait application/argocd \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=10m
|
|
kubectl --namespace argocd wait application/argocd \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=10m
|
|
for application in \
|
|
brgkepler-com \
|
|
gschissenes-equipment \
|
|
immich-crack \
|
|
pfostendynamics-com \
|
|
watschn-studio
|
|
do
|
|
kubectl --namespace argocd wait "application/${application}" \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=5m
|
|
kubectl --namespace argocd wait "application/${application}" \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=5m
|
|
done
|
|
for application in \
|
|
cadcraft \
|
|
deckcraft \
|
|
designcraft \
|
|
effectcraft \
|
|
figcraft \
|
|
filmcraft \
|
|
gridcraft \
|
|
lightcraft \
|
|
pdfcraft \
|
|
photocraft \
|
|
soundcraft \
|
|
vectorcraft \
|
|
wordcraft \
|
|
brunner-ninja \
|
|
coturn \
|
|
flaresolverr \
|
|
mosquitto \
|
|
ombi \
|
|
tautulli \
|
|
uptime-kuma \
|
|
visual-studio-code \
|
|
wiki-js
|
|
do
|
|
kubectl --namespace argocd wait "application/${application}" \
|
|
--for=jsonpath='{.status.sync.status}'=Synced \
|
|
--timeout=15m
|
|
kubectl --namespace argocd wait "application/${application}" \
|
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
|
--timeout=15m
|
|
done
|