MAX_SPREAD_RULES

Constant MAX_SPREAD_RULES 

Source
pub const MAX_SPREAD_RULES: usize = 8;
Expand description

Maximum number of spread rules accepted on a single placement.spread.

Each rule becomes one topologySpreadConstraint on the Pod, and every constraint multiplies scheduler work per scheduling attempt. The cap keeps a malformed or hostile CR from degrading cluster-wide scheduling latency.

Kept in sync with the maxItems on PlacementConfig::spread in src/crd.rs, which is what actually enforces the limit at admission. This constant backs the reconcile-time backstop for clusters still running an older CRD revision.