Skip to main content

Chart maintainer guide

Template files

TemplateWhat it creates
deployment.yamlDeployment
statefulset.yamlStatefulSet
cronjob.yamlCronJob
service.yamlService per workload
route.yamlOpenShift Route
ingress.yamlIngress
hpa.yamlHorizontalPodAutoscaler
keda.yamlKEDA ScaledObject / ScaledJob
pdb.yamlPodDisruptionBudget
scc.yamlOpenShift SCC binding
certificate.yamlcert-manager Certificate
configmap.yamlConfigMap
secret.yamlSecret
sealedsecret.yamlSealedSecret
pvc.yamlPersistentVolumeClaim
persistentvolume.yamlPersistentVolume
serviceaccount.yamlServiceAccount
rbac.yamlRole + RoleBinding
extra-manifests.yamlFree-form extra manifests
_helpers.tplShared template helpers

How workload templates work

All workload templates iterate over their list and output one resource per item:

{{- range .Values.deployments }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .name }}
...
{{- end }}

Inside the loop, use .key to access the current item and $.key (with $) to access root scope — for example $.Release.Name or $.Values.globalKey.

Testing

# Lint
helm lint base-chart/

# Render with a values file
helm template my-app base-chart/ -f test-values.yaml

# Render only one template
helm template my-app base-chart/ -f test-values.yaml \
--show-only templates/deployment.yaml

Adding a new template

  1. Create base-chart/templates/my-resource.yaml.
  2. Iterate over the relevant list (deployments, statefulsets, cronjobs, or a new global list).
  3. Gate the output on an enabled flag so nothing is created by default:
    {{- if and .myResource .myResource.enabled }}
    ---
    ...
    {{- end }}
  4. Add the new key with a disabled default to base-chart/values.yaml.
  5. Document the new key in the Values reference.

Bumping the chart version

Edit base-chart/Chart.yaml:

version: 1.1.0   # bump this

Then publish to the OCI registry and update ociChartVersion in the UI chart config (ui/docs/src/app/charts/base-chart-1.0.0.js → create a new version file).