pub enum PlacementRejection {
TooManySpreadRules {
count: usize,
},
InvalidTopologyKey {
index: usize,
key: String,
reason: &'static str,
},
DuplicateSpreadRule {
key: String,
when: String,
},
InvalidMaxSkew {
index: usize,
value: i32,
},
InvalidMinDomains {
index: usize,
value: i32,
},
MinDomainsRequiresHardConstraint {
index: usize,
},
}Expand description
Rejection reasons returned by validate_placement.
These are correctness checks, not security checks. Since placement
accepts topology spreading only, there is no scheduling primitive here that
could place a Pod somewhere it is not otherwise allowed — see the module
docs. Each variant carries enough context for the reconciler to render an
actionable Ready=False condition on the offending CR.
Most of these are also enforced structurally by the generated CRD schema
(maxItems, the topologyKey pattern, value ranges, and an
x-kubernetes-validations rule for the minDomains pairing), so they are
normally rejected at admission. This validator remains the backstop for
clusters running an older CRD revision, and covers the one rule a
structural schema cannot express cheaply: uniqueness across rules.
Variants§
TooManySpreadRules
InvalidTopologyKey
DuplicateSpreadRule
InvalidMaxSkew
InvalidMinDomains
MinDomainsRequiresHardConstraint
Trait Implementations§
Source§impl Debug for PlacementRejection
impl Debug for PlacementRejection
Source§impl Display for PlacementRejection
impl Display for PlacementRejection
Source§impl Error for PlacementRejection
impl Error for PlacementRejection
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl PartialEq for PlacementRejection
impl PartialEq for PlacementRejection
impl Eq for PlacementRejection
impl StructuralPartialEq for PlacementRejection
Auto Trait Implementations§
impl Freeze for PlacementRejection
impl RefUnwindSafe for PlacementRejection
impl Send for PlacementRejection
impl Sync for PlacementRejection
impl Unpin for PlacementRejection
impl UnwindSafe for PlacementRejection
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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].