Argo CD "helm template ... failed" manifest generation in CI
Argo CD renders Helm charts with helm template inside the repo-server. When that render fails, the Application reports a ComparisonError wrapping the exact helm error, so the chart never produces manifests to sync.
What this error means
The app condition shows "Manifest generation error" with a "helm template" failure such as a nil pointer in a template, a missing value, or an unbuilt chart dependency.
rpc error: code = Unknown desc = Manifest generation error (cached):
helm template . --name-template my-app failed exit status 1:
Error: template: mychart/templates/deploy.yaml:14:20: executing "..." at
<.Values.image.tag>: nil pointer evaluating interface {}.tagCommon causes
A required value is missing
A template references .Values.something that is not set, producing a nil pointer error at render time.
Chart dependencies were not built
Subcharts listed in Chart.yaml were never fetched, so the render fails on missing dependencies.
How to fix it
Render the chart the same way locally
- Reproduce with
helm templateusing the same values Argo CD passes. - Fix the missing value or template bug, or build chart dependencies.
- Push and hard-refresh so the cached generation error clears.
helm dependency build ./mychart
helm template ./mychart -f values-prod.yamlSet the values the template requires
Provide the missing values through the Application source so the render has everything it needs.
spec:
source:
helm:
valueFiles:
- values-prod.yamlHow to prevent it
- Run
helm templatewith production values in CI before Argo CD renders. - Commit built chart dependencies or build them in the pipeline.
- Guard templates with defaults so a missing value fails loudly, not silently.