Skip to content

Commit 2df5294

Browse files
authored
updateStrategy-and-bdp-fix (#6)
1 parent 0906317 commit 2df5294

12 files changed

+71
-32
lines changed

charts/synapse/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
name: synapse
3-
version: 0.4.4
3+
version: 0.4.5

charts/synapse/templates/admin-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ metadata:
77
app: admin
88
spec:
99
replicas: {{ .Values.admin.replicas }}
10+
{{- if .Values.admin.updateStrategy }}
11+
strategy:
12+
{{ toYaml .Values.admin.updateStrategy | nindent 6 }}
13+
{{- end }}
1014
selector:
1115
matchLabels:
1216
app: admin

charts/synapse/templates/envoy-deployment.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ spec:
99
selector:
1010
matchLabels:
1111
{{- include "synapse-client-reader-envoy.selectorLabels" . | nindent 6 }}
12+
{{- if .Values.envoyProxy.updateStrategy }}
1213
strategy:
13-
rollingUpdate:
14-
maxSurge: 1
15-
maxUnavailable: 1
16-
type: RollingUpdate
14+
{{ toYaml .Values.envoyProxy.updateStrategy | nindent 4 }}
15+
{{- end }}
1716
template:
1817
metadata:
1918
labels:

charts/synapse/templates/envoy-pdb.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ kind: PodDisruptionBudget
44
metadata:
55
name: synapse-client-reader-envoy
66
spec:
7-
{{- if .Values.envoyProxy.podDisruptionBudget.minAvailable }}
7+
{{- if and .Values.envoyProxy.podDisruptionBudget.minAvailable (not (hasKey .Values.envoyProxy.podDisruptionBudget "maxUnavailable")) }}
88
minAvailable: {{ .Values.envoyProxy.podDisruptionBudget.minAvailable }}
9-
{{- end }}
10-
{{- if .Values.envoyProxy.podDisruptionBudget.maxUnavailable }}
9+
{{- else if .Values.envoyProxy.podDisruptionBudget.maxUnavailable }}
1110
maxUnavailable: {{ .Values.envoyProxy.podDisruptionBudget.maxUnavailable }}
1211
{{- end }}
1312
selector:

charts/synapse/templates/matrix-authentication-deployment.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ spec:
1212
selector:
1313
matchLabels:
1414
{{- include "matrix-authentication.selectorLabels" . | nindent 6 }}
15+
{{- if .Values.matrixAuthentication.updateStrategy }}
1516
strategy:
16-
rollingUpdate:
17-
maxSurge: 1
18-
maxUnavailable: 1
19-
type: RollingUpdate
17+
{{ toYaml .Values.matrixAuthentication.updateStrategy | nindent 4 }}
18+
{{- end }}
2019
template:
2120
metadata:
2221
labels:

charts/synapse/templates/matrix-authentication-pdb.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ kind: PodDisruptionBudget
55
metadata:
66
name: matrix-authentication
77
spec:
8-
{{- if .Values.matrixAuthentication.podDisruptionBudget.minAvailable }}
8+
{{- if and .Values.matrixAuthentication.podDisruptionBudget.minAvailable (not (hasKey .Values.matrixAuthentication.podDisruptionBudget "maxUnavailable")) }}
99
minAvailable: {{ .Values.matrixAuthentication.podDisruptionBudget.minAvailable }}
10-
{{- end }}
11-
{{- if .Values.matrixAuthentication.podDisruptionBudget.maxUnavailable }}
10+
{{- else if .Values.matrixAuthentication.podDisruptionBudget.maxUnavailable }}
1211
maxUnavailable: {{ .Values.matrixAuthentication.podDisruptionBudget.maxUnavailable }}
1312
{{- end }}
1413
selector:

charts/synapse/templates/pgbouncer-deployment-pdb.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ kind: PodDisruptionBudget
44
metadata:
55
name: synapse-pgbouncer
66
spec:
7-
{{- if .Values.synapse.pgbouncer.podDisruptionBudget.minAvailable }}
7+
{{- if and .Values.synapse.pgbouncer.podDisruptionBudget.minAvailable (not (hasKey .Values.synapse.pgbouncer.podDisruptionBudget "maxUnavailable")) }}
88
minAvailable: {{ .Values.synapse.pgbouncer.podDisruptionBudget.minAvailable }}
9-
{{- end }}
10-
{{- if .Values.synapse.pgbouncer.podDisruptionBudget.maxUnavailable }}
9+
{{- else if .Values.synapse.pgbouncer.podDisruptionBudget.maxUnavailable }}
1110
maxUnavailable: {{ .Values.synapse.pgbouncer.podDisruptionBudget.maxUnavailable }}
1211
{{- end }}
1312
selector:

charts/synapse/templates/pgbouncer-deployment.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ spec:
1010
selector:
1111
matchLabels:
1212
app: synapse-pgbouncer
13+
{{- if .Values.synapse.pgbouncer.updateStrategy }}
1314
strategy:
14-
rollingUpdate:
15-
maxSurge: 1
16-
maxUnavailable: 1
17-
type: RollingUpdate
15+
{{ toYaml .Values.synapse.pgbouncer.updateStrategy | nindent 4 }}
16+
{{- end }}
1817
template:
1918
metadata:
2019
labels:

charts/synapse/templates/sliding-sync-proxy-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ spec:
1010
{{- if not .Values.slidingSyncProxy.autoscaling.enabled }}
1111
replicas: {{ .Values.slidingSyncProxy.replicaCount }}
1212
{{- end }}
13+
{{- if .Values.slidingSyncProxy.updateStrategy }}
14+
strategy:
15+
{{ toYaml .Values.slidingSyncProxy.updateStrategy | nindent 4 }}
16+
{{- end }}
1317
selector:
1418
matchLabels:
1519
{{- include "sliding-sync-proxy.selectorLabels" . | nindent 6 }}

charts/synapse/templates/synapse-workers-deployment.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ spec:
1111
{{- if not $options.autoscaling.enabled }}
1212
replicas: {{ $options.replicas }}
1313
{{- end }}
14+
{{- if $.Values.synapse.updateStrategy }}
15+
strategy:
16+
{{ toYaml $.Values.synapse.updateStrategy | nindent 4 }}
17+
{{- end }}
1418
selector:
1519
matchLabels:
1620
{{- include "synapse-workers.selectorLabels" $name | nindent 6 }}
17-
strategy:
18-
rollingUpdate:
19-
maxSurge: 50%
20-
maxUnavailable: 50%
21-
type: RollingUpdate
2221
template:
2322
metadata:
2423
annotations:

0 commit comments

Comments
 (0)