From 0ffaee801828ea078e931b1acb78de7cac0e0406 Mon Sep 17 00:00:00 2001 From: Jay Geng Date: Wed, 26 Nov 2025 11:15:24 -0500 Subject: [PATCH 1/2] Remove hardcoded node selector --- src/FSLibrary/StellarKubeSpecs.fs | 14 ++------------ .../templates/catchup_workers.yaml | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/FSLibrary/StellarKubeSpecs.fs b/src/FSLibrary/StellarKubeSpecs.fs index f4c4b434..37a06c42 100644 --- a/src/FSLibrary/StellarKubeSpecs.fs +++ b/src/FSLibrary/StellarKubeSpecs.fs @@ -372,7 +372,7 @@ let evenTopologyConstraints : V1TopologySpreadConstraint array = [| V1TopologySpreadConstraint( maxSkew = 1, topologyKey = "kubernetes.io/hostname", - whenUnsatisfiable = "DoNotSchedule", + whenUnsatisfiable = "ScheduleAnyway", labelSelector = V1LabelSelector(matchLabels = CfgVal.labels) ) |] @@ -414,18 +414,8 @@ type NetworkCfg with member self.Affinity() : V1Affinity option = let require = List.map requireNodeLabel self.missionContext.requireNodeLabels let avoid = List.map avoidNodeLabel self.missionContext.avoidNodeLabels - // If we're trying to do even scheduling, we need to provide extra - // anti-affinity from the master nodes, in order to make the even-spread - // topology constraint happy. If we're doing uneven scheduling the taint - // on the master nodes will suffice to avoid them. This is all fairly - // mysterious kubernetes lore, likely subject to change. let both = List.append require avoid - - if self.missionContext.unevenSched then - affinity both - else - let nonMaster = avoidNodeLabel ("node-role.kubernetes.io/control-plane", None) - affinity (nonMaster :: both) + affinity both member self.TopologyConstraints() : V1TopologySpreadConstraint array = if self.missionContext.unevenSched then [||] else evenTopologyConstraints diff --git a/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml b/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml index 178a7ddc..2e72e6a3 100644 --- a/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml +++ b/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml @@ -119,7 +119,7 @@ spec: # See https://github.com/stellar/supercluster/issues/330 maxSkew: 2 topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule + whenUnsatisfiable: ScheduleAnyway {{- end }} --- apiVersion: v1 From 35097c6989e1a31c30e285c85cab5b97119243ed Mon Sep 17 00:00:00 2001 From: Jay Geng Date: Wed, 26 Nov 2025 11:26:04 -0500 Subject: [PATCH 2/2] fixup! Remove hardcoded node selector --- .../parallel_catchup_helm/templates/catchup_workers.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml b/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml index 2e72e6a3..178a7ddc 100644 --- a/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml +++ b/src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml @@ -119,7 +119,7 @@ spec: # See https://github.com/stellar/supercluster/issues/330 maxSkew: 2 topologyKey: kubernetes.io/hostname - whenUnsatisfiable: ScheduleAnyway + whenUnsatisfiable: DoNotSchedule {{- end }} --- apiVersion: v1