From 67bc28bac0d49ebc332bc8b88c42183cfb9345be Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Fri, 22 Mar 2024 16:50:56 +0800 Subject: [PATCH 1/2] feat: add configuration for read-replica database --- charts/core/templates/mgmt-backend/configmap.yaml | 7 +++++++ charts/core/templates/model-backend/configmap.yaml | 7 +++++++ charts/core/templates/pipeline-backend/configmap.yaml | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/charts/core/templates/mgmt-backend/configmap.yaml b/charts/core/templates/mgmt-backend/configmap.yaml index fc89cc94..a462a01e 100644 --- a/charts/core/templates/mgmt-backend/configmap.yaml +++ b/charts/core/templates/mgmt-backend/configmap.yaml @@ -32,6 +32,13 @@ data: password: {{ default (include "core.database.rawPassword" .) .Values.database.external.password }} host: {{ default (include "core.database.host" .) .Values.database.external.host }} port: {{ default (include "core.database.port" .) .Values.database.external.port }} + {{- if .Values.database.external_replica }} + replica: + username: {{ .Values.database.external_replica.username | default "" }} + password: {{ .Values.database.external_replica.password | default "" }} + host: {{ .Values.database.external_replica.host | default "" }} + port: {{ .Values.database.external_replica.port | default "" }} + {{- end }} name: mgmt version: {{ .Values.mgmtBackend.dbVersion }} timezone: Etc/UTC diff --git a/charts/core/templates/model-backend/configmap.yaml b/charts/core/templates/model-backend/configmap.yaml index 766743be..e7f6a310 100644 --- a/charts/core/templates/model-backend/configmap.yaml +++ b/charts/core/templates/model-backend/configmap.yaml @@ -61,6 +61,13 @@ data: password: {{ default (include "core.database.rawPassword" .) .Values.database.external.password }} host: {{ default (include "core.database.host" .) .Values.database.external.host }} port: {{ default (include "core.database.port" .) .Values.database.external.port }} + {{- if .Values.database.external_replica }} + replica: + username: {{ .Values.database.external_replica.username | default "" }} + password: {{ .Values.database.external_replica.password | default "" }} + host: {{ .Values.database.external_replica.host | default "" }} + port: {{ .Values.database.external_replica.port | default "" }} + {{- end }} name: model version: {{ .Values.modelBackend.dbVersion }} timezone: Etc/UTC diff --git a/charts/core/templates/pipeline-backend/configmap.yaml b/charts/core/templates/pipeline-backend/configmap.yaml index 88d852a7..dbc1c30a 100644 --- a/charts/core/templates/pipeline-backend/configmap.yaml +++ b/charts/core/templates/pipeline-backend/configmap.yaml @@ -55,6 +55,13 @@ data: password: {{ default (include "core.database.rawPassword" .) .Values.database.external.password }} host: {{ default (include "core.database.host" .) .Values.database.external.host }} port: {{ default (include "core.database.port" .) .Values.database.external.port }} + {{- if .Values.database.external_replica }} + replica: + username: {{ .Values.database.external_replica.username | default "" }} + password: {{ .Values.database.external_replica.password | default "" }} + host: {{ .Values.database.external_replica.host | default "" }} + port: {{ .Values.database.external_replica.port | default "" }} + {{- end }} name: pipeline version: {{ .Values.pipelineBackend.dbVersion }} timezone: Etc/UTC From ca0732a61e3a93380fe5f808d84a9444dca5d430 Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Fri, 22 Mar 2024 18:37:00 +0800 Subject: [PATCH 2/2] feat: add configuration for read-replica database --- charts/core/values.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/core/values.yaml b/charts/core/values.yaml index b410f6e8..d6d09f93 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -1079,6 +1079,11 @@ database: port: username: password: + external_replica: + host: + port: + username: + password: # -- The configuration of etcd etcd: persistence: