pub struct RepositoryHealthProbeSpec {
pub enabled: bool,
pub interval: Option<String>,
pub failure_threshold: Option<i64>,
}Expand description
Opt-in backend health probe, shared by Repository and ClusterRepository.
Once a repository reaches Ready, the operator trusts that pinned status and
— for object-store / volume-backed backends — never re-checks the backend on
its steady-state heartbeat. If the kopia repository is wiped or becomes
unreachable, nothing notices until a backup runs and fails. Enabling this
probe re-connects the backend every interval and surfaces
the result as a condition + Warning event (the repository stays Ready —
this is alert-only; it never auto-recreates and never pauses backups).
Alert-only by design. A wiped repository and a transient outage look alike, and silently recreating an empty repository over a real one destroys restorability — so the probe only reports. Acting on the alert (a deliberate re-create) is a human decision.
Fields§
§enabled: boolTurn the probe on. Off by default — existing repositories keep their current behavior until a user opts in.
interval: Option<String>How often to re-probe the backend (Go-style duration like 30m or 1h;
minimum 30s, default 30m). Inert unless enabled.
failure_threshold: Option<i64>How many consecutive failing probes to require before raising the loud
condition + event (default 3). Debounces a single transient blip from
alarming or nudging a destructive manual recreate. Any success resets it.
Implementations§
Source§impl RepositoryHealthProbeSpec
impl RepositoryHealthProbeSpec
Sourcepub fn enabled(health: Option<&RepositoryHealthSpec>) -> bool
pub fn enabled(health: Option<&RepositoryHealthSpec>) -> bool
Whether the backend health probe is opted in (spec.health.probe.enabled).
Off by default, so an existing Ready repository keeps its behavior.
Sourcepub fn effective_interval(health: Option<&RepositoryHealthSpec>) -> Duration
pub fn effective_interval(health: Option<&RepositoryHealthSpec>) -> Duration
The effective probe cadence used when the probe is enabled:
interval when set and parseable, else DEFAULT_HEALTH_PROBE_INTERVAL.
(The webhook rejects an unparseable value, so the fallback only covers
objects admitted before the validator existed.)
Sourcepub fn effective_failure_threshold(health: Option<&RepositoryHealthSpec>) -> i64
pub fn effective_failure_threshold(health: Option<&RepositoryHealthSpec>) -> i64
The effective consecutive-failure threshold before the loud condition is
raised: failureThreshold when set (clamped to at least 1), else
DEFAULT_HEALTH_PROBE_FAILURE_THRESHOLD.
Trait Implementations§
Source§impl Clone for RepositoryHealthProbeSpec
impl Clone for RepositoryHealthProbeSpec
Source§fn clone(&self) -> RepositoryHealthProbeSpec
fn clone(&self) -> RepositoryHealthProbeSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RepositoryHealthProbeSpec
impl Debug for RepositoryHealthProbeSpec
Source§impl Default for RepositoryHealthProbeSpec
impl Default for RepositoryHealthProbeSpec
Source§fn default() -> RepositoryHealthProbeSpec
fn default() -> RepositoryHealthProbeSpec
Source§impl<'de> Deserialize<'de> for RepositoryHealthProbeSpec
impl<'de> Deserialize<'de> for RepositoryHealthProbeSpec
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 RepositoryHealthProbeSpec
impl JsonSchema for RepositoryHealthProbeSpec
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 RepositoryHealthProbeSpec
impl PartialEq for RepositoryHealthProbeSpec
Source§fn eq(&self, other: &RepositoryHealthProbeSpec) -> bool
fn eq(&self, other: &RepositoryHealthProbeSpec) -> bool
self and other values to be equal, and is used by ==.impl Eq for RepositoryHealthProbeSpec
impl StructuralPartialEq for RepositoryHealthProbeSpec
Auto Trait Implementations§
impl Freeze for RepositoryHealthProbeSpec
impl RefUnwindSafe for RepositoryHealthProbeSpec
impl Send for RepositoryHealthProbeSpec
impl Sync for RepositoryHealthProbeSpec
impl Unpin for RepositoryHealthProbeSpec
impl UnsafeUnpin for RepositoryHealthProbeSpec
impl UnwindSafe for RepositoryHealthProbeSpec
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&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<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