From 337bb49a0d0f5733d9e417acafd41e0b83ce9f5e Mon Sep 17 00:00:00 2001 From: Heiru Wu Date: Fri, 30 Aug 2024 03:59:55 +0800 Subject: [PATCH] chore(helm): remove unnecessary model configs and add extrEnv --- .../core/templates/model-backend/configmap.yaml | 2 -- .../core/templates/model-backend/deployment.yaml | 16 ++++++++++++++-- charts/core/values.yaml | 1 - 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/charts/core/templates/model-backend/configmap.yaml b/charts/core/templates/model-backend/configmap.yaml index e1d6f151..902d1a25 100644 --- a/charts/core/templates/model-backend/configmap.yaml +++ b/charts/core/templates/model-backend/configmap.yaml @@ -68,8 +68,6 @@ data: {{- end }} name: model version: {{ .Values.modelBackend.dbVersion }} - cloudversion: {{ .Values.modelBackend.dbCloudVersion }} - cloudmigrationtable: cloud_schema_migrations timezone: Etc/UTC pool: idleconnections: {{ .Values.database.maxIdleConns }} diff --git a/charts/core/templates/model-backend/deployment.yaml b/charts/core/templates/model-backend/deployment.yaml index 10af3872..0e629d88 100644 --- a/charts/core/templates/model-backend/deployment.yaml +++ b/charts/core/templates/model-backend/deployment.yaml @@ -92,6 +92,10 @@ spec: - name: config mountPath: {{ .Values.modelBackend.configPath }} subPath: config.yaml + env: + {{- if .Values.pipelineBackend.extraEnv }} + {{- toYaml .Values.pipelineBackend.extraEnv | nindent 12 }} + {{- end }} - name: model-backend-init image: {{ .Values.modelBackend.image.repository }}:{{ .Values.modelBackend.image.tag }} imagePullPolicy: {{ .Values.modelBackend.image.pullPolicy }} @@ -104,6 +108,10 @@ spec: - name: config mountPath: {{ .Values.modelBackend.configPath }} subPath: config.yaml + env: + {{- if .Values.pipelineBackend.extraEnv }} + {{- toYaml .Values.pipelineBackend.extraEnv | nindent 12 }} + {{- end }} - name: wait-for-mgmt-backend image: curlimages/curl:8.00.1 command: ['sh', '-c'] @@ -156,6 +164,10 @@ spec: {{- with .Values.modelBackend.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} + env: + {{- if .Values.pipelineBackend.extraEnv }} + {{- toYaml .Values.pipelineBackend.extraEnv | nindent 12 }} + {{- end }} - name: model-backend image: {{ .Values.modelBackend.image.repository }}:{{ .Values.modelBackend.image.tag }} imagePullPolicy: {{ .Values.modelBackend.image.pullPolicy }} @@ -195,9 +207,9 @@ spec: {{- with .Values.modelBackend.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} - {{- if .Values.modelBackend.extraEnv }} env: - {{- toYaml .Values.modelBackend.extraEnv | nindent 12 }} + {{- if .Values.pipelineBackend.extraEnv }} + {{- toYaml .Values.pipelineBackend.extraEnv | nindent 12 }} {{- end }} {{- with .Values.modelBackend.sidecarContainers }} {{- toYaml . | nindent 8 }} diff --git a/charts/core/values.yaml b/charts/core/values.yaml index 69e4d8a2..341adadb 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -479,7 +479,6 @@ modelBackend: configPath: /model-backend/config/config.yaml # -- The database migration version dbVersion: 9 - dbCloudVersion: instillCoreHost: # -- The configuration of Temporal Cloud temporal: