Files
best-practices/helm.md
Paul O'Reilly 8aa400a5d4 distill: 49 best practices from 5 projects (2026-03-27..2026-04-05)
Add 37 new entries and update 7 existing entries across 13 topic files.
Major contributions from agent-runtimes (K8s secrets, CI, Docker gotchas),
cluster-bootstrap (ArgoCD SSA, etcd tuning, DB migrations, Compose networking),
and cluster-apps/octopus-deploy (Helm vs raw manifests, ArgoCD source types).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 01:10:07 +12:00

1.8 KiB

Helm Charts

Schema Validation

  • Always validate values against the chart schema before committing. Run helm show values <repo>/<chart> --version <ver> to check the actual structure.
  • Helm chart schemas change between versions — field names and nesting can differ from documentation or online examples.
  • A quick helm template test locally catches schema errors before deployment.
  • additionalProperties: false in chart schemas means any extra keys at the wrong nesting level cause a hard failure.

Version Verification

  • Run helm search repo or check upstream docs to confirm latest stable versions
  • Don't rely on memory for chart versions — they go stale quickly
  • Check compatibility matrices between chart version, app version, and other cluster components

Multi-Source Applications

  • ArgoCD multi-source Applications use $ref syntax to combine external Helm charts with Git-stored values files
  • Keep values files in Git alongside the ArgoCD Application manifest

Timeout Handling

  • Under cluster pressure (many events, etcd busy), default Helm timeouts may not be enough
  • Increase timeout for initial installs (e.g., 10m instead of 5m)
  • helm upgrade --install is idempotent — retries are safe

Prefer Raw Manifests Over Complex Helm Charts for Simple Workloads

When a Helm chart introduces infrastructure dependencies beyond the application itself (NFS servers, CSI drivers, pre-install hooks with trust bootstrapping, RWX PVC requirements), evaluate whether a raw Deployment or StatefulSet with environment variables would be simpler. Complex charts that bundle infrastructure assumptions are fragile on non-standard clusters. If the application image handles its own configuration via env vars, a raw manifest is often more reliable and debuggable.