Expand description
Substrate primitive for the delete-verb wire idiom over any kube
Resource.
Owns the 2-link chain
api.delete(&name, &DeleteParams::default()).awaitthat every controller-side writer hand-authored pre-lift at each reap / drain / SIGTERM-cascade / PR-close site.
Sibling to the wire-verb family already lifted in
crate::create and crate::patch. Together the three modules
own the three K8s HTTP verbs the workspace’s controllers stamp at
their idempotent-write sites:
crate::create::default— POST (create) withPostParams::default().crate::patch::merge/crate::patch::merge_status/crate::patch::apply_patch_params— PATCH (merge + SSA).default(this primitive) — DELETE withDeleteParams::default().
Pre-lift the 2-link api.delete(&name, &DeleteParams::default())
chain recurred at SEVEN hand-authored consumer sites across THREE
crates:
tatara-pool-reconciler::controller_pool::apply_pool_decisionPoolDecision::ReapExcessarm — the reap-excess Free-member DELETE.tatara-pool-reconciler::controller_pool::apply_pool_decisionPoolDecision::ReplaceMembersarm — the replace-member DELETE (respawn on next tick).tatara-pool-reconciler::controller_pool::apply_pool_decisionPoolDecision::Drainarm — the drain-all-members DELETE.tatara-pool-reconciler::controller_pool::apply_convergence_actionConvergenceAction::SignalSigtermarm — the desired-loop scale-down DELETE (SIGTERM oldest excess).tatara-pool-reconciler::controller_pool::apply_convergence_actionConvergenceAction::ReapFailedarm — the desired-loop reap-failed-member DELETE.tatara-reconciler::phase_machine(Exiting fan-out) — the SIGTERM-cascade child-DELETE that terminates every owned child Process before the parent’s Zombie transition.tatara-github-watcher::handler::handle_pr_event(PrAction::Closedarm) — the PR-close allocation DELETE (paired with thecrate::kube_error::is_not_found404-tolerance guard for idempotent re-delivery).
One of the seven pairs the delete call with the
crate::kube_error::is_not_found 404-tolerance guard already
lifted in crate::kube_error — the “delete-or-treat-404-as-ok”
compound the watcher stamps for idempotent PR-close re-delivery.
Post-lift both halves of that compound (default +
crate::kube_error::is_not_found) ride through ONE substrate
owner apiece so the compound reads exactly delete::default(&api, &name) → is_not_found at that callsite. The other six pool +
reconciler sites discard the result (let _ = process_api.delete (...)) — the finalizer / owner-ref cascade owns the eventual
outcome; a 404 there is already the terminal state the caller
wanted, and a transient error re-fires on the next reconcile tick.
§Naming
The primitive is named default — the DeleteParams::default()
slot is the axis it closes, mirroring crate::create::default
(which closes the peer PostParams::default() slot on the create
axis). A caller reads delete::default(&api, &name) and understands
they are dispatching through the default DeleteParams posture —
foreground / background / orphan cascade left to the K8s API
server’s default (Background for most resources), no
grace_period_seconds override, no preconditions on
resourceVersion or uid, no dry_run. A future write that needs
a bounded grace period (a SIGKILL-fast scale-down) or a
Foreground-cascade block (a delete-must-not-return-until-children-
are-gone posture) composes a bespoke DeleteParams at the callsite
rather than routing through this primitive — the primitive names
the DEFAULT posture, not the general-purpose DELETE builder.
Functions§
- default
- Delete a kube
Resourcethrough its namespaced or cluster-scopedApiwith the defaultDeleteParamsposture.