Skip to main content

topology_spread_min_domains

Function topology_spread_min_domains 

Source
pub(crate) fn topology_spread_min_domains(
    soft: bool,
    az_pinned: bool,
    min_domains: Option<i32>,
) -> Option<i32>
Expand description

Returns the minDomains value for a TopologySpreadConstraint.

minDomains must be suppressed when spread is soft (Kubernetes rejects minDomains with ScheduleAnyway) and when availability_zones is set (node affinity already constrains eligible domains; if minDomains exceeds the number of pinned zones the global minimum is treated as 0, causing all but one replica to remain pending with maxSkew=1).