Skip to main content

Module intent

Module intent 

Source
Expand description

Intent — where the rendered artifacts come from.

Exactly one field on Intent must be set. The reconciler’s RENDER phase selects a driver based on which variant is present:

  • nix: tatara-engine nix_eval → resources
  • flux: pass through an existing GitRepository
  • lisp: tatara-lisp reader + macroexpander → resources
  • container: emit Deployment/StatefulSet/etc directly (no Helm)
  • aplicacao: emit a FluxCD HelmRelease for a pleme-io typed Aplicacao chart (e.g. lareira-demo-app). This is the canonical handoff from caixa-shaped declarations to in-cluster reconciliation.
  • guest: tatara-hospedeiro supervises a Linux VM or WASM component. See tatara/docs/declarative-guests.md. The GuestSpec itself is type-erased here (JSON value) so tatara-process stays decoupled from tatara-vm; hospedeiro re-parses the value as GuestSpec on boot.

Structs§

AplicacaoIntent
Aplicacao intent — emit a FluxCD HelmRelease for a pleme-io typed Aplicacao chart. The chart owns its own sub-chart DAG; the reconciler only watches HelmRelease.status.conditions[type=Ready].
ContainerIntent
Container intent — direct Deployment/StatefulSet/etc, no Helm.
FluxIntent
FluxCD passthrough intent — reuse an existing GitRepository.
GuestIntent
Guest intent — the Process is a Linux VM or WASM component supervised by tatara-hospedeiro. See tatara/docs/declarative-guests.md.
HelmLifecyclePolicy
Typed shape of one Flux HelmRelease.spec.{install,upgrade} slot — the substrate’s projection of the “how long may Helm take, and how many retries after a failed run” contract every Helm-driven Process publishes on both slots. Pre-lift the reconciler’s render_aplicacao hand-authored the shape via TWO adjacent identical json!({"timeout": …, "remediation": {"retries": …}}) blocks past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold — one for install, one for upgrade, each restating the same three-slot literal with the same Option::unwrap_or_else fallback on the timeout. Post-lift the shape lives at ONE named typed struct here whose serde projection matches Flux HelmRelease v2’s install / upgrade block schema byte-identically, and the reconciler composes both slots off ONE AplicacaoIntent::helm_lifecycle_policy call.
HelmRemediationPolicy
Typed shape of one HelmLifecyclePolicy::remediation slot. A named struct rather than an inline {retries: u8} map so downstream consumers can talk about “one Helm remediation policy” as a nameable handle rather than an unnamed nested object.
Intent
Intent — exactly one variant should be populated.
LispIntent
Lisp-sourced intent — tatara-lisp reader + macroexpander produces resources.
NixIntent
Nix-sourced intent — tatara-engine’s nix_eval driver produces resources.
UnknownIntentKind
UnknownWorkloadKind

Enums§

IntentError
IntentKind
Closed-set discriminator over Intent’s six tagged-union slots. Single source of truth that drives Intent::variant’s ambiguity
IntentVariant
Enum view over the populated variant — convenience for the reconciler.
WorkloadKind
K8s workload kind the container intent renders into. PascalCase values match the K8s kind: field on the emitted manifest verbatim, so as_str doubles as the canonical kind: projection at render time.

Constants§

FLUX_HELM_DEFAULT_INTERVAL
Workspace-wide default for the reconcile-loop cadence on both Flux resources a Helm-driven AplicacaoIntent publishes today: the OCIRepository.spec.interval on the source side (how often the source-controller re-pulls the chart from OCI) and the HelmRelease.spec.interval on the release side (how often the helm-controller re-reconciles the release against the chart). The fleet convention ties both cadences to the same 5m string today, so the substrate exposes ONE named const rather than two literals sprayed across render_aplicacao.
HELM_LIFECYCLE_DEFAULT_RETRIES
Workspace-wide default for the remediation.retries slot on a Flux HelmRelease.spec.{install,upgrade} block. Constant across both slots today; a future two-slot split (e.g. distinct retry budgets for a first install vs a rolling upgrade) lands as two consts here + a two-slot HelmLifecyclePolicy shape, not at the render callsite.
HELM_LIFECYCLE_DEFAULT_TIMEOUT
Workspace-wide default for the timeout slot on a Flux HelmRelease.spec.{install,upgrade} block, applied when the operator did not populate AplicacaoIntent::install_timeout. Load-bearing on the reconciler’s Helm-driven RENDER surface — AplicacaoIntent::helm_lifecycle_policy substitutes this exact string, and the reconciler’s render_aplicacao byte-installs the resulting policy into both install AND upgrade slots.