Complete helm toolkit with generation and validation capabilities
94
94%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
You are given the following Helm template file templates/configmap.yaml and the error output from helm template:
templates/configmap.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "app.fullname" . }}
labels:
{{ include "app.labels" . | indent 2 }}
data:
config.json: |
{
"environment": {{ .Values.environment }},
"replicas": {{ .Values.replicas | default 3 }}
}
database_url: {{ required "A database URL is required" .Values.databaseUrl }}Error output from helm template myapp ./chart:
Error: template: app/templates/configmap.yaml:7:5: executing "app/templates/configmap.yaml"
at <include "app.labels" . | indent 2>: error calling indent: wrong type for value; expected string; got interface {}values.yaml excerpt:
environment: production
replicas: 2
databaseUrl: ""Perform Stage 4 (Template Rendering) diagnosis and Stage 5 (YAML Syntax Validation) analysis.
Identify all issues in the template, including:
template vs include usage issue on line 3indent vs nindent usage issue on line 5environment on line 9required field evaluation with an empty string on line 12For each issue, provide:
Explain why fixes must be made in the source template, not the rendered output.