pub const FLUX_KEY_CHART: &str = "chart";Expand description
Canonical Flux v2 per-HelmRelease inline-chart-template container-axis
key every caixa-flux-emitted HelmRelease document nests its per-CR
chart-template block under (spec.chart on HelmRelease) — the Flux v2
CRD schema places the HelmChartTemplate sub-document (whose nested
spec.chart string names the referenced chart, spec.sourceRef names
the source-of-truth (kind, name, namespace) triple, and
spec.interval names the per-CR reconcile cadence) under this single
container key, so drift on the container axis silently dangles the
whole chart-template block the Flux v2 helm-controller’s per-CR
reconcile loop reads to source the referenced chart at Helm-render time
(a "Chart" / "chartTemplate" / "helmChart" / "chartRef" typo at
either the emit-side format-string template or a downstream test-
fixture probe silently dangles the HelmRelease.spec.chart chart-
template resolution at the Flux v2 helm-controller’s CRD registration;
the referenced chart never resolves, and the per-Servico workload
freezes at apply time with no field naming the container-axis-drift
root cause).
The single source of truth the rendered Flux bundle’s per-CR chart-template-container-axis-naming reaches for:
- the rendered
helmrelease.yamldocument’s per-HelmReleasespec.chartblock (caixa-flux/src/lib.rs — thecluster_bundlehelmreleaseformat-string template’s bakedchart:\ncontainer axis at line 914, sibling to the peer liftedFLUX_KEY_SOURCE_REFsource-reference container axis nested inside the same block +FLUX_KEY_VALUESper-cluster-override block-body axis at the siblingspec.valuesposition); - two test-side navigation sites in
mod teststhat probe the renderedhelmrelease.yamldocument’s.get("chart")container axis to reach the nestedspec.chart.spec.sourceRef.kindpin against the sibling liftedFLUX_KIND_GIT_REPOSITORYaxis (caixa-flux/src/lib.rs:2680, 2774).
The container-axis key names the same Flux-v2-helm-controller-side
per-HelmRelease chart-template container as the peer sibling per-CR
source-reference container-axis FLUX_KEY_SOURCE_REF nests under,
and must move together on any future Flux v3 rebrand (a hypothetical
upstream Flux v3 rename of the per-HelmRelease chart-template
container axis from chart to Chart / chartTemplate / helmChart
/ chartRef, coordinated with the upstream fluxcd/flux2 project’s
per-version deprecation cycle, would land at this one const rather
than scattered across the one per-CR format-string template + two
per-test-fixture probe sites).
The PRIME DIRECTIVE duplication-budget rule (THEORY.md §I.3.5,
“every recurring shape becomes a generator before it becomes a
pattern; every pattern becomes a library before it becomes
duplicated code. The duplication budget is zero.”) promotes the
constant to a typed substrate-side &'static str on the same
trajectory the FLUX_KEY_SOURCE_REF (e985089) /
FLUX_KEY_VALUES (b54dc87) lifts established on the sibling
canonical-Flux-v2-per-HelmRelease-body-key surfaces — completes the
triplet of Flux v2 per-HelmRelease spec.* body-key constants
(spec.chart + spec.chart.spec.sourceRef + spec.values) the
cluster_bundle renderer’s helmrelease.yaml format-string template
threads through its per-CR block-body layout.
The inner scalar-value axis spec.chart.spec.chart (the chart-name
leaf the HelmChartTemplate.spec sub-document mounts under; the same
spelling "chart" at a distinct schema position) is a schematically
separate leaf-scalar-key axis (the chart-NAME field the helm-controller
resolves through the sibling FLUX_KEY_SOURCE_REF triple’s source),
and is not covered by this lift — a rebrand of the container axis
(spec.chart in this const) does not necessarily coincide with a
rebrand of the leaf-scalar spec.chart.spec.chart chart-name field
key, so the two axes stay decoupled at the substrate.