From f4de80f8bcac7e701e21b9724de1e4cf70eb5e05 Mon Sep 17 00:00:00 2001 From: Andrew Yefanov <1134togo@gmail.com> Date: Tue, 14 Sep 2021 03:18:05 +0300 Subject: [PATCH] misc: add helm high availablity when replicas are more than 1 (#4420) * add helm high availablity when replicas are more than 1 * refactor HA expression ***NO_CI*** --- dev/helm/templates/deployment.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/helm/templates/deployment.yaml b/dev/helm/templates/deployment.yaml index b96fda6b..6c6a2ec9 100644 --- a/dev/helm/templates/deployment.yaml +++ b/dev/helm/templates/deployment.yaml @@ -39,9 +39,9 @@ spec: - name: DB_USER value: {{ default "wiki" .Values.postgresql.postgresqlUser }} - name: DB_SSL - value: "{{ default "false" .Values.postgresql.ssl }}" + value: "{{ default "false" .Values.postgresql.ssl }}" - name: DB_SSL_CA - value: "{{ default "" .Values.postgresql.ca }}" + value: "{{ default "" .Values.postgresql.ca }}" - name: DB_PASS valueFrom: secretKeyRef: @@ -51,6 +51,8 @@ spec: name: {{ template "wiki.postgresql.secret" . }} {{- end }} key: {{ template "wiki.postgresql.secretKey" . }} + - name: HA + value: {{ .Values.replicaCount | int | le 2 | quote }} ports: - name: http containerPort: 3000