Skip to content

Commit 33a4bb1

Browse files
committed
Make readinessProbes configurable
1 parent 82ed273 commit 33a4bb1

28 files changed

+1829
-100
lines changed

charts/matrix-stack/source/element-web.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
},
5555
"livenessProbe": {
5656
"$ref": "file://common/probe.json"
57+
},
58+
"readinessProbe": {
59+
"$ref": "file://common/probe.json"
5760
}
5861
}
5962
}

charts/matrix-stack/source/element-web.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ replicas: 1
3131
{{- sub_schema_values.tolerations() -}}
3232
{{- sub_schema_values.topologySpreadConstraints() }}
3333
{{- sub_schema_values.probe("liveness", failureThreshold=3, periodSeconds=10) }}
34+
{{- sub_schema_values.probe("readiness", failureThreshold=3, periodSeconds=3) }}

charts/matrix-stack/source/haproxy.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
},
4646
"livenessProbe": {
4747
"$ref": "file://common/probe.json"
48+
},
49+
"readinessProbe": {
50+
"$ref": "file://common/probe.json"
4851
}
4952
}
5053
}

charts/matrix-stack/source/haproxy.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ replicas: 1
1919
{{- sub_schema_values.tolerations() }}
2020
{{- sub_schema_values.topologySpreadConstraints() }}
2121
{{- sub_schema_values.probe("liveness", initialDelaySeconds=10, timeoutSeconds=5) }}
22+
{{- sub_schema_values.probe("readiness", initialDelaySeconds=20, timeoutSeconds=5) }}

charts/matrix-stack/source/matrix-rtc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@
8989
"livenessProbe": {
9090
"$ref": "file://common/probe.json"
9191
},
92+
"readinessProbe": {
93+
"$ref": "file://common/probe.json"
94+
},
9295
"sfu": {
9396
"type": "object",
9497
"properties": {
@@ -179,6 +182,9 @@
179182
},
180183
"livenessProbe": {
181184
"$ref": "file://common/probe.json"
185+
},
186+
"readinessProbe": {
187+
"$ref": "file://common/probe.json"
182188
}
183189
}
184190
}

charts/matrix-stack/source/matrix-rtc.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ enabled: true
3131
{{- sub_schema_values.serviceAccount() }}
3232
{{- sub_schema_values.tolerations() }}
3333
{{- sub_schema_values.probe("liveness") }}
34+
{{- sub_schema_values.probe("readiness") }}
3435

3536
sfu:
3637
enabled: true
@@ -70,3 +71,4 @@ sfu:
7071
{{- sub_schema_values.serviceMonitors() | indent(2) }}
7172
{{- sub_schema_values.tolerations() | indent(2) }}
7273
{{- sub_schema_values.probe("liveness") | indent(2) }}
74+
{{- sub_schema_values.probe("readiness") | indent(2) }}

charts/matrix-stack/source/matrixAuthenticationService.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
},
8989
"livenessProbe": {
9090
"$ref": "file://common/probe.json"
91+
},
92+
"readinessProbe": {
93+
"$ref": "file://common/probe.json"
9194
}
9295
}
9396
}

charts/matrix-stack/source/matrixAuthenticationService.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ privateKeys:
4343
{{ sub_schema_values.serviceMonitors() }}
4444
{{ sub_schema_values.extraEnv() }}
4545
{{ sub_schema_values.probe("liveness", failureThreshold=3) }}
46+
{{ sub_schema_values.probe("readiness", failureThreshold=3) }}

charts/matrix-stack/source/postgres.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
},
2727
"livenessProbe": {
2828
"$ref": "file://common/probe.json"
29+
},
30+
"readinessProbe": {
31+
"$ref": "file://common/probe.json"
2932
}
3033
}
3134
},
@@ -79,6 +82,9 @@
7982
"livenessProbe": {
8083
"$ref": "file://common/probe.json"
8184
},
85+
"readinessProbe": {
86+
"$ref": "file://common/probe.json"
87+
},
8288
"serviceMonitors": {
8389
"$ref": "file://common/serviceMonitors.json"
8490
}

charts/matrix-stack/source/postgres.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ postgresExporter:
1010
{{- sub_schema_values.resources(requests_memory='10Mi', requests_cpu='10m', limits_memory='500Mi')| indent(2) }}
1111
{{- sub_schema_values.containersSecurityContext()| indent(2) }}
1212
{{- sub_schema_values.probe("liveness", periodSeconds=6, timeoutSeconds=2) | indent(2) }}
13+
{{- sub_schema_values.probe("readiness", periodSeconds=2, successThreshold=2, timeoutSeconds=2) | indent(2) }}
1314

1415
{{- sub_schema_values.credential("Postgres Admin Password", "adminPassword", initIfAbsent=true) }}
1516

@@ -31,3 +32,4 @@ essPasswords:
3132
{{- sub_schema_values.tolerations() }}
3233
{{- sub_schema_values.topologySpreadConstraints() }}
3334
{{- sub_schema_values.probe("liveness", initialDelaySeconds=45, timeoutSeconds=2) }}
35+
{{- sub_schema_values.probe("readiness", initialDelaySeconds=15, timeoutSeconds=2) }}

charts/matrix-stack/source/synapse.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@
175175
"livenessProbe": {
176176
"$ref": "file://common/probe.json"
177177
},
178+
"readinessProbe": {
179+
"$ref": "file://common/probe.json"
180+
},
178181
"workers": {
179182
"type": "object",
180183
"properties": {
@@ -275,6 +278,9 @@
275278
},
276279
"livenessProbe": {
277280
"$ref": "file://common/probe.json"
281+
},
282+
"readinessProbe": {
283+
"$ref": "file://common/probe.json"
278284
}
279285
}
280286
}

charts/matrix-stack/source/synapse.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ logging:
9797
{{- sub_schema_values.tolerations() }}
9898
{{- sub_schema_values.topologySpreadConstraints() }}
9999
{{- sub_schema_values.probe("liveness", failureThreshold=8, periodSeconds=6, timeoutSeconds=2) }}
100+
{{- sub_schema_values.probe("readiness", failureThreshold=8, periodSeconds=2, successThreshold=2, timeoutSeconds=2) }}
100101

101102
## Extra command line arguments to provide to Synapse
102103
extraArgs: []
@@ -112,3 +113,4 @@ redis:
112113
{{- sub_schema_values.serviceAccount() | indent(2) }}
113114
{{- sub_schema_values.tolerations() | indent(2) }}
114115
{{- sub_schema_values.probe("liveness", initialDelaySeconds=15) | indent(2) }}
116+
{{- sub_schema_values.probe("readiness", initialDelaySeconds=5) | indent(2) }}

charts/matrix-stack/source/synapse/scalable_worker.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
},
1919
"livenessProbe": {
2020
"$ref": "file://common/probe.json"
21+
},
22+
"readinessProbe": {
23+
"$ref": "file://common/probe.json"
2124
}
2225
},
2326
"type": "object"

charts/matrix-stack/source/synapse/single_worker.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"livenessProbe": {
1010
"$ref": "file://common/probe.json"
11+
},
12+
"readinessProbe": {
13+
"$ref": "file://common/probe.json"
1114
}
1215
},
1316
"type": "object"

charts/matrix-stack/source/synapse/synapse_sub_schema_values.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
1616
# resources: {}
1717

1818
{{- sub_schema_values.probe("liveness", failureThreshold=8, periodSeconds=6, timeoutSeconds=2) | indent(2) }}
19+
{{- sub_schema_values.probe("readiness", failureThreshold=8, periodSeconds=2, successThreshold=2, timeoutSeconds=2) | indent(2) }}
1920
{%- endmacro %}
2021

2122
{% macro scalable_worker(workerType) %}
@@ -31,4 +32,5 @@ SPDX-License-Identifier: AGPL-3.0-only
3132
# resources: {}
3233

3334
{{- sub_schema_values.probe("liveness", failureThreshold=3, periodSeconds=6, timeoutSeconds=2) | indent(2) }}
35+
{{- sub_schema_values.probe("readiness", failureThreshold=3, periodSeconds=2, successThreshold=2, timeoutSeconds=2) | indent(2) }}
3436
{%- endmacro %}

charts/matrix-stack/templates/element-web/deployment.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ spec:
8080
path: /health
8181
port: element
8282
scheme: HTTP
83-
readinessProbe:
84-
failureThreshold: 3
83+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
8584
httpGet:
8685
path: /health
8786
port: element
8887
scheme: HTTP
89-
periodSeconds: 3
9088
startupProbe:
9189
failureThreshold: 3
9290
httpGet:

charts/matrix-stack/templates/haproxy/deployment.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,10 @@ spec:
126126
httpGet:
127127
path: /haproxy_test
128128
port: haproxy-metrics
129-
readinessProbe:
129+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
130130
httpGet:
131131
path: /haproxy_test
132132
port: haproxy-metrics
133-
initialDelaySeconds: 20
134-
timeoutSeconds: 5
135133
{{- with .resources }}
136134
resources:
137135
{{- toYaml . | nindent 10 }}

charts/matrix-stack/templates/matrix-authentication-service/deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ spec:
206206
path: /health
207207
port: internal
208208
scheme: HTTP
209-
readinessProbe:
210-
failureThreshold: 3
209+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
211210
httpGet:
212211
path: /health
213212
port: internal

charts/matrix-stack/templates/matrix-rtc/sfu_deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ spec:
175175
httpGet:
176176
path: /
177177
port: http
178-
readinessProbe:
178+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
179179
httpGet:
180180
path: /
181181
port: http

charts/matrix-stack/templates/matrix-rtc/sfu_jwt_deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
httpGet:
6969
path: /healthz
7070
port: http
71-
readinessProbe:
71+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
7272
httpGet:
7373
path: /healthz
7474
port: http

charts/matrix-stack/templates/postgres/statefulset.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ spec:
6868
startupProbe:
6969
exec:
7070
command: ["psql", "-w", "-U", "postgres", "-d", "postgres", "-c", "SELECT 1"]
71-
readinessProbe:
71+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
7272
exec:
7373
command: ["psql", "-w", "-U", "postgres", "-d", "postgres", "-c", "SELECT 1"]
74-
initialDelaySeconds: 15
75-
timeoutSeconds: 2
7674
livenessProbe: {{- include "element-io.ess-library.pods.probe" .livenessProbe | nindent 10 }}
7775
exec:
7876
command: ["psql", "-w", "-U", "postgres", "-d", "postgres", "-c", "SELECT 1"]
@@ -141,11 +139,9 @@ spec:
141139
startupProbe:
142140
exec:
143141
command: ["psql", "-w", "-U", "postgres", "-d", "postgres", "-c", "SELECT 1"]
144-
readinessProbe:
142+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
145143
exec:
146144
command: ["psql", "-w", "-U", "postgres", "-d", "postgres", "-c", "SELECT 1"]
147-
initialDelaySeconds: 15
148-
timeoutSeconds: 2
149145
livenessProbe: {{- include "element-io.ess-library.pods.probe" .livenessProbe | nindent 10 }}
150146
exec:
151147
command: ["psql", "-w", "-U", "postgres", "-d", "postgres", "-c", "SELECT 1"]
@@ -204,13 +200,10 @@ spec:
204200
httpGet:
205201
path: /metrics
206202
port: metrics
207-
readinessProbe:
203+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
208204
httpGet:
209205
path: /metrics
210206
port: metrics
211-
periodSeconds: 2
212-
timeoutSeconds: 2
213-
successThreshold: 2
214207
{{- with .resources }}
215208
resources:
216209
{{- toYaml . | nindent 10 }}

charts/matrix-stack/templates/synapse/_synapse_pod.tpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,10 @@ We have an init container to render & merge the config for several reasons:
196196
httpGet:
197197
path: /health
198198
port: synapse-health
199-
readinessProbe:
199+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 8 }}
200200
httpGet:
201201
path: /health
202202
port: synapse-health
203-
periodSeconds: 2
204-
timeoutSeconds: 2
205-
successThreshold: 2
206-
failureThreshold: {{ ternary 8 3 (eq "isSingle" (include "element-io.synapse.process.isSingle" (dict "root" $root "context" $processType))) }}
207203
{{- end }}
208204
{{- with .resources }}
209205
resources:

charts/matrix-stack/templates/synapse/redis_deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ spec:
7272
livenessProbe: {{- include "element-io.ess-library.pods.probe" .livenessProbe | nindent 10 }}
7373
tcpSocket:
7474
port: redis
75-
readinessProbe:
75+
readinessProbe: {{- include "element-io.ess-library.pods.probe" .readinessProbe | nindent 10 }}
7676
exec:
7777
command:
7878
- redis-cli
7979
- ping
80-
initialDelaySeconds: 5
8180
{{- with .resources }}
8281
resources:
8382
{{- toYaml . | nindent 10 }}

0 commit comments

Comments
 (0)