Expand description
Substrate primitive for the merge-patch idiom over the /status
subresource of any kube Resource.
Owns the 2-link chain
let body = json!({ "status": <typed> });
api.patch_status(name, &PatchParams::default(), &Patch::Merge(&body)).awaitthat every controller-side writer hand-authored pre-lift at each phase-transition + observed-fanout site.
Sibling to the SSA-side substrate primitive
crate::api_version-adjacent tatara_reconciler::ssapply::apply_patch_params
(which owns the PatchParams::apply(<mgr>).force() peer on the
server-side-apply axis). Together, the two primitives own the two
wire-side write-posture axes the workspace’s controllers stamp:
Patch::Merge + PatchParams::default()— status-subresource writes, applied here by every phase-transition writer in thetatara-pool-reconciler(allocation controller, pool controller) and thetatara-reconciler(Process status writer).Patch::Apply + PatchParams::apply(<mgr>).force()— rendered FluxCD resource applies +RELEASED_FROMmarker + theProcessTable.status.claimswriter.
§Return type + #[must_use]
Returns the reconstructed K on success — matches Api::patch_status
verbatim. Pool + Process controllers today discard the returned K
(let _ = merge_status(...).await; after AllocationDecision /
phase-transition branches), but the primitive keeps the return in
the signature so a future writer that needs the reconciled
resource-version / observed-generation from the same wire round-trip
doesn’t have to re-fetch. #[must_use] on the returned Future
keeps a caller from building the patch call and dropping it
un-awaited — the same silent-drop defect the pre-lift free-chain
form quietly permitted.
Functions§
- apply
- Server-side-apply the caller-composed
bodyagainst the PRIMARY resource endpoint of any kubeResourceunderfield_managerwithforce = true. - apply_
patch_ params - Server-side-apply
PatchParamswithfield_managerbound to the caller-supplied slot andforce = true— the ONE substrate primitive owning thePatchParams::apply(<mgr>).force()incantation every workspace SSA writer restated by hand pre-lift. - merge
- Merge-patch the PRIMARY resource endpoint of any kube
Resourcewith a caller-composed wire body. - merge_
status - Merge-patch the
/statussubresource of any kubeResourcewith a typedstatusvalue. - merge_
status_ body - Compose the merge-patch wire body
{"status": <status>}— the pure stepmerge_statusperforms before handing off toApi::patch_status. - spec_
suspended_ body - Compose the merge-patch wire body
{"spec": {"suspended": <bool>}}— the SIGSTOP/SIGCONT-driven suspend/resume shape bothSignalEffect::SuspendandSignalEffect::Resumearms oftatara-reconciler::signals::consume_effectstamp on the Process spec.