Merge branch 'master' into 'master'
add support for existingSecret with Postgres and Redis See merge request ananace/charts!17
This commit is contained in:
commit
296671af42
3 changed files with 19 additions and 9 deletions
|
@ -1,9 +1,9 @@
|
||||||
{{- $needsVolumePermissions := and .Values.volumePermissions.enabled (or .Values.persistence.enabled .Values.persistence.existingClaim) }}
|
{{- $needsVolumePermissions := and .Values.volumePermissions.enabled (or .Values.persistence.enabled .Values.persistence.existingClaim) }}
|
||||||
{{- if (and .Values.postgresql.enabled (not .Values.postgresql.postgresqlPassword)) -}}
|
{{- if (and .Values.postgresql.enabled (and (not .Values.postgresql.postgresqlPassword) (not .Values.postgresql.existingSecret))) -}}
|
||||||
{{- fail "You must specify a static postgres password if using the included postgres chart" -}}
|
{{- fail "You must specify a static postgres password or existing secret if using the included postgres chart" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if (and .Values.redis.enabled (and .Values.redis.usePassword (not .Values.redis.password))) -}}
|
{{- 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 if using the included redis chart" -}}
|
{{- fail "You must specify a static redis password or existing secret if using the included redis chart" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
---
|
---
|
||||||
# Server: {{ required "A valid serverName is required" .Values.serverName }}
|
# Server: {{ required "A valid serverName is required" .Values.serverName }}
|
||||||
|
@ -86,7 +86,7 @@ spec:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "matrix-synapse.postgresql.fullname" . }}
|
name: {{ .Values.postgresql.existingSecret | default (include "matrix-synapse.postgresql.fullname" .) }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $redisPass := include "matrix-synapse.redis.password" . }}
|
{{- $redisPass := include "matrix-synapse.redis.password" . }}
|
||||||
|
@ -94,7 +94,7 @@ spec:
|
||||||
- name: REDIS_PASSWORD
|
- name: REDIS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "matrix-synapse.redis.fullname" . }}
|
name: {{ .Values.redis.existingSecret | default (include "matrix-synapse.redis.fullname" .) }}
|
||||||
key: redis-password
|
key: redis-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.synapse.extraEnv }}
|
{{- with .Values.synapse.extraEnv }}
|
||||||
|
|
|
@ -87,14 +87,14 @@ spec:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "matrix-synapse.postgresql.fullname" $ }}
|
name: {{ $.Values.postgresql.existingSecret | default (include "matrix-synapse.postgresql.fullname" $) }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and $.Values.redis.enabled (default $.Values.redis.usePassword true) }}
|
{{- if and $.Values.redis.enabled (default $.Values.redis.usePassword true) }}
|
||||||
- name: REDIS_PASSWORD
|
- name: REDIS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "matrix-synapse.redis.fullname" $ }}
|
name: {{ $.Values.redis.existingSecret | default (include "matrix-synapse.redis.fullname" $) }}
|
||||||
key: redis-password
|
key: redis-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with $config.extraEnv | default $default.extraEnv }}
|
{{- with $config.extraEnv | default $default.extraEnv }}
|
||||||
|
|
|
@ -592,6 +592,11 @@ postgresql:
|
||||||
# XXX Change me!
|
# XXX Change me!
|
||||||
postgresqlPassword: synapse
|
postgresqlPassword: synapse
|
||||||
|
|
||||||
|
## Or use existing secret with "postgresql-password" key
|
||||||
|
## instead of static password
|
||||||
|
##
|
||||||
|
# existingSecret: postgresql-secret
|
||||||
|
|
||||||
postgresqlUsername: synapse
|
postgresqlUsername: synapse
|
||||||
postgresqlDatabase: synapse
|
postgresqlDatabase: synapse
|
||||||
|
|
||||||
|
@ -629,10 +634,15 @@ externalPostgresql:
|
||||||
redis:
|
redis:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# XXX Change me!
|
|
||||||
usePassword: true
|
usePassword: true
|
||||||
|
# XXX Change me!
|
||||||
password: synapse
|
password: synapse
|
||||||
|
|
||||||
|
## Or use existing secret with "redis-password" key
|
||||||
|
## instead of static password
|
||||||
|
##
|
||||||
|
# existingSecret: redis-secret
|
||||||
|
|
||||||
cluster:
|
cluster:
|
||||||
enabled: false
|
enabled: false
|
||||||
master:
|
master:
|
||||||
|
|
Loading…
Reference in a new issue