Skip to content

Commit

Permalink
feat(helm): add configuration for read-replica database (#455)
Browse files Browse the repository at this point in the history
Because

- We are going to support a read-replica database to improve query
throughput.

This commit

- Adds configuration for the read-replica database.
  • Loading branch information
donch1989 authored Mar 25, 2024
1 parent ff8867f commit ba80559
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/core/templates/mgmt-backend/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions charts/core/templates/model-backend/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions charts/core/templates/pipeline-backend/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions charts/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,11 @@ database:
port:
username:
password:
external_replica:
host:
port:
username:
password:
# -- The configuration of etcd
etcd:
persistence:
Expand Down

0 comments on commit ba80559

Please sign in to comment.