diff --git a/charts/matrix-synapse/templates/deployment.yaml b/charts/matrix-synapse/templates/deployment.yaml index cb0e7b4..14f2f2a 100644 --- a/charts/matrix-synapse/templates/deployment.yaml +++ b/charts/matrix-synapse/templates/deployment.yaml @@ -82,7 +82,7 @@ spec: -c /synapse/config/conf.d/ env: {{- $postgresPass := include "matrix-synapse.postgresql.password" . }} - {{- if and .Values.postgresql.enabled (not $postgresPass) }} + {{- if and .Values.postgresql.enabled }} - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: @@ -90,7 +90,7 @@ spec: key: postgresql-password {{- end }} {{- $redisPass := include "matrix-synapse.redis.password" . }} - {{- if and .Values.redis.enabled (default .Values.redis.usePassword true) (not $redisPass) }} + {{- if and .Values.redis.enabled (default .Values.redis.usePassword true) }} - name: REDIS_PASSWORD valueFrom: secretKeyRef: diff --git a/charts/matrix-synapse/templates/secrets.yaml b/charts/matrix-synapse/templates/secrets.yaml index 3cdb3ed..8fcd9fa 100644 --- a/charts/matrix-synapse/templates/secrets.yaml +++ b/charts/matrix-synapse/templates/secrets.yaml @@ -44,7 +44,7 @@ stringData: name: "psycopg2" args: user: {{ $postgresUser | quote }} - {{- if $postgresPass }} + {{- if and $postgresPass (not .Values.postgresql.existingSecret) }} password: {{ $postgresPass | quote }} {{- else }} password: "@@POSTGRES_PASSWORD@@" @@ -67,7 +67,7 @@ stringData: enabled: true host: {{ $redisHost | quote }} {{- if or .Values.redis.usePassword .Values.redis.password .Values.externalRedis.password }} - {{- if $redisPass }} + {{- if and $redisPass (not .Values.redis.existingSecret) }} password: {{ $redisPass | quote }} {{- else }} password: "@@REDIS_PASSWORD@@"