Expand description
Workspace-canonical finalizer keys the tatara controllers stamp on their owned CRDs to gate cascade-delete + orphan-reap on graceful teardown.
§Family
The reconciler binaries in this workspace own three top-level CRDs
that participate in the K8s garbage-collection contract via the
metadata.finalizers list:
PROCESS— thecrate::prelude::Processreconciler’s finalizer key. Stamped bytatara-reconciler::phase_machine::handle_pendingvia [crate::patch::ensure_finalizer]; stripped byhandle_reapedviaremove_finalizer.ALLOCATION— thecrate::prelude::EphemeralAllocationcontroller’s finalizer key. Reserved bytatara-pool-reconciler::controller_allocation::reconcilefor the future Bound → Releasing → Released cascade-delete gate.POOL— thecrate::prelude::EphemeralPoolcontroller’s finalizer key. Reserved bytatara-pool-reconciler::controller_pool::build_member_processfor the future member-Process orphan-reap gate.
ALL enumerates the three consts in stable declaration order so
downstream sweeps (a fleet-wide finalizer audit binary, an ops
diagnostic dumping every tatara-owned finalizer on a cluster, a
per-key coverage report) iterate through ONE substrate slice
rather than three hand-typed literals.
§Peer axes
Peer to crate::annotations on the “K8s metadata key that pins
a reconciliation contract” axis-family — where crate::annotations
owns keys the reconciler READS or WRITES on OWNED resources
(FluxCD HelmRelease, Kustomization, member Process on a pool
member), this module owns keys the reconciler stamps on the CRDs
IT OWNS (the crate::prelude::Process,
crate::prelude::EphemeralAllocation,
crate::prelude::EphemeralPool metadata.finalizers list).
Both families carry the same tatara.pleme.io/<slug> wire-form
shape; the finalizer family additionally carries the shared
<owner>-finalizer suffix — a convention pinned by
[tests::all_carry_finalizer_suffix] so a future addition to the
family cannot silently drift the suffix.
§Compounding
Pre-lift the three wire-form finalizer literals were spread across
three files (the crate::PROCESS_FINALIZER top-level const at
crate + private POOL_FINALIZER / ALLOC_FINALIZER consts in
tatara-pool-reconciler), with no cross-owner coherence pin
binding the shared tatara.pleme.io/<x>-finalizer shape. A future
rename that shifted (e.g.) the group segment to v2/ or the
per-owner suffix to -guard had to be applied at three separate
files coherently — a partial edit would silently orphan or
double-finalize whichever owner missed the update. Post-lift the
three consts live at ONE substrate owner + one closed ALL
slice + four family-invariant pins (per-key wire-form parity,
per-key -finalizer suffix, per-key tatara.pleme.io/ prefix,
cross-key uniqueness).
Theory grounding: THEORY.md §VI.1 (generation over composition —
the tatara.pleme.io/<owner>-finalizer wire-form shape recurred
at THREE hand-authored declaration sites past the ★★
PRIME-DIRECTIVE ≥ 2 duplication threshold; lifted to ONE
per-owner const + ONE ALL slice + four family-invariant pins
here). THEORY.md §II.1 invariant 5 (composition preserves proofs
— the invariant pins bind the family shape at fail-before-pass-
after granularity; a future rename that drifted the group prefix
or the suffix at ONE arm surfaces at [tests::all_share_group_prefix]
or [tests::all_carry_finalizer_suffix] rather than as silent
operator-facing skew at whichever owner’s finalizer no longer
matches the K8s-side registered wire form).
Constants§
- ALL
- Closed family of tatara-owned finalizer keys in declaration
order:
PROCESS,ALLOCATION,POOL. Downstream sweeps (a per-owner coverage report, a fleet-wide finalizer audit binary, an ops diagnostic dumping every tatara-owned finalizer on a cluster) iterate through this ONE slice rather than re-listing the three consts by hand. - ALLOCATION
- Finalizer key reserved for the
crate::prelude::EphemeralAllocationcontroller (tatara-pool-reconciler::controller_allocation). Once the Bound → Releasing → Released cascade is wired the controller will stamp/strip this key through the same [crate::patch::ensure_finalizer] /remove_finalizerprimitives the Process reconciler already routes through forPROCESS. - FINALIZER_
SUFFIX - Shared owner-suffix every finalizer key in the
ALLfamily carries — the convention<owner>-finalizerdistinguishes a finalizer key from a signal/label/annotation key on the same group. Pinned across every arm by [tests::all_carry_finalizer_suffix]. - GROUP_
PREFIX - Shared group prefix every finalizer key in the
ALLfamily carries — the sametatara.pleme.io/group segment every tatara-owned CRD annotation + finalizer key rides through, matching the#[kube(group = "tatara.pleme.io", …)]derive slot on the CRD structs. Pinned across every arm by [tests::all_share_group_prefix] so a future rename of the group (a shift tov2/under a migration, a per-fleet override) lands at ONE substrate const here + the paired CRD derive slots rather than at three independent finalizer wire forms. - POOL
- Finalizer key reserved for the
crate::prelude::EphemeralPoolcontroller (tatara-pool-reconciler::controller_pool). Once the member-Process orphan-reap gate is wired the controller will stamp/strip this key at pool birth + pool teardown through the same [crate::patch::ensure_finalizer] /remove_finalizerprimitives. - PROCESS
- Finalizer key stamped on the
crate::prelude::Processmetadata.finalizerslist bytatara-reconciler::phase_machine::handle_pending. The reconciler blocks K8s garbage collection until it has emitted the terminalcrate::prelude::ProcessAttestationreceipt and stripped the finalizer athandle_reaped.