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***
This commit is contained in:
Andrew Yefanov 2021-09-14 03:18:05 +03:00 committed by GitHub
parent d5a5820c2f
commit f4de80f8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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