Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/FSLibrary/StellarKubeSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ let evenTopologyConstraints : V1TopologySpreadConstraint array =
[| V1TopologySpreadConstraint(
maxSkew = 1,
topologyKey = "kubernetes.io/hostname",
whenUnsatisfiable = "DoNotSchedule",
whenUnsatisfiable = "ScheduleAnyway",
labelSelector = V1LabelSelector(matchLabels = CfgVal.labels)
) |]

Expand Down Expand Up @@ -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
Expand Down