ConfigHub · Durable config for coding agents
Docs / docs/your-own-chart.md Source on GitHub →

Your own Helm chart, step by step

This page is for a platform engineer who runs a vendor's Helm chart with values of their own, such as a pinned driver, a scrape path, or a replica count for a busy week. It shows how to keep those values, each with its reason, through the chart's next version. You see what the next version would change before you take it, and you end with plain files you can apply to a cluster or commit to Git.

The walkthrough take a platform's next version does the same with NVIDIA's GPU Operator, with every command and what it prints.

The problem this solves

A chart's next version can change or drop a setting your values depend on. For example, cert-manager 1.21.2 dropped the setting for the path its ServiceMonitor scrapes. You find out at upgrade time. Helm either refuses the old key, or quietly renders the chart without it. And the reason each of your values was set is usually in someone's head, not written down.

The words on this page, such as hub, base and change order, are explained in the glossary.

What you need

You do not need Helm itself.

Know these limits up front:

  • Scale: A single local hub comfortably holds about a dozen large charts; for larger estates (40+ releases), use a shared hub. Read-only Inventory has no 12-chart cap (and the PR review Action has no local-hub cap, rendering up to 12 Applications per single ApplicationSet and counting the rest).
  • How Helm fits: cub helm renders the chart once into ConfigHub Units (storing the chart + values beside them for future upgrades). Helm hooks are dropped, and no Helm release object is stored in the cluster. (Note: automated cub repo deploy-from-hub Git repointing is Kustomize-only; Stage 3 Helm OCI uses cub helm rendered Units.)

Managing 40+ Helm releases on Argo CD or Flux (3 non-disruptive stages)

ConfigHub's Config-as-Data model does not govern raw values-prod.yaml blindly while leaving Helm rendering opaque—Helm is a program that silently ignores misspelled keys (such as auth.passwrod) and synthesizes surprise objects (initContainers, RBAC, webhooks) that a values diff never reveals. Instead, the ConfigHub Workshop gives Argo CD / Flux Helm estates a clean 3-stage path without replacing your pipeline on day one:

StageScopeWhat runsHow Argo CD / Flux behave
Stage 1: Day-1 PR gate (all 40 releases)Read-only + CI/confighub:inventory (layered helm.valueFiles), cub config values / cub config diff (from the cub CLI — catches IGNORED/NO EFFECT keys on rendered objects), and review@v0 + CODEOWNERS (+ optional cub repo record-pr attestations into a shared hub).Unchanged. Git + Argo CD / Flux keep rendering and deploying; no local-hub 12-chart cap (review@v0 renders up to 12 Applications per ApplicationSet and counts the rest).
Stage 2: Classify by Flattening VerdictPer chartUse the ConfigHub Workshop flattening verdicts (born-flattened, safe-to-flatten, flatten-with-routes, unsafe-to-flatten — ~82% of audited Catalog bases are safe or routable to flatten).Unchanged. You decide chart-by-chart which charts flatten cleanly and which must render late.
Stage 3: Selective render-once + explicit render-lateApp by appsafe-to-flatten charts: render once with cub helm (<component>-helm holds chart + values; <component>-base holds rendered Units), derive dev/staging/prod variants, publish signed OCI releases. unsafe-to-flatten charts (live lookup(), heavy hooks): stay explicitly on the render-late lane.Argo CD v3.1+ / Flux pull approved OCI digests for flattened charts and keep rendering render-late Helm sources where needed.

The example uses the public podinfo chart. To do the same with your own chart, put your chart and values in its place.

Step 1: Put the chart, with your values, in the hub

cub-helm renders a chart on your machine and keeps the result in the hub, one Unit per resource. It keeps the chart and values beside the result, for later versions.

  1. Install cub-helm:
    cub plugin install confighub/cub-helm
  2. Write your values:
    cat > my-values.yaml <<'EOF2'
    replicaCount: 2
    ui:
      message: "Hello from our team"
    EOF2
  3. Render the chart into the hub:
    cub helm install podinfo oci://ghcr.io/stefanprodan/charts/podinfo --version 6.5.4 --values my-values.yaml

    This makes the Component podinfo, with two parts:

    • podinfo-base holds what the chart renders.
    • podinfo-helm holds the chart and the values it came from.

To see what cub helm install would render without writing anything, use cub helm template in its place.

Step 2: Make the copy that runs, and set a value of your own

The base follows the chart. What runs is a copy of the base, which keeps your own changes.

  1. Make the copy, live:
    cub variant create live podinfo-base
  2. Set 3 replicas in it, with your reason:
    cub repo set podinfo replicas 3 --variant live --change-desc "Three for the launch"

The 3 is now yours. A later version of the chart does not replace it, and your reason is kept beside it.

To set a field the chart does not expose as a value, give the resource's type and the field's path. For example:

cub repo set podinfo set-int-path apps/v1/Deployment spec.revisionHistoryLimit 5 --variant live --change-desc "We keep five"

Step 3: See the chart's next version, then take it

  1. Render the new version of the chart, with the same values, into the base:
    cub helm upgrade podinfo --version 6.6.0
  2. See what the live copy would take from it:
    cub repo promote podinfo-live --dry-run

    This lists what would change in the live copy, and changes nothing. Here it lists the new image, ghcr.io/stefanprodan/podinfo:6.5.4 → 6.6.0, and the chart's labels.

  3. Take it:
    cub repo promote podinfo-live

    The live copy now has the new image, and still has your 3 replicas:

      replicas: 3 # Three for the launch
            image: "ghcr.io/stefanprodan/podinfo:6.6.0"

Step 4: Apply it to a cluster

  1. Write the live copy out as plain files:
    cub local copy podinfo --variant live --to-dir deploy

    deploy/podinfo-live/ now holds one file per resource. deploy/CHANGES.md says why each of your values is set.

  2. Create the namespace:
    kubectl create namespace podinfo

    This chart writes no namespace into its manifests, so you give it with -n in the next step. A chart that does write one keeps its own.

  3. Apply the files:
    kubectl apply -n podinfo -f deploy/podinfo-live/

If you use Argo CD or Flux, which deploy to a cluster what is in a Git repository, commit deploy/ instead of applying it. Argo CD or Flux then deploys it from Git.

With no plugin, from the rendered chart

cub plugin install asks GitHub's API, which takes 60 requests an hour from an address with no token. If it says the limit is reached, set GITHUB_TOKEN, or use helm template, which needs no plugin:

helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
mkdir -p first/metrics-server next/metrics-server
helm template rel metrics-server/metrics-server --version 3.13.1 -n vendor > first/metrics-server/metrics-server.yaml
cub repo upload first/metrics-server --variant prod --namespace vendor --change-desc "metrics-server 3.13.1, as the vendor ships it"
cub repo set metrics-server set-int-path apps/v1/Deployment spec.replicas 7 \
    --variant prod --unit rel-metrics-server --change-desc "Fridays need seven"
cub repo set metrics-server set-string-path apps/v1/Deployment spec.template.spec.containers.0.resources.limits.memory 777Mi \
    --variant prod --unit rel-metrics-server --change-desc "It ran out of memory at the default"

helm template rel metrics-server/metrics-server --version 3.14.0 -n vendor > next/metrics-server/metrics-server.yaml
cub repo upload next/metrics-server --change-desc "metrics-server 3.14.0, as the vendor ships it"

The last command shows what the next version changes and what you keep, and asks. Add --yes to take it without asking. A chart's Secrets stay out of the hub, and the upload names them, so you apply those some other way. A single local hub holds about a dozen large charts (use a shared hub for larger estates).

The same in plain cub

On the organization's shared hub, you can do the same with plain cub:

All of them are in cub mini and plain cub.

How this differs from Helm