Skip to main content

Crate tatara_process

Crate tatara_process 

Source
Expand description

Process CRD — the K8s-as-Unix-processes wire format.

A Process is one element of the tatara convergence lattice. Clusters, HelmReleases, migrations, tests — all are Processes. The reconciliation loop is Unix: fork → exec → wait → exit → reap.

Modules§

allocation
EphemeralAllocation CRD — a typed request for a pool member.
annotations
Annotation keys the reconciler reads/writes on owned FluxCD resources.
attestation
Three-pillar BLAKE3 attestation — wire-compatible with tatara_engine::domain::attestation::ConvergenceAttestation.
boundary
Boundary conditions — predicates that gate phase transitions.
classification
The six classification dimensions — CRD-facing with JsonSchema, From/Into bridges to tatara_core::domain::classification.
compliance
Compliance bindings — CRD-facing with bridges to tatara_core::compliance_binding.
crd
The Process CRD — tatara.pleme.io/v1alpha1.
encapsulates
EncapsulatesSpec — how a Process relates to pre-existing in-cluster state.
env
EphemeralEnvId — the typed, validate-by-construction identity of an ephemeral environment (the Dev-Loop “EnvId” keystone; Confluence “9 · Ephemeral Environments”).
ephemeral
EphemeralSpec — the operator-facing typed surface for ephemeral Aplicacao installations.
export
ExportSpec — what an ephemeral Process is allowed to leave behind.
flux_resource
Closed-set of FluxCD resource kinds emitted or consumed by the tatara reconciler + typed projections for their (apiVersion, kind) pair — the substrate primitive that owns the workspace-wide (variant → wire-form identity) mapping every Flux-facing site would otherwise restate by hand.
hostname
Hostname helpers — typed FQDN formatting matching nix/lib/fleet- domains.nix’s mkHostname pattern.
identity
Content-addressable identity — deterministic naming from spec.
intent
Intent — where the rendered artifacts come from.
k8s_builtin_resource
Closed-set of K8s built-in resource kinds tatara-reconciler emits or fetches at the wire + typed projections for their (apiVersion, kind) pair — the substrate primitive that owns the workspace-wide (variant → wire-form identity) mapping every K8s-builtin-facing site in the reconciler would otherwise restate by hand.
k8s_object_ref
K8sObjectRef — typed 3-slot (kind, name, namespace) cross- resource reference, and the composer that emits the canonical { "kind": …, "name": …, "namespace": … } JSON pointer one K8s resource carries at a sourceRef / chartRef / equivalent slot to point at another K8s resource.
k8s_wire_identity
K8sWireIdentity — typed pair carrying a K8s resource’s (apiVersion, kind) wire-form identity + a composer that seeds a resource JSON with those two slots pre-set — the substrate primitive that owns the workspace-wide “the emit site names its resource kind exactly once” invariant.
lifetime
Process lifetime — Permanent (re-converging) vs Ephemeral (auto-SIGTERM on Attested / TTL / Failed).
lifetime_clock
Ephemeral lifetime clock — TTL expiry + teardown-policy decisions.
matrix
EnvMatrixSpec — the ephemeral-environment permutation generator.
phase
Unix process phases — authoritative state machine.
pool
EphemeralPool CRD — a population of warm, pre-attested ephemeral Processes that get allocated to requestors (e.g., a GitHub PR flow) on demand and returned (per a typed policy) when the requestor releases them.
prelude
receipt
tatara-receipt/v1 — the typed receipt envelope every pleme-io Job emits to prove its work was done.
routing
RoutingSpec — declared DNS + Ingress edges this Process exposes.
routing_edge_resource
Closed-set of routing-edge K8s resource kinds emitted by the tatara reconciler’s render_routing pipeline + typed projections for their (apiVersion, kind) pair — the substrate primitive that owns the workspace-wide (variant → wire-form identity) mapping every routing-edge site would otherwise restate by hand.
schema_helpers
Shared schemars helpers — emit OpenAPI schemas Kubernetes accepts. Free-form serde_json::Value fields default to an empty schema in schemars, which the K8s API server rejects with “type: Required value: must not be empty for specified object fields”. The typed workaround is to emit {type: object, x-kubernetes-preserve-unknown- fields: true} — same shape kube-rs’s own helpers produce.
signal
First-class CRD signals — Unix semantics over Kubernetes.
spec
ProcessSpec sub-structures — IdentitySpec, DependsOn, SignalPolicy.
status
ProcessStatus sub-structures — conditions, checked boundaries, Flux refs.
table
ProcessTable — cluster-scoped /proc registry.
tagged_union
tagged_union::resolve — the typescape’s “exactly-one-Option” pattern, lifted to one source of truth.

Macros§

declare_tagged_union_error
Declare a sibling error carrier for a tagged-union .variant() site — the enum + TaggedUnionError impl in ONE authoring surface.
declare_tagged_union_impls
Declare the three-block impl stanza a tagged-union parent type publishes to the substrate — inherent .variant() forwarder + VariantSelector<Parent> impl on the sibling Kind + TaggedUnion impl on the parent — in ONE authoring surface.

Constants§

GROUP
CRD API group for every tatara CRD.
PROCESS_FINALIZER
Standard finalizer for the Process reconciler.
PROCESS_KIND
Kind spelling of the tatara Process CRD as it appears in a K8s OwnerReference.kind field. Peer to GROUP + VERSION — centralizes the ONE literal every SSA-time re-injection helper pre-lift restated by hand across tatara-reconciler (render.rs, edges.rs, ssapply.rs).
VERSION
CRD version for this module.

Functions§

api_version
Canonical <GROUP>/<VERSION> as an owned String — the ONE K8s apiVersion shape every tatara CRD stamps. Composed from GROUP + VERSION so a bump of either constant lands here exactly once; pre-lift, two tatara-reconciler sites hand-wrote format!("{}/{}", tatara_process::GROUP, tatara_process::VERSION) while a third inlined the literal "tatara.pleme.io/v1alpha1", opening a silent drift path if VERSION ever advances past v1alpha1.
compile_source
Compile a Lisp source string into a list of named ProcessSpecs. Each top-level (defpoint NAME …) form becomes one Definition.
owner_reference_json
Build a Kubernetes OwnerReference JSON blob pointing at a Process (kind = PROCESS_KIND, apiVersion = api_version) with controller: true + blockOwnerDeletion: true — the exact 6-slot shape every SSA re-injection site pre-lift restated three times across tatara-reconciler (render.rs::owner_refs for export-Job owners, edges.rs::build_owner_refs for Ingress + DNSEndpoint owners, ssapply.rs::build_owner_reference for the injected owner-ref stamped on every applied DynamicObject). Callers with a live Process value read metadata.{name,uid} and pass them through as &str.
owner_references_json
Substrate-primitive builder for a Process-owned resource’s metadata.ownerReferences array — the empty-uid-gated, single-entry Vec<Value> every emit site that lacks a fully materialized crate::prelude::Process (i.e. every site that works from a bare (name, uid) pair rather than routing through ssapply::build_owner_reference’s anyhow-guarded unwrap) hand-composed by wrapping owner_reference_json in a Vec::new() + is_empty gate on the uid slot.
register_all
Register every domain owned by this crate with the global Lisp dispatcher. Call once per binary, typically near the top of main. After this call, tatara_lisp::domain::lookup("defpoint") and lookup("defephemeral") both resolve to the right typed compiler.

Type Aliases§

Definition
A named ProcessSpec as produced by compile_source.