32 lines
1.2 KiB
Bash
Executable File
32 lines
1.2 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)
|
|
kubectl apply --server-side --dry-run=server -k "${script_dir}"
|
|
kubectl apply --server-side -k "${script_dir}"
|
|
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
|