Skip to content

skillDevOps and cloudkubernetes

Helm Chart Authoring

Builds Helm charts with a small, documented values file, clean templates and a tested install, upgrade and rollback path.

npx workspacetemplates add helm-chart-authoring --tool claude-code

Writes 1 file to .claude/skills/helm-chart-authoring/

.claude/skills/helm-chart-authoring/SKILL.md30 lines · 1.6 KBFile
---
name: helm-chart-authoring
description: Builds Helm charts with a small, documented values file, clean templates and a tested install, upgrade and rollback path.
---

# Helm chart authoring

Design the values first, then the templates. Prove the upgrade path before you call it done.

## Steps

1. Run `helm create` only if there is no chart. Delete the sample files you will not use.
2. Write `values.yaml` for the user: few keys, sensible defaults, a `# --` comment on each, and nested groups such as `image`, `service`, `resources`, `ingress`. Add `values.schema.json` for types and required keys.
3. Keep templates plain. Put names and labels in `_helpers.tpl` and use the standard `app.kubernetes.io/*` labels. Use `include` and `nindent` correctly; avoid logic deeper than two levels of `if`.
4. Use `required` for settings with no safe default, and `toYaml` with `nindent` for passthrough blocks such as `resources`.
5. Add a checksum annotation of ConfigMaps and Secrets to the pod template so config changes roll the pods.
6. Verify:
   - `helm lint --strict`
   - `helm template` with defaults and with each example values file, then check the output with `kubeconform`
   - if a cluster exists (kind or minikube): `helm install`, `helm upgrade` with changed values, `helm rollback`, then `helm test`

## Rules

- Never hardcode namespaces; use `.Release.Namespace`.
- Never put secrets in default values.
- Do not change selector labels after a release; it breaks upgrades.

## Report

Chart layout, the values users should set, and the commands you ran with their results.

What it does

Many charts fail the same way: a values file with sixty options nobody understands, templates full of nested conditionals, and an upgrade that was never tried. This skill authors a chart from the other end. It starts with the few settings a user must change, and builds templates that follow from them.

Before it finishes, the agent lints the chart, renders it with several value sets, and runs an install followed by an upgrade on a local cluster when one is available.

Example

you › Package our API service as a Helm chart

agent › Created charts/api with 14 values (image, service, ingress, resources, env), a values schema, a checksum annotation for the ConfigMap and a test pod. helm lint --strict passes; rendered with default and production values; install, upgrade and rollback verified on a kind cluster.

Questions

Can it work without a running cluster?
Yes, linting and rendering need none. The upgrade test is skipped and the report says so.
Why a values schema?
It rejects a wrong type or a missing key at install time, with a clear message, instead of producing a broken manifest.
  • CI Pipeline Speedup

    SkillDevOps and cloud

    Free
  • Deployment Strategies

    SkillDevOps and cloud

    Free