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
+29
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
INFRA_DIR="$(cd "$(dirname "$0")/infra" && pwd)"
|
||||
export KUBECONFIG="${KUBECONFIG:-/etc/rancher/k3s/k3s.yaml}"
|
||||
|
||||
echo envoy + ratelimit
|
||||
kubectl apply -f "${INFRA_DIR}/envoy.yaml"
|
||||
kubectl apply -f "${INFRA_DIR}/ratelimit.yaml"
|
||||
kubectl -n juwan wait --for=condition=Ready pod -l app=envoy-gateway --timeout=120s || true
|
||||
kubectl -n juwan wait --for=condition=Ready pod -l "app in (ratelimit,rl-redis)" --timeout=120s || true
|
||||
|
||||
echo redis
|
||||
kubectl apply -f "${INFRA_DIR}/redis.yaml"
|
||||
kubectl -n juwan wait --for=jsonpath='{.status.readyReplicas}'=1 redisreplication --all --timeout=600s || true
|
||||
|
||||
echo postgres
|
||||
kubectl apply -f "${INFRA_DIR}/postgres.yaml"
|
||||
kubectl -n juwan wait --for=condition=Ready cluster --all --timeout=900s || true
|
||||
|
||||
echo mongo
|
||||
kubectl apply -f "${INFRA_DIR}/mongo.yaml"
|
||||
kubectl -n juwan wait --for=jsonpath='{.status.phase}'=Running mongodbcommunity/chat-mongodb --timeout=600s || true
|
||||
|
||||
echo kafka
|
||||
kubectl apply -f "${INFRA_DIR}/kafka.yaml"
|
||||
kubectl -n kafka wait --for=condition=Ready kafka/juwan-kafka --timeout=900s || true
|
||||
|
||||
kubectl get pods -A
|
||||
Reference in New Issue
Block a user