Skip to content

Commit 6676d07

Browse files
committed
add pdb to redis and mas
1 parent 1a74e8b commit 6676d07

File tree

10 files changed

+77
-4
lines changed

10 files changed

+77
-4
lines changed

charts/redis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
name: redis
3-
version: 0.0.4
3+
version: 0.0.5

charts/redis/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
containerPort: 9121
4343
protocol: TCP
4444
{{- end }}
45+
{{- if .Values.priorityClassName }}
46+
priorityClassName: "{{ .Values.priorityClassName }}"
47+
{{- end }}
4548
volumes:
4649
- name: devshm
4750
emptyDir:

charts/redis/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ resources: {}
66
nodeSelector: {}
77
tolerations: []
88
affinity: {}
9+
priorityClassName: ''
910
exporter:
1011
enabled: true
1112
image:

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.3.0
3+
version: 0.4.0

charts/synapse/templates/envoy-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ spec:
7777
topologySpreadConstraints:
7878
{{ toYaml .Values.envoyProxy.topologySpreadConstraints | nindent 8 }}
7979
{{- end }}
80+
{{- if .Values.envoyProxy.priorityClassName }}
81+
priorityClassName: "{{ .Values.envoyProxy.priorityClassName }}"
82+
{{- end }}
8083
volumes:
8184
- name: config
8285
configMap:

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ spec:
110110
affinity:
111111
{{ toYaml .Values.matrixAuthentication.affinity | nindent 8 }}
112112
{{- end }}
113+
{{- if .Values.matrixAuthentication.topologySpreadConstraints }}
114+
topologySpreadConstraints:
115+
{{ toYaml .Values.matrixAuthentication.topologySpreadConstraints | nindent 8 }}
116+
{{- end }}
117+
{{- if .Values.matrixAuthentication.priorityClassName }}
118+
priorityClassName: "{{ .Values.matrixAuthentication.priorityClassName }}"
119+
{{- end }}
113120
volumes:
114121
- name: config
115122
secret:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{- if .Values.matrixAuthentication.enabled }}
2+
{{- if .Values.matrixAuthentication.podDisruptionBudget.ebabled }}
3+
apiVersion: policy/v1
4+
kind: PodDisruptionBudget
5+
metadata:
6+
name: matrix-authentication
7+
spec:
8+
{{- if .Values.matrixAuthentication.podDisruptionBudget.minAvailable }}
9+
minAvailable: {{ .Values.matrixAuthentication.podDisruptionBudget.minAvailable }}
10+
{{- end }}
11+
{{- if .Values.matrixAuthentication.podDisruptionBudget.maxUnavailable }}
12+
maxUnavailable: {{ .Values.matrixAuthentication.podDisruptionBudget.maxUnavailable }}
13+
{{- end }}
14+
selector:
15+
matchLabels:
16+
{{- include "matrix-authentication.selectorLabels" . | nindent 6 }}
17+
{{- end }}
18+
{{- end }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- if .Values.synapse.pgbouncer.podDisruptionBudget.ebabled }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: synapse-pgbouncer
6+
spec:
7+
{{- if .Values.synapse.pgbouncer.podDisruptionBudget.minAvailable }}
8+
minAvailable: {{ .Values.synapse.pgbouncer.podDisruptionBudget.minAvailable }}
9+
{{- end }}
10+
{{- if .Values.synapse.pgbouncer.podDisruptionBudget.maxUnavailable }}
11+
maxUnavailable: {{ .Values.synapse.pgbouncer.podDisruptionBudget.maxUnavailable }}
12+
{{- end }}
13+
selector:
14+
matchLabels:
15+
app: synapse-pgbouncer
16+
{{- end }}

charts/synapse/templates/pgbouncer-deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ spec:
1010
selector:
1111
matchLabels:
1212
app: synapse-pgbouncer
13+
strategy:
14+
rollingUpdate:
15+
maxSurge: 1
16+
maxUnavailable: 1
17+
type: RollingUpdate
1318
template:
1419
metadata:
1520
labels:
@@ -56,4 +61,11 @@ spec:
5661
affinity:
5762
{{ toYaml .Values.synapse.pgbouncer.affinity | nindent 8 }}
5863
{{- end }}
64+
{{- if .Values.synapse.pgbouncer.topologySpreadConstraints }}
65+
topologySpreadConstraints:
66+
{{ toYaml .Values.synapse.pgbouncer.topologySpreadConstraints | nindent 8 }}
67+
{{- end }}
68+
{{- if .Values.synapse.pgbouncer.priorityClassName }}
69+
priorityClassName: "{{ .Values.synapse.pgbouncer.priorityClassName }}"
70+
{{- end }}
5971
terminationGracePeriodSeconds: 10

charts/synapse/values.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ synapse:
100100
repository: "bitnami/pgbouncer"
101101
tag: "1.21.0-debian-11-r5"
102102
pullPolicy: IfNotPresent
103-
replicas: 1
103+
replicas: 2
104+
podDisruptionBudget:
105+
ebabled: true
106+
#minAvailable: 1
107+
maxUnavailable: 1
104108
authType: "md5"
105109
maxClientConn: "8192"
106110
poolSize: "20"
@@ -109,6 +113,8 @@ synapse:
109113
nodeSelector: {}
110114
tolerations: []
111115
affinity: {}
116+
priorityClassName: ''
117+
topologySpreadConstraints: []
112118

113119
redis:
114120
enabled: true
@@ -348,6 +354,7 @@ envoyProxy:
348354
nodeSelector: {}
349355
tolerations: []
350356
affinity: {}
357+
priorityClassName: ''
351358
topologySpreadConstraints: []
352359
# example
353360
#topologySpreadConstraints:
@@ -363,7 +370,11 @@ matrixAuthentication:
363370
service:
364371
type: ClusterIP
365372
port: 80
366-
replicaCount: 1
373+
replicaCount: 2
374+
podDisruptionBudget:
375+
ebabled: true
376+
#minAvailable: 1
377+
maxUnavailable: 1
367378
image:
368379
repository: ghcr.io/matrix-org/matrix-authentication-service
369380
tag: 0.9.0
@@ -379,6 +390,8 @@ matrixAuthentication:
379390
nodeSelector: {}
380391
tolerations: []
381392
affinity: {}
393+
priorityClassName: ''
394+
topologySpreadConstraints: []
382395
autoscaling:
383396
enabled: false
384397
minReplicas: 1

0 commit comments

Comments
 (0)