pub enum ValidationError {
ClusterRepoNamespaceForbidden {
namespace: String,
},
ConsumerNamespaceNotAllowed {
namespace: String,
repo: String,
},
DiscoveredMustRetain {
got: String,
},
RestoreSourceRepositoryRequired,
InlineRetentionForbidden {
field: String,
},
InvalidCron {
expr: String,
reason: String,
},
MutuallyExclusive {
a: String,
b: String,
context: String,
},
MissingRequiredField {
field: String,
},
IdentityTemplateRender {
reason: String,
},
SelectorLabelsUnavailable {
namespace: String,
repo: String,
},
MaintenanceNamespaceOnNamespacedRepo {
namespace: String,
},
}Expand description
A single cross-field validation failure. PartialEq so tests can assert the
exact variant; messages are written for an end user reading a rejected apply.
Variants§
ClusterRepoNamespaceForbidden
A Repository/ClusterRepository’s own credential refs, or a consumer’s
repository.namespace, set a namespace that the variant forbids.
For kind: ClusterRepository, repository.namespace MUST be absent
(ADR §3.2/§3.3) — the reference is cluster-scoped by name alone.
ConsumerNamespaceNotAllowed
A consumer namespace is not permitted by the target ClusterRepository’s
allowedNamespaces tenancy gate (ADR §3.2/§4.3).
Fields
DiscoveredMustRetain
A Backup with origin: discovered tried to set a deletionPolicy other
than Retain. Discovered snapshots are forced Retain so the operator
never deletes data it did not create (ADR §4.5).
RestoreSourceRepositoryRequired
A Restore with source.identity did not set spec.repository. Identity
sources cannot derive a repository, so it is required (ADR §3.6/§4.6).
InlineRetentionForbidden
A Repository/ClusterRepository spec carried kopia-side (repo-level)
retention policy fields, which conflict with CR-driven GFS retention and
risk double-deletion (ADR §4.4 exclusivity).
InvalidCron
A cron expression failed to parse with the same parser the controller uses at runtime, so it is rejected at apply time rather than at first reconcile (ADR §4.1).
Fields
MutuallyExclusive
Two fields that may not both be set were both set (e.g. a Source with
both pvc and pvcSelector).
Fields
MissingRequiredField
A required field (or “at least one of” surface) was empty.
IdentityTemplateRender
Rendering a ClusterRepository.identityDefaults template with tera failed
(ADR §4.2). Surfaced at admission so a bad template never reaches status.
A label selector was supplied as the tenancy gate but the caller could not provide the consumer namespace’s labels to match against. We fail closed (deny) rather than guess (ADR §3.2 — the webhook never trusts unfiltered input).
MaintenanceNamespaceOnNamespacedRepo
A namespaced Repository set spec.maintenance.namespace, which only
applies to a cluster-scoped ClusterRepository (a namespaced
Repository’s managed Maintenance always lives in the repository’s own
namespace). ADR §3.7.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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 ValidationError
impl PartialEq for ValidationError
impl Eq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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<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<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