matrix-synapse: Add deployment strategy configuration for pods

This commit is contained in:
Jack O'Sullivan 2021-07-01 12:33:12 +01:00
parent d06d28972d
commit f246c4fe2d
3 changed files with 23 additions and 0 deletions

View file

@ -16,6 +16,8 @@ metadata:
app.kubernetes.io/component: synapse
spec:
replicas: 1
strategy:
{{- toYaml .Values.synapse.strategy | nindent 4 }}
selector:
matchLabels:
{{- include "matrix-synapse.selectorLabels" . | nindent 6 }}

View file

@ -13,6 +13,10 @@ metadata:
app.kubernetes.io/component: {{ $name }}
spec:
replicas: {{ $config.replicaCount | default $default.replicaCount }}
{{- with ($config.strategy | default $default.strategy) }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- include "matrix-synapse.selectorLabels" $ | nindent 6 }}

View file

@ -145,6 +145,15 @@ extraSecrets: {}
## Configuration to apply to the main Synapse pod.
##
synapse:
## Only really applicable when the deployment has an RWO PV attached (e.g. when media repository
## is enabled for the main Synapse pod)
## Since replicas = 1, an update can get "stuck", as the previous pod remains attached to the
## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will
## terminate the single previous pod, so that the new, incoming pod can attach to the PV
##
strategy:
type: RollingUpdate
## Annotations to apply to the main Synapse pod.
##
annotations: {}
@ -260,6 +269,14 @@ workers:
##
replicaCount: 1
## Update strategy - only really applicable for deployments with RWO PVs attached (e.g. media repository)
## If replicas = 1, an update can get "stuck", as the previous pod remains attached to the
## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will
## terminate the single previous pod, so that the new, incoming pod can attach to the PV
##
strategy:
type: RollingUpdate
## A specific name for this worker, can't be set globally.
## Note that this can only be set when replicaCount is 1
#name: