Add extraCommands for workers

This commit is contained in:
Jack O'Sullivan 2021-06-29 22:28:04 +01:00
parent afc82bc672
commit db2a430b8a
2 changed files with 22 additions and 7 deletions

View file

@ -65,6 +65,15 @@ spec:
-e "s/@@REDIS_PASSWORD@@/${REDIS_PASSWORD:-}/" \ -e "s/@@REDIS_PASSWORD@@/${REDIS_PASSWORD:-}/" \
> /synapse/config/conf.d/secrets.yaml > /synapse/config/conf.d/secrets.yaml
{{- if (or $config.extraCommands $default.extraCommands) }}
{{- with $config.extraCommands | default $default.extraCommands }}
{{ range . }}
{{ . }}
{{- end }}
{{- end }}
{{- end }}
exec python -B -m synapse.app.{{ (not (not $config.generic)) | ternary "generic_worker" $worker }} \ exec python -B -m synapse.app.{{ (not (not $config.generic)) | ternary "generic_worker" $worker }} \
-c /synapse/config/homeserver.yaml \ -c /synapse/config/homeserver.yaml \
-c /synapse/config/conf.d/ \ -c /synapse/config/conf.d/ \

View file

@ -288,6 +288,12 @@ workers:
volumes: [] volumes: []
volumeMounts: [] volumeMounts: []
## Extra commands to run when starting Synapse
##
extraCommands: []
# - 'apt-get update -yqq && apt-get install patch -yqq'
# - 'patch -d/usr/local/lib/python3.7/site-packages/synapse -p2 < /synapse/patches/something.patch'
## Security context information to set to the worker. ## Security context information to set to the worker.
## ##
podSecurityContext: {} podSecurityContext: {}