pub struct PlacementConfig {
pub spread: Option<Vec<SpreadRule>>,
}Expand description
Topology spreading for the Pods backing a DNS server.
Controls how nameservers are distributed across failure domains, so a zone (or rack, or whatever your cluster labels nodes with) going down cannot take out every authoritative server at once.
placement can be set at two levels, resolved highest-priority first:
Bind9Instance.spec.placement— one specific DNS serverspec.primary.placement/spec.secondary.placement— one role, on the owningBind9ClusterorClusterBind9Provider
Resolution is whole-block: the more specific level wins outright rather than merging field-by-field, so what will be scheduled is answerable by reading one block.
§Scope
This type deliberately covers only topology spreading. It is not a
general pod-spec passthrough: nodeSelector, tolerations, and affinity
are not accepted here. Embedding the full Kubernetes Affinity and
Toleration schemas inflated the generated CRDs by roughly 450KB and would
have handed a namespace tenant the scheduling primitives needed to place an
operator-credentialed Pod onto a control-plane node — a large validation and
security surface for a feature whose job is zone spreading. See
docs/adr/0003-pod-placement-and-zone-spreading.md.
§Example
placement:
spread:
- topologyKey: failure-domain.acme.io/rack
maxSkew: 1
whenUnsatisfiable: DoNotScheduleFields§
§spread: Option<Vec<SpreadRule>>Topology spread rules applied to the Pods of this DNS server.
Three distinct states:
- absent — for a primary role with two or more servers, the
operator applies its default: one soft (
ScheduleAnyway) rule overtopology.kubernetes.io/zonewithmaxSkew: 1. Secondaries and single-server roles get no constraint unless you ask for one. - empty list (
spread: []) — explicitly no spread constraints. Use this to opt a multi-primary cluster out of the default. - non-empty list — exactly these rules, and no default. This is how secondaries opt in.
At most 8 rules; each becomes one topologySpreadConstraint, and every
constraint is re-evaluated on each scheduling attempt.
Trait Implementations§
Source§impl Clone for PlacementConfig
impl Clone for PlacementConfig
Source§fn clone(&self) -> PlacementConfig
fn clone(&self) -> PlacementConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlacementConfig
impl Debug for PlacementConfig
Source§impl Default for PlacementConfig
impl Default for PlacementConfig
Source§fn default() -> PlacementConfig
fn default() -> PlacementConfig
Source§impl<'de> Deserialize<'de> for PlacementConfig
impl<'de> Deserialize<'de> for PlacementConfig
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 JsonSchema for PlacementConfig
impl JsonSchema for PlacementConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PlacementConfig
impl PartialEq for PlacementConfig
Source§impl Serialize for PlacementConfig
impl Serialize for PlacementConfig
impl StructuralPartialEq for PlacementConfig
Auto Trait Implementations§
impl Freeze for PlacementConfig
impl RefUnwindSafe for PlacementConfig
impl Send for PlacementConfig
impl Sync for PlacementConfig
impl Unpin for PlacementConfig
impl UnwindSafe for PlacementConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].