From 2c08721a7c1e86ac32ba10141b68bc4717a8b512 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Sat, 28 Mar 2026 14:58:04 +0800 Subject: [PATCH] fix: set PD_MONGO_URI explicitly for in-cluster mongo When mongo.in_cluster is true, PD_MONGO_URI was not set in the configmap, causing the Go app to fall back to localhost:27017 which doesn't work inside the cluster. Now uses the FQDN mongo..svc.cluster.local with the replicaSet parameter. Co-Authored-By: Claude Opus 4.6 (1M context) --- helm-chart/templates/paperdebugger.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helm-chart/templates/paperdebugger.yaml b/helm-chart/templates/paperdebugger.yaml index f398a666..b7b4649d 100644 --- a/helm-chart/templates/paperdebugger.yaml +++ b/helm-chart/templates/paperdebugger.yaml @@ -76,6 +76,8 @@ data: INFERENCE_BASE_URL: "{{ .Values.inference_base_url }}" INFERENCE_API_KEY: "{{ .Values.inference_api_key }}" JWT_SIGNING_KEY: "{{ .Values.jwt_signing_key }}" - {{ if not .Values.mongo.in_cluster }} + {{- if .Values.mongo.in_cluster }} + PD_MONGO_URI: "mongodb://mongo.{{ .Values.namespace }}.svc.cluster.local:27017/?replicaSet=in-cluster" + {{- else }} PD_MONGO_URI: "{{ .Values.mongo.uri }}" - {{ end }} \ No newline at end of file + {{- end }} \ No newline at end of file