Skip to content

Commit 332651f

Browse files
committed
envoy drain_connections_on_host_removal
1 parent 56fa163 commit 332651f

9 files changed

Lines changed: 175 additions & 83 deletions

charts/synapse/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
apiVersion: v2
33
name: synapse
44
description: matrix synapse kubernetes deployment
5-
version: 2.3.4
5+
version: 2.3.5
66
appVersion: 1.151.0

charts/synapse/scripts/envoy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ static_resources:
408408
connect_timeout: 0.02s
409409
type: STRICT_DNS
410410
dns_lookup_family: V4_ONLY
411+
drain_connections_on_host_removal: true
411412
lb_policy: LEAST_REQUEST
412413
least_request_lb_config:
413414
choice_count: 2
@@ -440,6 +441,7 @@ static_resources:
440441
connect_timeout: 0.02s
441442
type: STRICT_DNS
442443
dns_lookup_family: V4_ONLY
444+
drain_connections_on_host_removal: true
443445
lb_policy: RING_HASH
444446
circuit_breakers:
445447
thresholds:
@@ -464,6 +466,7 @@ static_resources:
464466
connect_timeout: 0.02s
465467
type: STRICT_DNS
466468
dns_lookup_family: V4_ONLY
469+
drain_connections_on_host_removal: true
467470
lb_policy: RING_HASH
468471
circuit_breakers:
469472
thresholds:
@@ -488,6 +491,7 @@ static_resources:
488491
connect_timeout: 0.02s
489492
type: STRICT_DNS
490493
dns_lookup_family: V4_ONLY
494+
drain_connections_on_host_removal: true
491495
lb_policy: RING_HASH
492496
circuit_breakers:
493497
thresholds:

charts/synapse/templates/_helpers.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ containers:
155155
volumeMounts:
156156
- name: synapse-{{ .name }}-secret
157157
mountPath: /data
158-
terminationGracePeriodSeconds: 30
158+
lifecycle:
159+
preStop:
160+
exec:
161+
command: ["sleep", "15"]
162+
terminationGracePeriodSeconds: 90
159163
{{- if .nodeSelector }}
160164
nodeSelector:
161165
{{ toYaml .nodeSelector | nindent 2 }}

charts/synapse/tests/golden/fixtures/test-envoy-configmap.golden.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ data:
419419
connect_timeout: 0.02s
420420
type: STRICT_DNS
421421
dns_lookup_family: V4_ONLY
422+
drain_connections_on_host_removal: true
422423
lb_policy: LEAST_REQUEST
423424
least_request_lb_config:
424425
choice_count: 2
@@ -451,6 +452,7 @@ data:
451452
connect_timeout: 0.02s
452453
type: STRICT_DNS
453454
dns_lookup_family: V4_ONLY
455+
drain_connections_on_host_removal: true
454456
lb_policy: RING_HASH
455457
circuit_breakers:
456458
thresholds:
@@ -475,6 +477,7 @@ data:
475477
connect_timeout: 0.02s
476478
type: STRICT_DNS
477479
dns_lookup_family: V4_ONLY
480+
drain_connections_on_host_removal: true
478481
lb_policy: RING_HASH
479482
circuit_breakers:
480483
thresholds:
@@ -499,6 +502,7 @@ data:
499502
connect_timeout: 0.02s
500503
type: STRICT_DNS
501504
dns_lookup_family: V4_ONLY
505+
drain_connections_on_host_removal: true
502506
lb_policy: RING_HASH
503507
circuit_breakers:
504508
thresholds:

charts/synapse/tests/golden/fixtures/test-envoy-deployment.golden.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
app: synapse
2626
component: synapse-client-reader-envoy
2727
annotations:
28-
checksum/config: b920eabb52c0c24570a7c5f4dca8397c0e35f06d29459d91b7e723ebd82da5bd
28+
checksum/config: 7744c508a75509a4e4500af09f8b754d2afa52372ffef03ad95c19cd4bb9d7c3
2929
spec:
3030
terminationGracePeriodSeconds: 60
3131
containers:

charts/synapse/tests/golden/fixtures/test-synapse-secret-no-pgbouncer-stream-writers.golden.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ stringData:
223223
msc3967_enabled: true
224224
caches:
225225
expire_caches: true
226-
global_factor: 0.5
226+
global_factor: 1
227227
cache_entry_ttl: 30m
228228
sync_response_cache_duration: 2m
229229
cache_autotuning:
@@ -473,7 +473,7 @@ stringData:
473473
msc3967_enabled: true
474474
caches:
475475
expire_caches: true
476-
global_factor: 0.5
476+
global_factor: 1
477477
cache_entry_ttl: 30m
478478
sync_response_cache_duration: 2m
479479
cache_autotuning:
@@ -731,7 +731,7 @@ stringData:
731731
msc3967_enabled: true
732732
caches:
733733
expire_caches: true
734-
global_factor: 0.5
734+
global_factor: 1
735735
cache_entry_ttl: 30m
736736
sync_response_cache_duration: 2m
737737
cache_autotuning:
@@ -996,7 +996,7 @@ stringData:
996996
msc3967_enabled: true
997997
caches:
998998
expire_caches: true
999-
global_factor: 0.5
999+
global_factor: 1
10001000
cache_entry_ttl: 30m
10011001
sync_response_cache_duration: 2m
10021002
cache_autotuning:
@@ -1261,7 +1261,7 @@ stringData:
12611261
msc3967_enabled: true
12621262
caches:
12631263
expire_caches: true
1264-
global_factor: 0.5
1264+
global_factor: 1
12651265
cache_entry_ttl: 30m
12661266
sync_response_cache_duration: 2m
12671267
cache_autotuning:
@@ -1519,7 +1519,7 @@ stringData:
15191519
msc3967_enabled: true
15201520
caches:
15211521
expire_caches: true
1522-
global_factor: 0.5
1522+
global_factor: 1
15231523
cache_entry_ttl: 30m
15241524
sync_response_cache_duration: 2m
15251525
cache_autotuning:
@@ -1784,7 +1784,7 @@ stringData:
17841784
msc3967_enabled: true
17851785
caches:
17861786
expire_caches: true
1787-
global_factor: 0.5
1787+
global_factor: 1
17881788
cache_entry_ttl: 30m
17891789
sync_response_cache_duration: 2m
17901790
cache_autotuning:
@@ -2048,7 +2048,7 @@ stringData:
20482048
msc3967_enabled: true
20492049
caches:
20502050
expire_caches: true
2051-
global_factor: 0.5
2051+
global_factor: 1
20522052
cache_entry_ttl: 30m
20532053
sync_response_cache_duration: 2m
20542054
cache_autotuning:
@@ -2308,7 +2308,7 @@ stringData:
23082308
msc3967_enabled: true
23092309
caches:
23102310
expire_caches: true
2311-
global_factor: 0.5
2311+
global_factor: 1
23122312
cache_entry_ttl: 30m
23132313
sync_response_cache_duration: 2m
23142314
cache_autotuning:
@@ -2568,7 +2568,7 @@ stringData:
25682568
msc3967_enabled: true
25692569
caches:
25702570
expire_caches: true
2571-
global_factor: 0.5
2571+
global_factor: 1
25722572
cache_entry_ttl: 30m
25732573
sync_response_cache_duration: 2m
25742574
cache_autotuning:
@@ -2833,7 +2833,7 @@ stringData:
28332833
msc3967_enabled: true
28342834
caches:
28352835
expire_caches: true
2836-
global_factor: 0.5
2836+
global_factor: 1
28372837
cache_entry_ttl: 30m
28382838
sync_response_cache_duration: 2m
28392839
cache_autotuning:
@@ -3098,7 +3098,7 @@ stringData:
30983098
msc3967_enabled: true
30993099
caches:
31003100
expire_caches: true
3101-
global_factor: 0.5
3101+
global_factor: 1
31023102
cache_entry_ttl: 30m
31033103
sync_response_cache_duration: 2m
31043104
cache_autotuning:
@@ -3348,7 +3348,7 @@ stringData:
33483348
msc3967_enabled: true
33493349
caches:
33503350
expire_caches: true
3351-
global_factor: 0.5
3351+
global_factor: 1
33523352
cache_entry_ttl: 30m
33533353
sync_response_cache_duration: 2m
33543354
cache_autotuning:
@@ -3613,7 +3613,7 @@ stringData:
36133613
msc3967_enabled: true
36143614
caches:
36153615
expire_caches: true
3616-
global_factor: 0.5
3616+
global_factor: 1
36173617
cache_entry_ttl: 30m
36183618
sync_response_cache_duration: 2m
36193619
cache_autotuning:
@@ -3871,7 +3871,7 @@ stringData:
38713871
msc3967_enabled: true
38723872
caches:
38733873
expire_caches: true
3874-
global_factor: 0.5
3874+
global_factor: 1
38753875
cache_entry_ttl: 30m
38763876
sync_response_cache_duration: 2m
38773877
cache_autotuning:
@@ -4129,7 +4129,7 @@ stringData:
41294129
msc3967_enabled: true
41304130
caches:
41314131
expire_caches: true
4132-
global_factor: 0.5
4132+
global_factor: 1
41334133
per_cache_factors:
41344134
does_pair_of_users_share_a_room: 5.0
41354135
get_unread_event_push_actions_by_room_for_user: 10.0
@@ -4397,7 +4397,7 @@ stringData:
43974397
msc3967_enabled: true
43984398
caches:
43994399
expire_caches: true
4400-
global_factor: 0.5
4400+
global_factor: 1
44014401
cache_entry_ttl: 30m
44024402
sync_response_cache_duration: 2m
44034403
cache_autotuning:
@@ -4662,7 +4662,7 @@ stringData:
46624662
msc3967_enabled: true
46634663
caches:
46644664
expire_caches: true
4665-
global_factor: 0.5
4665+
global_factor: 1
46664666
cache_entry_ttl: 30m
46674667
sync_response_cache_duration: 2m
46684668
cache_autotuning:
@@ -4927,7 +4927,7 @@ stringData:
49274927
msc3967_enabled: true
49284928
caches:
49294929
expire_caches: true
4930-
global_factor: 0.5
4930+
global_factor: 1
49314931
cache_entry_ttl: 30m
49324932
sync_response_cache_duration: 2m
49334933
cache_autotuning:
@@ -5185,7 +5185,7 @@ stringData:
51855185
msc3967_enabled: true
51865186
caches:
51875187
expire_caches: true
5188-
global_factor: 0.5
5188+
global_factor: 1
51895189
cache_entry_ttl: 30m
51905190
sync_response_cache_duration: 2m
51915191
cache_autotuning:

0 commit comments

Comments
 (0)