From 16aaaa7f458714cf02f9a7b2dbdd9150ff60907c Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Wed, 15 Apr 2026 22:23:46 +0530 Subject: [PATCH] fix(rust): redis auth + users startup probe --- .../base/payments-deployment.yaml | 10 ++++------ apps/nxtgauge-backend-rust/base/secret.yaml | 3 ++- apps/nxtgauge-backend-rust/base/users-deployment.yaml | 11 +++++++++++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/apps/nxtgauge-backend-rust/base/payments-deployment.yaml b/apps/nxtgauge-backend-rust/base/payments-deployment.yaml index 69ac814..0d09167 100644 --- a/apps/nxtgauge-backend-rust/base/payments-deployment.yaml +++ b/apps/nxtgauge-backend-rust/base/payments-deployment.yaml @@ -27,18 +27,16 @@ spec: - secretRef: name: nxtgauge-backend-rust-secrets readinessProbe: - httpGet: - path: /health + tcpSocket: port: 9116 initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 3 - failureThreshold: 3 + failureThreshold: 6 livenessProbe: - httpGet: - path: /health + tcpSocket: port: 9116 - initialDelaySeconds: 20 + initialDelaySeconds: 30 periodSeconds: 20 timeoutSeconds: 3 failureThreshold: 5 diff --git a/apps/nxtgauge-backend-rust/base/secret.yaml b/apps/nxtgauge-backend-rust/base/secret.yaml index 9f64bb7..0edf6f5 100644 --- a/apps/nxtgauge-backend-rust/base/secret.yaml +++ b/apps/nxtgauge-backend-rust/base/secret.yaml @@ -7,7 +7,8 @@ type: Opaque stringData: DATABASE_URL: "postgresql://postgres:chandan2026%401@pg-postgresql.data.svc.cluster.local:5432/nxtgauge" JWT_SECRET: "bPU0RQ/N7JW8CDCioe6AFBw/lBLTm++pGtta20pcsTX36p3OyheplgUyiD66OCuV" - REDIS_URL: "redis://redis-master.data.svc.cluster.local:6379" + # Password contains '@', so it must be URL-encoded as %40. + REDIS_URL: "redis://:chandan2026%401@redis-master.data.svc.cluster.local:6379" SMTP_HOST: "smtp.zeptomail.in" SMTP_PORT: "587" SMTP_USER: "emailapikey" diff --git a/apps/nxtgauge-backend-rust/base/users-deployment.yaml b/apps/nxtgauge-backend-rust/base/users-deployment.yaml index 49f710e..7e44e32 100644 --- a/apps/nxtgauge-backend-rust/base/users-deployment.yaml +++ b/apps/nxtgauge-backend-rust/base/users-deployment.yaml @@ -21,11 +21,22 @@ spec: ports: - containerPort: 9101 name: http + env: + # The image currently defaults to a different port (it exposes 8000/tcp). + # Force the service to bind to the port our Service/ConfigMap expects. + - name: PORT + value: "9101" envFrom: - configMapRef: name: nxtgauge-backend-rust-config - secretRef: name: nxtgauge-backend-rust-secrets + startupProbe: + tcpSocket: + port: 9101 + periodSeconds: 5 + timeoutSeconds: 1 + failureThreshold: 120 readinessProbe: httpGet: path: /health