Expand description
kube-rs controller wrapper for crate::LavaArchitectureSpec.
Compiled only when the controller feature is enabled. The
controller watches LavaArchitecture CRs in the cluster and
drives each one through crate::reconcile using a caller-
supplied synthesize callback. The callback is the seam through
which magma-lava (or the future in-process magma library) is
plugged in — keeps this module synthesis-engine-agnostic.
Structs§
- ConditionCR
- Context
- Per-controller shared context. The chain handle is
Arc<Mutex>so every reconcile pass appends through the same sink — across every LavaArchitecture CR on this operator instance, every receipt links to the same monotonic sequence. - Escalation
LadderCR - Escalation
TierCR - Lava
Architecture - Auto-generated derived type for LavaArchitectureSpecCR via
CustomResource - Lava
Architecture Dependency - Auto-generated derived type for LavaArchitectureDependencySpec via
CustomResource - Lava
Architecture Dependency Spec - Typed kube-rs CRD for
lava_dependency::LavaArchitectureDependency. - Lava
Architecture SpecCR - kube-rs typed shape. Mirrors
crate::LavaArchitectureSpecbut carries the#[derive(CustomResource)]plumbing kube-rs needs to dispatch the watch + patch loop. - Lava
Architecture StatusCR - Notify
TargetCR - Flat notify-target shape —
kindis a free string + remaining fields are optional. The lava-anomaly typed enum (Slack | Ntfy | Pagerduty | Email | Webhook | Custom) is reconstructed at use-site. Flat layout keeps the JsonSchema derivation simple (kube-rs apiextensions/v1 rejects tagged-enum CRDs with per-variant property schemas). - Remediation
Policy - Auto-generated derived type for RemediationPolicySpec via
CustomResource - Remediation
Policy Spec - Typed kube-rs CRD for
lava_anomaly::RemediationPolicy. Operators attach one of these per cluster (or per environment) and reference it fromLavaArchitectureSpecCR.remediationPolicyRef. - Resource
RefCR - SourceCR
- Flat source descriptor —
inline,name, and the three git fields are all optional + the consumer picks the populated one. Flat shape avoids kube-rs JsonSchema discriminated-union pitfalls
Enums§
Functions§
- error_
policy - phase_
str - Re-export of
Phase::as_strkept here for symmetry with the pre-M2 controller API. New code should usePhase::as_strdirectly. - reconcile_
one - Reconcile one resource. Drives the full 7-beat Viggy tick via
viggy_loop::LavaPromessaController+ViggyEngine, appends a signed receipt to the sharedOutcomeChain, and patches the resource’s.statusto reflect the typed tick outcome. - run
- Run the controller loop. Caller passes a synthesize callback that bridges to magma-lava (in-process) or shells out to tofu/terraform.
Type Aliases§
- Synthesize
Fn - Synthesize callback — caller supplies the real magma-lava bridge.
Returning Err is captured into a
FailedPhase + Condition by the reconcile loop.