Files
juwan-backend/deploy/k01/apply-services.sh
T
zetaloop c575b53843
build-and-push-harbor / docker-build-push (push) Waiting to run
refactor(k01): flatten directory layout and split deployment into five scripts
2026-05-06 02:37:25 +08:00

31 lines
668 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SVC_DIR="$(cd "$(dirname "$0")/services" && pwd)"
export KUBECONFIG="${KUBECONFIG:-/etc/rancher/k3s/k3s.yaml}"
apply_wait() {
for f in "$@"; do
echo "${f%.yaml}"
kubectl apply -f "${SVC_DIR}/${f}"
done
kubectl -n juwan wait --for=condition=Available deploy --all --timeout=600s || true
}
cd "$SVC_DIR"
apply_wait snowflake.yaml authz-adapter.yaml
domain_files=()
for f in *.yaml; do
case "$f" in
snowflake.yaml|authz-adapter.yaml|chat.yaml|email.yaml|frontend.yaml) ;;
*) domain_files+=("$f") ;;
esac
done
apply_wait "${domain_files[@]}"
apply_wait chat.yaml email.yaml frontend.yaml
kubectl get pods -n juwan