From d41227068980811a2994471a0b439557d10f0072 Mon Sep 17 00:00:00 2001 From: fkf9 Date: Tue, 7 Sep 2021 13:12:43 +0200 Subject: [PATCH] Add existingSecret example to values.yaml and add existing secret to fail condition --- charts/matrix-synapse/templates/deployment.yaml | 8 ++++---- charts/matrix-synapse/values.yaml | 12 +++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/charts/matrix-synapse/templates/deployment.yaml b/charts/matrix-synapse/templates/deployment.yaml index 1491796..cb0e7b4 100644 --- a/charts/matrix-synapse/templates/deployment.yaml +++ b/charts/matrix-synapse/templates/deployment.yaml @@ -1,9 +1,9 @@ {{- $needsVolumePermissions := and .Values.volumePermissions.enabled (or .Values.persistence.enabled .Values.persistence.existingClaim) }} -{{- if (and .Values.postgresql.enabled (not .Values.postgresql.postgresqlPassword)) -}} -{{- fail "You must specify a static postgres password if using the included postgres chart" -}} +{{- if (and .Values.postgresql.enabled (and (not .Values.postgresql.postgresqlPassword) (not .Values.postgresql.existingSecret))) -}} +{{- fail "You must specify a static postgres password or existing secret if using the included postgres chart" -}} {{- end -}} -{{- if (and .Values.redis.enabled (and .Values.redis.usePassword (not .Values.redis.password))) -}} -{{- fail "You must specify a static redis password if using the included redis chart" -}} +{{- if (and .Values.redis.enabled (and .Values.redis.usePassword (and (not .Values.redis.password) (not .Values.redis.existingSecret)))) -}} +{{- fail "You must specify a static redis password or existing secret if using the included redis chart" -}} {{- end -}} --- # Server: {{ required "A valid serverName is required" .Values.serverName }} diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index fdaeaf7..a8e8559 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -592,6 +592,11 @@ postgresql: # XXX Change me! postgresqlPassword: synapse + ## Or use existing secret with "postgresql-password" key + ## instead of static password + ## + # existingSecret: postgresql-secret + postgresqlUsername: synapse postgresqlDatabase: synapse @@ -629,10 +634,15 @@ externalPostgresql: redis: enabled: true - # XXX Change me! usePassword: true + # XXX Change me! password: synapse + ## Or use existing secret with "redis-password" key + ## instead of static password + ## + # existingSecret: redis-secret + cluster: enabled: false master: