refactor(k01): flatten directory layout and split deployment into five scripts
build-and-push-harbor / docker-build-push (push) Waiting to run
build-and-push-harbor / docker-build-push (push) Waiting to run
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user