Skip to main content

LAREIRA_CHART_NAME_PREFIX

Constant LAREIRA_CHART_NAME_PREFIX 

Source
pub const LAREIRA_CHART_NAME_PREFIX: &str = "lareira-";
Expand description

Canonical Helm chart-name prefix for every per-Servico chart the substrate emits — the "lareira-" segment of the well-known lareira-<nome> shape every caixa Servico renderer prepends to a caixa’s :nome to derive its Chart.yaml name: field, its OCI artifact reference (oci://<registry>/lareira-<nome>), and the resulting cluster-side HelmRelease release_name. The single source of truth all three downstream Servico renderers consult — caixa-helm’s render_chart_for_servico chart-dir name (caixa-helm/src/lib.rs:207), caixa-flux’s cluster_bundle HelmRelease chart: field (caixa-flux/src/lib.rs:329), and caixa-tatara’s process_for_aplicacao release_name + derive_chart_ref OCI ref (caixa-tatara/src/lib.rs:124,182) — so a future per-chart-name-prefix rebrand (e.g. moving to forno- once lareira- outlives its scoping intent, or any segment-namespace migration the chart-publishing pipeline requires) is a one-line edit here, not a coordinated rewrite across every renderer crate’s chart- name-derivation site.

Until this lift landed all three renderers carried inline format!("lareira-{}", caixa.nome) / format!("lareira-{name}") / format!("oci://{}/lareira-{}", registry, caixa.nome.as_str()) expressions — three verbatim copies of the same substrate-wide naming convention. The PRIME DIRECTIVE duplication budget of zero (THEORY.md §I.3.5) lands the lift here at the third occurrence: a future rebrand on any one site without a coordinated edit on the others would have silently published a chart at one name, registered its OCI ref at a second, and resolved the HelmRelease at a third — the cluster’s apply would surface as a chart pull failed: image not found error far from the source rebrand commit, with no field naming the prefix-drift root cause.

Lifting it to caixa-core’s render-constants block alongside the peer DEFAULT_NAMESPACE (a085b26) makes the chart-name-prefix axis discipline structural: every renderer that derives a per-Servico chart name consults lareira_chart_name, and every future renderer (the future per-cluster snapshot bundle emitter, the future M4 mesh.pleme.io/v1alpha1/Aplicacao CR materializer’s chart-ref slot, the future caixa-otel collector chart name) inherits the same prefix by construction, with no opportunity for per-renderer drift. Same “the typed constant lives in one place” discipline the PLEME_LABEL_PREFIX / DEFAULT_NAMESPACE / KUBE_KEY_API_VERSION lifts apply on the peer shared-string axes.