From e534e93526879f08fb912ca8c2f7eef9215b0dc3 Mon Sep 17 00:00:00 2001 From: hhhhsc <1710496817@qq.com> Date: Thu, 15 Jan 2026 14:07:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20pg=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/helm/datamate/values.yaml | 20 ++++++++++++------- .../datamate/sql_manager/sql_manager.py | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/deployment/helm/datamate/values.yaml b/deployment/helm/datamate/values.yaml index 55bb1b27..0a5eb723 100644 --- a/deployment/helm/datamate/values.yaml +++ b/deployment/helm/datamate/values.yaml @@ -150,10 +150,16 @@ frontend: nodePort: 30000 volumes: - *logVolume + - name: cert-volume + configMap: + name: cube-security-cert-cert + optional: true volumeMounts: - name: log-volume mountPath: /var/log/datamate/frontend subPath: frontend + - name: cert-volume + mountPath: /etc/ runtime: enabled: false @@ -163,18 +169,18 @@ runtime: - --port - "8081" env: &runtimeEnv - - name: MYSQL_HOST + - name: PG_HOST value: "datamate-database" - - name: MYSQL_PORT - value: "3306" - - name: MYSQL_USER - value: "root" - - name: MYSQL_PASSWORD + - name: PG_PORT + value: "5432" + - name: PG_USER + value: "postgres" + - name: PG_PASSWORD valueFrom: secretKeyRef: name: datamate-conf key: DB_PASSWORD - - name: MYSQL_DATABASE + - name: PG_DATABASE value: "datamate" volumes: - *datasetVolume diff --git a/runtime/python-executor/datamate/sql_manager/sql_manager.py b/runtime/python-executor/datamate/sql_manager/sql_manager.py index 14deae64..087264e5 100644 --- a/runtime/python-executor/datamate/sql_manager/sql_manager.py +++ b/runtime/python-executor/datamate/sql_manager/sql_manager.py @@ -23,7 +23,7 @@ def create_connect(max_retries=5, base_delay=1): drivername="postgresql+psycopg2", # 核心修改:使用 pg 驱动 username=os.getenv("PG_USER", "postgres"), # 建议修改环境变量名 password=os.getenv("PG_PASSWORD", "password"), - host=os.getenv("PG_HOST", "postgres"), + host=os.getenv("PG_HOST", "datamate-database"), port=int(os.getenv("PG_PORT", 5432)), # 修改默认端口为 5432 database=os.getenv("PG_DATABASE", "datamate"), ) From 3578c0d2c9e5a2f9e0bda9042005ed76135c84e5 Mon Sep 17 00:00:00 2001 From: hhhhsc <1710496817@qq.com> Date: Thu, 15 Jan 2026 14:08:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20pg=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/helm/datamate/values.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/deployment/helm/datamate/values.yaml b/deployment/helm/datamate/values.yaml index 0a5eb723..921ae3ad 100644 --- a/deployment/helm/datamate/values.yaml +++ b/deployment/helm/datamate/values.yaml @@ -150,16 +150,10 @@ frontend: nodePort: 30000 volumes: - *logVolume - - name: cert-volume - configMap: - name: cube-security-cert-cert - optional: true volumeMounts: - name: log-volume mountPath: /var/log/datamate/frontend subPath: frontend - - name: cert-volume - mountPath: /etc/ runtime: enabled: false