From 02713d12be265f518d184d6134635f892d2ea109 Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Wed, 12 Nov 2025 16:21:33 +0000 Subject: [PATCH] Clarify that topologySpreadConstraints[].whenUnsatisfiable can be omitted too --- .../source/common/sub_schema_values.yaml.j2 | 2 +- charts/matrix-stack/values.yaml | 26 +++++++++---------- .../test_topology_spread_constraints.py | 1 - 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/charts/matrix-stack/source/common/sub_schema_values.yaml.j2 b/charts/matrix-stack/source/common/sub_schema_values.yaml.j2 index a1f98fc1..3a2315fa 100644 --- a/charts/matrix-stack/source/common/sub_schema_values.yaml.j2 +++ b/charts/matrix-stack/source/common/sub_schema_values.yaml.j2 @@ -402,7 +402,7 @@ clusterDomain: "cluster.local." {% macro topologySpreadConstraints(global=false, key='topologySpreadConstraints') %} ## TopologySpreadConstraints describes how Pods for {{ 'a' if global else 'this' }} component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details -## labelSelector can be omitted and the chart will populate a sensible value for {{ 'each' if global else 'this' }} component. +## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for {{ 'each' if global else 'this' }} component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for {{ 'each' if global else 'this' }} component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. diff --git a/charts/matrix-stack/values.yaml b/charts/matrix-stack/values.yaml index ceebfb65..ac047d7a 100644 --- a/charts/matrix-stack/values.yaml +++ b/charts/matrix-stack/values.yaml @@ -113,7 +113,7 @@ tolerations: [] ## TopologySpreadConstraints describes how Pods for a component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details -## labelSelector can be omitted and the chart will populate a sensible value for each component. +## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for each component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for each component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -259,7 +259,7 @@ initSecrets: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -399,7 +399,7 @@ deploymentMarkers: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -636,7 +636,7 @@ matrixRTC: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -907,7 +907,7 @@ matrixRTC: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -1143,7 +1143,7 @@ elementAdmin: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -1386,7 +1386,7 @@ elementWeb: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -1601,7 +1601,7 @@ haproxy: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -1901,7 +1901,7 @@ matrixAuthenticationService: ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -2220,7 +2220,7 @@ matrixAuthenticationService: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -2564,7 +2564,7 @@ postgres: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -4213,7 +4213,7 @@ synapse: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. @@ -4426,7 +4426,7 @@ synapse: tolerations: [] ## TopologySpreadConstraints describes how Pods for this component should be spread between nodes. ## https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ for in-depth details - ## labelSelector can be omitted and the chart will populate a sensible value for this component. + ## labelSelector & whenUnsatisfiable can be omitted and the chart will populate a sensible value for this component. ## Similarly `pod-template-hash` will be aded to `matchLabelKeys` if appropriate for this component. ## If any TopologySpreadConstraints are provided for a component any global TopologySpreadConstraints are ignored for that component. ## e.g. diff --git a/tests/manifests/test_topology_spread_constraints.py b/tests/manifests/test_topology_spread_constraints.py index 29bca5ca..097c0b92 100644 --- a/tests/manifests/test_topology_spread_constraints.py +++ b/tests/manifests/test_topology_spread_constraints.py @@ -30,7 +30,6 @@ async def test_topology_spread_constraint_has_default(values, make_templates): { "maxSkew": 1, "topologyKey": "kubernetes.io/hostname", - "whenUnsatisfiable": "DoNotSchedule", } ], )