Skip to main content

Module list

Module list 

Source
Expand description

Substrate primitive for the list-verb wire idiom over any kube Resource with the default (no-selector) ListParams posture.

Owns the 2-link chain

api.list(&ListParams::default()).await

that every controller-side reader hand-authored pre-lift at each cluster-wide / namespace-wide enumeration site.

Sibling to the wire-verb family already lifted in crate::create, crate::patch, and crate::delete. Together the four modules own the four K8s HTTP verbs the workspace’s controllers stamp at their idempotent-read / write sites:

Pre-lift the 2-link api.list(&ListParams::default()) chain recurred at FOUR hand-authored consumer sites across TWO crates (excluding label-scoped .labels(&selector) sites, which shape a distinct filter posture and belong on a peer primitive when they recur past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold):

  • tatara-reconciler::table_controller::reconcile — the cluster- wide Process enumeration the claim-arbiter walks to build one candidate row per (cluster, app) group.
  • tatara-reconciler::phase_machine (Exiting fan-out) — the cluster-wide Process enumeration the SIGTERM-cascade walks to find direct children of the exiting parent (filtered downstream by declared parent-PID rather than by a label selector).
  • tatara-pool-reconciler::controller_pool::reconcile_pool — the namespace-wide Process enumeration the pool controller walks to find its own owned members (filtered downstream by the tatara.pleme.io/pool annotation rather than by a label selector).
  • tatara-pool-reconciler::controller_allocation::reconcile_inner — the namespace-wide EphemeralPool enumeration the allocation controller walks to build a pool-name → members lookup.

Each site consumes the returned ObjectList<K> either through .items (the two full-list-then-iterate consumers) or through the outer map_err(anyhow::anyhow!(...))? chain before the .items read (the two error-wrapped consumers) — the primitive returns the ObjectList<K> verbatim so both consumer shapes ride unchanged.

§Naming

The primitive is named default — the ListParams::default() slot is the axis it closes, mirroring crate::create::default (which closes the peer PostParams::default() slot on the create axis) and crate::delete::default (which closes the peer DeleteParams::default() slot on the delete axis). A caller reads list::default(&api) and understands they are dispatching through the default ListParams posture — no label_selector, no field_selector, no resource_version continuation, no timeout, no limit page-cap. A future write that needs a label-scoped selector (a fleet-wide tatara.pleme.io/managed-by=… filter) or a bounded-page walk (a large-cluster paginated enumeration) composes a bespoke ListParams at the callsite rather than routing through this primitive — the primitive names the DEFAULT posture, not the general-purpose LIST builder.

Functions§

default
List every kube Resource through its namespaced or cluster-scoped Api with the default (no-selector) ListParams posture.
error_ctx
Compose the diagnostic-body head every namespace-scoped default failure wraps around the underlying kube::Error via crate::kube_error::KubeResultExt::kube_ctx_with.