pub struct TopologySpreadConstraint {
pub label_selector: Option<LabelSelector>,
pub max_skew: Option<i32>,
pub topology_key: Option<String>,
pub when_unsatisfiable: Option<String>,
}Fields§
§label_selector: Option<LabelSelector>§max_skew: Option<i32>MaxSkew describes the degree to which pods may be unevenly distributed. When whenUnsatisfiable=DoNotSchedule, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: +—––+—––+—––+ zone1 | zone2 | zone3 | +—––+—––+—––+ P | P | | +—––+—––+—––+ if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). if MaxSkew is 2, incoming pod can be scheduled onto any zone. When whenUnsatisfiable=ScheduleAnyway, it is used to give higher precedence to topologies that satisfy it. It’s a required field. Default value is 1 and 0 is not allowed.
topology_key: Option<String>TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. It’s a required field.
when_unsatisfiable: Option<String>+enum
Implementations§
Source§impl TopologySpreadConstraint
impl TopologySpreadConstraint
pub fn new() -> TopologySpreadConstraint
Trait Implementations§
Source§impl Clone for TopologySpreadConstraint
impl Clone for TopologySpreadConstraint
Source§fn clone(&self) -> TopologySpreadConstraint
fn clone(&self) -> TopologySpreadConstraint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TopologySpreadConstraint
impl Debug for TopologySpreadConstraint
Source§impl<'de> Deserialize<'de> for TopologySpreadConstraint
impl<'de> Deserialize<'de> for TopologySpreadConstraint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for TopologySpreadConstraint
Converts Query Parameters representation (style=form, explode=false) to a TopologySpreadConstraint value
as specified in https://swagger.io/docs/specification/serialization/
Should be implemented in a serde deserializer
impl FromStr for TopologySpreadConstraint
Converts Query Parameters representation (style=form, explode=false) to a TopologySpreadConstraint value as specified in https://swagger.io/docs/specification/serialization/ Should be implemented in a serde deserializer
Source§impl PartialEq for TopologySpreadConstraint
impl PartialEq for TopologySpreadConstraint
Source§impl Serialize for TopologySpreadConstraint
impl Serialize for TopologySpreadConstraint
Source§impl ToString for TopologySpreadConstraint
Converts the TopologySpreadConstraint value to the Query Parameters representation (style=form, explode=false)
specified in https://swagger.io/docs/specification/serialization/
Should be implemented in a serde serializer
impl ToString for TopologySpreadConstraint
Converts the TopologySpreadConstraint value to the Query Parameters representation (style=form, explode=false) specified in https://swagger.io/docs/specification/serialization/ Should be implemented in a serde serializer