It's Go under the braces
Helm templates are Go text/template: {{ .Values.device.address }}
is a pipeline walking a values object, _helpers.tpl holds the named
functions every manifest calls. You are not writing YAML - you are writing a program whose
output is YAML. So render locally, read the output, and lint what came out, not what went in.
Review the render, not just the template.
Field note. ArgoCD deploys charts by running
helm template - a pure render. Anything needing a live cluster or an
install lifecycle (lookup, hooks) is silently dead there. Render the
way your deployer renders.
Contexts: the cluster's whole voice is one small file
The chart owns everything structural - resources, probes, security, policy. Each cluster owns
one values file: names, addresses, sizes, flags. The context is deliberately values-only; the
moment it carries its own manifests there are two owners for one object, and they will
disagree. One value can feed many rendered artefacts - an address appearing in the app config,
the network attachment and two policies renders from one field, so the copies cannot diverge.
The chart owns the shape. The context owns the numbers.
Make the template refuse
A template that renders whatever it is given just moves the failure downstream. The grown-up
chart carries a values.schema.json: a context missing a required
value fails at render time, in the pipeline, with a message naming the field - not months
later as enforcement pointed at nothing.
Field note. The failure you want is the render that refuses. It
costs a red pipeline. The alternative reports healthy the whole time.
Fleet consistency is not a discipline problem, it is a construction
problem. Divergence stops being something you police and becomes something the tooling cannot
express.
Pre-reads: Course II ·
Kubernetes objects
Further: Helm docs ·
chart template guide ·
Go text/template ·
Helm on OpenShift