From b9ff1f043de6af03564aafae874178be69e33598 Mon Sep 17 00:00:00 2001 From: zetaloop Date: Wed, 6 May 2026 04:49:37 +0800 Subject: [PATCH] fix(k01): correct redis wait condition and serialize ratelimit on rl-redis --- deploy/k01/apply-infra.sh | 3 ++- deploy/k01/infra/ratelimit.yaml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy/k01/apply-infra.sh b/deploy/k01/apply-infra.sh index 1b71551..333d841 100755 --- a/deploy/k01/apply-infra.sh +++ b/deploy/k01/apply-infra.sh @@ -35,7 +35,8 @@ kubectl -n juwan wait --for=condition=Ready pod -l app=envoy-gateway --timeout=1 kubectl -n juwan wait --for=condition=Ready pod -l "app in (ratelimit,rl-redis)" --timeout=120s || true echo redis -apply_docs "${INFRA_DIR}/redis.yaml" redisreplication "jsonpath={.status.readyReplicas}=1" +apply_docs "${INFRA_DIR}/redis.yaml" "" "" +kubectl -n juwan wait --for=condition=Ready pod -l redis_setup_type=replication --timeout=600s || true echo postgres apply_docs "${INFRA_DIR}/postgres.yaml" cluster.postgresql.cnpg.io "condition=Ready" diff --git a/deploy/k01/infra/ratelimit.yaml b/deploy/k01/infra/ratelimit.yaml index 027a4df..dbaea28 100644 --- a/deploy/k01/infra/ratelimit.yaml +++ b/deploy/k01/infra/ratelimit.yaml @@ -97,6 +97,10 @@ spec: labels: app: ratelimit spec: + initContainers: + - name: wait-rl-redis + image: busybox:1.37 + command: ["sh", "-c", "until nc -z rl-redis-svc 6379; do sleep 1; done"] containers: - name: ratelimit image: envoyproxy/ratelimit:fe26676d