mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-20 17:11:31 -08:00
Merge pull request #1557 from element-hq/bbz/redis-recreate
Only run a single Redis Pod
This commit is contained in:
3 files changed
+15
No files matched your search
@@ -19,10 +19,14 @@ selector:
|
||||
app.kubernetes.io/instance: {{ $root.Release.Name }}-{{ $nameSuffix }}
|
||||
{{- if eq "Deployment" $kind }}
|
||||
strategy:
|
||||
{{- if ne "redis" $nameSuffix }}
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 2
|
||||
maxUnavailable: {{ min (max 0 (sub .replicas 1)) 1 }}
|
||||
{{- else }}
|
||||
type: Recreate
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
serviceName: {{ $root.Release.Name }}-{{ $serviceNameSuffix }}
|
||||
updateStrategy:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Fix there being multiple independent Redis `Pods` running during upgrades.
|
||||
@@ -30,6 +30,12 @@ async def test_deployments_statefulsets_have_replicas_by_default(values, templat
|
||||
)
|
||||
|
||||
if pod_template_details.manifest["kind"] == "Deployment":
|
||||
if deployable_details.name == "redis":
|
||||
assert manifest_spec["strategy"]["type"] == "Recreate"
|
||||
assert "rollingUpdate" not in manifest_spec["strategy"]
|
||||
continue
|
||||
|
||||
assert manifest_spec["strategy"]["type"] == "RollingUpdate"
|
||||
max_unavailable = manifest_spec["strategy"]["rollingUpdate"]["maxUnavailable"]
|
||||
if expected_replicas > 1:
|
||||
assert max_unavailable == 1, (
|
||||
@@ -64,6 +70,10 @@ async def test_deployments_statefulsets_respect_replicas(values, make_templates)
|
||||
)
|
||||
|
||||
if pod_template_details.manifest["kind"] == "Deployment":
|
||||
if deployable_details.name == "redis":
|
||||
assert "rollingUpdate" not in manifest_spec["strategy"]
|
||||
continue
|
||||
|
||||
max_unavailable = manifest_spec["strategy"]["rollingUpdate"]["maxUnavailable"]
|
||||
if deployable_details.is_singleton:
|
||||
assert max_unavailable == 0, (
|
||||
|
||||
Reference in new issue
Block a user