mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-21 17:41:44 -08:00
Merge pull request #309 from element-hq/bbz/synapse-secrets-in-files-where-possible
Load MAS-Synapse shared secrets from files
This commit is contained in:
13 files changed
+53
-35
No files matched your search
@@ -21,10 +21,14 @@ synapse:
|
||||
podSecurityContext:
|
||||
runAsGroup: 0
|
||||
|
||||
extraArgs:
|
||||
# Validate that any Synapse config that has a <foo>_path equivalent uses it
|
||||
- --no-secrets-in-config
|
||||
|
||||
haproxy:
|
||||
podSecurityContext:
|
||||
runAsGroup: 0
|
||||
|
||||
postgres:
|
||||
podSecurityContext:
|
||||
runAsGroup: 0
|
||||
runAsGroup: 0
|
||||
@@ -36,6 +36,9 @@ synapse:
|
||||
checkConfigHook:
|
||||
annotations:
|
||||
has-no-service-monitor: "true"
|
||||
extraArgs:
|
||||
# Validate that any Synapse config that has a <foo>_path equivalent uses it
|
||||
- --no-secrets-in-config
|
||||
ingress:
|
||||
host: synapse.{{ $.Values.serverName }}
|
||||
tlsSecret: '{{ $.Release.Name }}-synapse-web-tls'
|
||||
|
||||
@@ -33,6 +33,9 @@ synapse:
|
||||
checkConfigHook:
|
||||
annotations:
|
||||
has-no-service-monitor: "true"
|
||||
extraArgs:
|
||||
# Validate that any Synapse config that has a <foo>_path equivalent uses it
|
||||
- --no-secrets-in-config
|
||||
extraEnv:
|
||||
- name: DEBUG_RENDERING
|
||||
value: "1"
|
||||
|
||||
@@ -89,6 +89,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"extraArgs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ingress": {
|
||||
"$ref": "file://synapse/ingress_with_additional_paths.json"
|
||||
},
|
||||
|
||||
@@ -93,6 +93,9 @@ logging:
|
||||
{{- sub_schema_values.tolerations() }}
|
||||
{{- sub_schema_values.topologySpreadConstraints() }}
|
||||
|
||||
## Extra command line arguments to provide to Synapse
|
||||
extraArgs: []
|
||||
|
||||
redis:
|
||||
{{- sub_schema_values.image(registry='docker.io', repository='library/redis', tag='7.4-alpine') | indent(2) }}
|
||||
{{- sub_schema_values.labels() | indent(2) }}
|
||||
|
||||
@@ -163,38 +163,6 @@ app.kubernetes.io/version: {{ .image.tag }}
|
||||
)
|
||||
)
|
||||
}}
|
||||
{{- if $root.Values.matrixAuthenticationService.enabled }}
|
||||
- name: MAS_SHARED_SECRET
|
||||
value: >-
|
||||
{{
|
||||
printf "{{ readfile \"/secrets/%s\" | quote }}" (
|
||||
include "element-io.ess-library.init-secret-path" (
|
||||
dict "root" $root
|
||||
"context" (dict
|
||||
"secretPath" "matrixAuthenticationService.synapseSharedSecret"
|
||||
"initSecretKey" "MAS_SYNAPSE_SHARED_SECRET"
|
||||
"defaultSecretName" (printf "%s-matrix-authentication-service" $root.Release.Name)
|
||||
"defaultSecretKey" "SYNAPSE_SHARED_SECRET"
|
||||
)
|
||||
)
|
||||
)
|
||||
}}
|
||||
- name: MAS_OIDC_CLIENT_SECRET
|
||||
value: >-
|
||||
{{
|
||||
printf "{{ readfile \"/secrets/%s\" | quote }}" (
|
||||
include "element-io.ess-library.init-secret-path" (
|
||||
dict "root" $root
|
||||
"context" (dict
|
||||
"secretPath" "matrixAuthenticationService.synapseOIDCClientSecret"
|
||||
"initSecretKey" "MAS_SYNAPSE_OIDC_CLIENT_SECRET"
|
||||
"defaultSecretName" (printf "%s-matrix-authentication-service" $root.Release.Name)
|
||||
"defaultSecretKey" "SYNAPSE_OIDC_CLIENT_SECRET"
|
||||
)
|
||||
)
|
||||
)
|
||||
}}
|
||||
{{- end }}
|
||||
- name: APPLICATION_NAME
|
||||
value: >-
|
||||
{{ printf "{{ hostname | replace \"-synapse-\" \"\" }}" }}
|
||||
|
||||
@@ -107,9 +107,25 @@ experimental_features:
|
||||
client_id: 0000000000000000000SYNAPSE
|
||||
client_auth_method: client_secret_basic
|
||||
# client.<client_id> in the MAS secret
|
||||
client_secret: ${MAS_OIDC_CLIENT_SECRET}
|
||||
client_secret_path: /secrets/{{
|
||||
include "element-io.ess-library.init-secret-path" (
|
||||
dict "root" $root "context" (dict
|
||||
"secretPath" "matrixAuthenticationService.synapseOIDCClientSecret"
|
||||
"initSecretKey" "MAS_SYNAPSE_OIDC_CLIENT_SECRET"
|
||||
"defaultSecretName" (printf "%s-matrix-authentication-service" $root.Release.Name)
|
||||
"defaultSecretKey" "SYNAPSE_OIDC_CLIENT_SECRET"
|
||||
)
|
||||
) }}
|
||||
# serverSecret in the MAS secret
|
||||
admin_token: ${MAS_SHARED_SECRET}
|
||||
admin_token_path: /secrets/{{
|
||||
include "element-io.ess-library.init-secret-path" (
|
||||
dict "root" $root "context" (dict
|
||||
"secretPath" "matrixAuthenticationService.synapseSharedSecret"
|
||||
"initSecretKey" "MAS_SYNAPSE_SHARED_SECRET"
|
||||
"defaultSecretName" (printf "%s-matrix-authentication-service" $root.Release.Name)
|
||||
"defaultSecretKey" "SYNAPSE_SHARED_SECRET"
|
||||
)
|
||||
) }}
|
||||
introspection_endpoint: "http://{{ $root.Release.Name }}-matrix-authentication-service.{{ $root.Release.Namespace }}.svc.cluster.local:8080/oauth2/introspect"
|
||||
|
||||
# QR Code Login. Requires MAS
|
||||
|
||||
@@ -149,6 +149,9 @@ We have an init container to render & merge the config for several reasons:
|
||||
- {{ include "element-io.synapse.process.app" (dict "root" $root "context" $processType) }}
|
||||
- "-c"
|
||||
- /conf/homeserver.yaml
|
||||
{{- range .extraArgs }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- include "element-io.synapse.pythonEnv" (dict "root" $root "context" .) | nindent 8 }}
|
||||
{{- include "element-io.synapse.env" (dict "root" $root "context" .) | nindent 8 }}
|
||||
|
||||
@@ -2776,6 +2776,12 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"extraArgs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ingress": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -1681,6 +1681,9 @@ synapse:
|
||||
## # whenUnsatisfiable: DoNotSchedule/ScheduleAnyway
|
||||
topologySpreadConstraints: []
|
||||
|
||||
## Extra command line arguments to provide to Synapse
|
||||
extraArgs: []
|
||||
|
||||
redis:
|
||||
# Details of the image to be used
|
||||
image:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Have Synapse load Matrix Authentication Service shared secrets from files.
|
||||
@@ -0,0 +1 @@
|
||||
Make it possible to provide additional command line arguments to Synapse.
|
||||
@@ -0,0 +1 @@
|
||||
Validate the chart uses path options in Synapse where possible.
|
||||
Reference in new issue
Block a user