Helm Hour 5: Automation — CI/CD and GitOps

Treat the myapp chart as a “software product”: run lint / ct / kubeconform automatically on every PR, publish signed releases to GitHub Pages and GHCR after merge, hand it to Argo CD or Flux for continuous reconciliation, orchestrate multiple releases with Helmfile, and roll back failed upgrades automatically
Helm 4.3.2ct v3.15.0 · cr v1.10.1Argo CD v3.6.1 · Flux v2.10.0Helmfile v1.8.4cosign v3.1.4Verified against helm.sh and each project's official docs · 2026-11-15
Overall learning objectives
  • Build PR-level CI for the chart repository: helm lint --strict → ct lint (including version bump checks, yamllint, and the Chart.yaml schema) → helm template | kubeconform (including CRD schemas) → on kind ct install (optional --upgrade), and test only the charts changed in this PR.
  • Two release channels: chart-releaser (GitHub Release + gh-pages on index.yaml) and OCI (GHCR / ACR / ECR,helm push); explain version and appVersion 's division of labor, and the rule that “a published version is immutable: changing content requires a version bump.”
  • Use helm-docs from values.yaml 's # -- comments to generate the README; you'll also use helm package --sign to generate .prov and helm verify; you'll also use cosign to sign OCI charts keylessly and verify them on clients and in Flux.
  • Understand Argo CD only uses Helm to render (helm template, releases do not appear in helm list), write the helm source, valueFiles / valuesObject, and multi-source Applications ($values), and map Helm hooks to Argo CD sync phases / waves.
  • Understand The Flux helm-controller uses the Helm SDK to perform the actual install/upgrade (releases appear in helm list), write OCIRepository + HelmRelease, install/upgrade remediation, drift detection,dependsOn.
  • Use Helmfile to declare multiple releases, environments, and needs, and use helmfile diff/apply for “push-style” orchestration, and explain the trade-offs between it and GitOps.
  • Define an upgrade strategy: --rollback-on-failure,--wait (kstatus watcher),--timeout, pre-upgrade helm diff checks; know when Argo Rollouts / Flagger are needed for canary or blue-green deployments.

1-hour time allocation

#TimeModuleCore contentAnimation / interactiveLab (kind cluster lab + GitHub repository helm-charts)
0Before classPrep: chart repository and pipelineRepository layout charts/myapp, tool versions, GHCR permissions, kind clusterEnvironment self-check checklistPush the repository skeleton
100–08Chart CIlint --strict, ct lint/install, ct.yaml, ci/*-values.yaml, kubeconform + CRD schema, test changes onlyStaged simulation of the PR pipeline (failures can be injected)lint-test.yaml workflow
208–15Publish chartschart-releaser + gh-pages; helm push to GHCR/ACR/ECR; version vs appVersion; immutable releasesVersion decision toolrelease.yaml dual-channel publishing
315–22Docs and signinghelm-docs, .prov and helm verify, cosign keyless signing of OCI chartsSigning and verification chain animationSign and verify myapp 0.5.0
422–30GitOps: Argo CD managing Helmhelm source, valueFiles/valuesObject, multi-source, render instead of install, hooks ↔ sync wavesArgo CD sync phase and wave sorterArgo CD deploys myapp
530–38GitOps: Flux HelmReleaseOCIRepository/HelmRepository, remediation, drift detection, dependsOn, visible in helm listCore animation: GitOps reconciles a HelmRelease (failures can be injected)Flux deploys myapp + failure rollback
638–45Helmfile orchestrationhelmfile.yaml(.gotmpl), environments, needs, diff/apply, trade-offs vs GitOpsTopological sort of the needs dependency graphTwo releases: redis + myapp
745–53Upgrade strategy and automatic rollback--rollback-on-failure, --wait strategy, --timeout, helm diff, Argo Rollouts / FlaggerUpgrade timeline: success / failure rollbackRehearse a failed upgrade
853–60Recap, self-check, and cleanup for the first five hoursLessons 1–5 knowledge map, self-check, cleanupInteractive troubleshooting treeClean up kind / GHCR / gh-pages
—After classCheat sheet · Capstone labFull CI + release signing + dual Argo CD and Flux deployment + automatic rollback drillFinal quiz (12 questions)Capstone lab

Knowledge Coverage Matrix

Target skillsM1M2M3M4M5M6M7M8Key commandsLab
PR-level chart validation✓·✓····✓ct lint,kubeconformlint-test.yaml
Install and upgrade testing in kind✓·····✓✓ct install --upgradehelm/kind-action
Publish to an HTTP repository and OCI·✓✓✓✓··✓cr,helm pushrelease.yaml
Version policy and immutable releases✓✓··✓·✓✓--check-version-incrementVersion decision tool
Doc generation and signature verification··✓·✓··✓helm-docs,cosign verifySign 0.5.0
Argo CD managing Helm···✓·✓✓✓argocd app diff/syncApplication
Flux HelmRelease··✓·✓✓✓✓flux reconcile hr --resetHelmRelease
Multi-release orchestration···✓✓✓··helmfile diff/applyhelmfile.yaml.gotmpl
Upgrade strategy and automatic rollback···✓✓✓✓✓--rollback-on-failure --waitFailed upgrade drill

Topics not covered in this lesson (and where to learn them)

TopicWhy it's not in this lessonWhere to learn it
Installing Argo CD / Flux, the OpenGitOps four principles, basic Application fields, selfHeal/pruneThe K8s course's Lesson 6 only gives a conceptual overview, with full coverage in the next course; this lesson only covers “how they handle Helm”K8s Lesson 6 · Module 1 · GitOps and Argo CD, 8 hours
GitHub Actions syntax, triggers, permissions, OIDC, environments and approvalsCovered systematically in the GitHub courseGitHub, 8 hours
chart templates, values.schema.json, helm test, dependenciesLesson 2 topicsHelm Lesson 2
ACR / ECR authentication details and cloud pipelinesLesson 3 and 4 topicsLesson 3 (Azure) · Lesson 4 (AWS)
hook execution order, releases stuck in pending-upgradeLesson 6 and 7 topicsLesson 6 · Lesson 7
Using Terraform helm_release to manage chartsbelongs to the IaC topicTerraform, 8 hours

How to use this courseware

10 pages per module
Principles · diagrams · animation · commands · labs · production cases · troubleshooting · quiz · voice · video. Read “Principles” and “Animation” first, then do the “Lab”. All labs in this lesson can be completed with a local kind cluster and a free GitHub repository, with no cloud cost (except the optional ACR / ECR section).
Progress
Progress counts once the quiz score is ≥ 70% or you click “Mark module complete”. It is saved in this browser (cleared on refresh if local storage is disabled).
Chinese voice
The “Voice” tab uses the browser's built-in Web Speech API (en-US) to read the script aloud; if no Chinese voice pack is installed, you can read the script directly.
Version notes This lesson uses the versions verified on 2026-11-15 as its baseline: Helm 4.3.2 (2026-11-13); chart-testing v3.15.0 (2026-10-06) and helm/chart-testing-action v2.9.0; chart-releaser v1.10.1 and helm/chart-releaser-action v1.9.0 (2026-10-31); helm/kind-action v1.15.2 (default kind v0.33.0, kubectl v1.37.1); kubeconform v0.8.0; helm-docs v1.14.2 (2024-07, no newer release to date); cosign v3.1.4 and sigstore/cosign-installer v4.1.3; Argo CD v3.6.1 (since 3.5, renders only with Helm v4); Flux v2.10.0 (helm-controller v1.7.1); Helmfile v1.8.4 (2026-11-13, supports Helm 3 and 4); helm-diff v3.15.15; Argo Rollouts v1.10.2; Flagger v1.45.0; azure/setup-helm v5.1.0; actions/checkout v7.0.1; docker/login-action v4.8.0. Helm 4: --atomic → --rollback-on-failure (sets --wait as the default watcher); when not specified --wait , the default strategy is hookOnly.

Module 0 · Prep: chart repository and pipeline (complete before class)

Move the myapp chart from Lessons 1–2 into a standalone GitHub repository, helm-charts, standardize the directory layout, install this lesson's toolchain, and reuse the kind cluster lab locally
Before class ≈ 20 minNo cloud costRequires a GitHub account
Prerequisites
  • Complete Lesson 1 and Lesson 2: have locally ~/helmlab/myapp chart (Flask + gunicorn + Redis counter,/healthz), with values.schema.json and templates/tests/test-connection.yaml,helm lint passing.
  • myapp image source code ~/helmlab/myapp-src (Docker course). This lesson will push the image to ghcr.io/<your-username>/myapp.
  • A GitHub account (a personal account is fine) that can create public repositories and enable GitHub Pages; for GitHub Actions usage see the GitHub course.
  • Local tools: Docker, kind v0.33.0, kubectl 1.37, Helm 4.3.2, git, Python 3 (ct lint depends on yamllint / yamale), jq.

Costs, permissions, and security risks

ResourceCostPermissions / risks
GitHub public repository + Actions + PagesPublic repositories use standard hosted runners for freeThe workflow needs contents: write (chart-releaser),packages: write (GHCR),id-token: write (cosign keyless). Grant only the jobs that need them.
GHCR (ghcr.io)Public packages are freePackages on first push default to private; for anonymous pulls, change it to Public in the package settings. Do not use a personal PAT in place of GITHUB_TOKEN.
kind cluster labLocal, no costInstalling Argo CD + Flux together in one kind cluster needs about 4 GB of memory; if resources are tight, do it in two separate passes.
Optional: ACR / ECRSee Lessons 3 and 4Only used in the “Push to OCI” comparison section of Module 2; can be skipped.

Security note: cosign keyless signing writes the signer identity (workflow path, repository, branch) to the public Rekor transparency log. For private projects that do not want to expose this metadata, evaluate using a private Sigstore instance or key-pair signing instead.

Step 1: Check tools

helm version --short
kind version
kubectl version --client
python3 -m pip install --user yamllint yamale
# Download the ct, kubeconform, helm-docs, cosign, helmfile, flux, and argocd binaries from each project's GitHub Releases (see table below)
ct version
kubeconform -v
helm-docs --version
cosign version
helmfile version
flux version --client
argocd version --client
v4.3.2+g...
kind v0.33.0 go1.x linux/amd64
Client Version: v1.37.1
Version:	 v3.15.0
v0.8.0
helm-docs version 1.14.2
GitVersion:    v3.1.4
helmfile version v1.8.4
flux: v2.10.0
argocd: v3.6.1+...
ToolVersionInstall
chart-testing (ct)v3.15.0brew install chart-testing or Releases; or use the image quay.io/helmpack/chart-testing:v3.15.0 (already includes helm, yamllint, yamale, kubectl)
kubeconformv0.8.0Releases or go install github.com/yannh/kubeconform/cmd/kubeconform@v0.8.0
helm-docsv1.14.2Releases,brew install norwoodj/tap/helm-docs or image jnorwood/helm-docs
cosignv3.1.4Releases (in CI use sigstore/cosign-installer@v4.1.3)
Helmfile + helm-diffv1.8.4 / v3.15.15Releases; helmfile init installs helm-diff (Helm 4 verifies plugin sources by default, see Module 6)
flux / argocd CLIv2.10.0 / v3.6.1Same as Lesson 6 of the K8s course

Step 2: Create the helm-charts repository and organize the directory

export GH_USER=<your GitHub username>
mkdir -p ~/helmlab/helm-charts/charts && cd ~/helmlab/helm-charts
git init -b main
cp -r ~/helmlab/myapp charts/myapp
mkdir -p charts/myapp/ci .github/workflows
tree -L 3 -a -I .git
.
├── .github/workflows/        ← lint-test.yaml (Module 1), release.yaml (Modules 2, 3)
├── charts/
│   └── myapp/
│       ├── Chart.yaml
│       ├── values.yaml
│       ├── values.schema.json
│       ├── README.md.gotmpl  ← Module 3 (helm-docs template, optional)
│       ├── ci/               ← each *-values.yaml is installed once during ct install
│       └── templates/
├── ct.yaml                   ← Module 1
├── cr.yaml                   ← Module 2 (optional)
└── gitops/                   ← Modules 4, 5: Argo CD and Flux manifests, environment values
apiVersion: v2
name: myapp
description: Flask + Redis counter demo used across the Helm course
type: application
version: 0.4.0          # chart version: bump on any change to templates or default values
appVersion: "1.0"       # app version: default image tag, informational/default value only
maintainers:
  - name: andy
    url: https://github.com/<GH_USER>
home: https://github.com/<GH_USER>/helm-charts
sources:
  - https://github.com/<GH_USER>/helm-charts/tree/main/charts/myapp
git add . && git commit -m "chore: import myapp chart 0.4.0"
gh repo create helm-charts --public --source . --push

Step 3: Prepare the kind cluster and images

kind get clusters | grep -q '^lab$' || kind create cluster --name lab --config ~/helmlab/kind-lab.yaml
kubectl config use-context kind-lab
cd ~/helmlab/myapp-src
docker build -t ghcr.io/$GH_USER/myapp:1.0 --build-arg APP_VERSION=1.0 .
docker build -t ghcr.io/$GH_USER/myapp:1.1 --build-arg APP_VERSION=1.1 .
echo $GH_PAT_PACKAGES | docker login ghcr.io -u $GH_USER --password-stdin   # local only: the PAT needs write:packages
docker push ghcr.io/$GH_USER/myapp:1.0 && docker push ghcr.io/$GH_USER/myapp:1.1

After pushing, in GitHub → Packages → myapp → Package settings, change visibility to Public and add the helm-charts repository under “Manage Actions access”, so that later workflows use GITHUB_TOKEN to push charts. You can also use only kind load docker-image for local experiments, skipping the GHCR image.

Warm-up: answer from memory (30 seconds)

helm upgrade --install What record does it leave in the cluster?

A Secret in the release namespace sh.helm.release.v1.<name>.v<N> (Lesson 1). In this lesson you will see that Flux leaves the same record, while Argo CD does not.

When pushing to OCI, helm push myapp-0.4.0.tgz oci://ghcr.io/$GH_USER/charts which repository and tag does it end up writing to?

Repository ghcr.io/$GH_USER/charts/myapp, tag 0.4.0. The push target does not include the chart name and tag (Lessons 1, 3, 4).

In Helm 4, what replaces --atomic 's parameter?

--rollback-on-failure; it sets --wait default to watcher (kstatus).

Environment self-check checklist

Module 1 · Chart CI: lint, ct, and kubeconform

00:00 – 08:00 · Four gates, from fastest to slowest: helm lint --strict → ct lint → kubeconform → ct install on kind; test only the charts changed in this PR
8 minct v3.15.0 · kubeconform v0.8.0 · kind-action v1.15.2ct requires a version bump by default★★★★★
Learning objectives
  • Explain what each of the four kinds of checks catches and what it misses: Static (lint, yamllint, Chart.yaml schema, version bump),post-render schema (kubeconform, including CRDs),real cluster (ct install + helm test).
  • Write ct.yaml and charts/myapp/ci/*-values.yaml, and understand how ct uses git diff <remote>/<target-branch> to find the changed charts.
  • Build a PR workflow with helm/chart-testing-action + helm/kind-action, and load the CI-built image into kind.
Prerequisites: values.schema.json and helm test from Lesson 2; Actions basics from the GitHub course. Importance:★★★★★

What: what chart CI needs to verify

A chart is a “program that generates YAML.” Like ordinary code, it needs compile-time checks (templates render, values conform to the schema),contract checks (rendered objects conform to the Kubernetes / CRD OpenAPI schema), and integration tests (it actually installs, Pods become ready,helm test tests pass, and it can upgrade from the previous version).

GateToolWhat it checksWhat it missesTime
① helm lint --strictHelm 4.3Required Chart.yaml fields, template syntax, values.schema.json; --strict treats warnings (such as a missing icon) as errors toowhether rendered objects are validseconds
② ct lintchart-testingFor changed charts: whether the version is bumped (check-version-increment, default true), the Yamale schema for Chart.yaml, yamllint, and for each ci/*-values.yaml run helm lint, optional maintainer validationSame as aboveseconds
③ kubeconformkubeconform v0.8.0helm template output is checked object by object against the JSON Schema: misspelled field names, wrong types, missing required fields; CRDs via CRDs-catalog or self-generated schemasruntime behavior, admission policiesseconds
④ ct installct + kindEach ci/*-values.yaml is installed once (in its own namespace) → wait for readiness → helm test → uninstall; --upgrade when upgrade is enabled, it also upgrades in place from the previous versioncloud dependencies (LB, IAM)minutes

Why: why “test only changed charts”

  • In a monorepo with many charts, a full install is slow; ct compares by default <remote>/<target-branch> (default origin/main) against the current HEAD and only processes charts whose directories changed. So checkout must fetch-depth: 0, or it cannot find the merge base.
  • --charts or --all disables change detection and version bump checks (suitable for nightly full regression).
  • The version bump check enforces “bump the version when content changes,” a prerequisite for Module 2's “immutable releases.”

How: ct configuration and conventions

  • Configuration precedence: command line > CT_* environment variables > config file; if not specified --config , ct auto-loads from the current directory (or $HOME/.ct,/etc/ct) under the name ct.yaml.
  • ct lint The yamllint config (lintconf.yaml) and the Yamale schema (chart_schema.yaml), searched from the current directory → .ct/ → $HOME/.ct → /etc/ct ; sample files ship with the official image and release packages.
  • ci/*-values.yaml: each file represents one test scenario (e.g., default, redis-disabled, ingress), and ct install installs the chart once per scenario.
  • type: library charts are only linted, not installed.
  • When --namespace is not set, each release is installed in a random namespace and cleaned up afterward; --skip-clean-up makes debugging easier.

When: where each check runs

  • Locally in pre-commit: helm lint, helm-docs (Module 3).
  • PR: ①②③④ all (④ only for changed charts).
  • Nightly: ct install --all --upgrade + multiple Kubernetes versions (kind-action's node_image matrix).
  • Merged to main: publish (Module 2), no repeated install.
Common misconceptions① “If helm lint passes, it will install.” — lint does not check whether rendered output conforms to the API schema,contianers: so such spelling errors must be caught by kubeconform or --dry-run=server. ② “kubeconform can't handle CRDs” — you can use -schema-location pointing to CRDs-catalog or a self-generated schema; only use -ignore-missing-schemas and list the skipped kinds in the report. ③ “ct install uses the image from main” — ct only installs the chart; the image must first be built by the workflow and kind load, or in ci/ values, point to a published image.

Flowchart: chart CI for a single PR

pull_requestcheckout fetch-depth: 0 ct list-changedgit diff origin/main…HEAD ① lint --strict② ct lint ③ kubeconformK8s + CRD schema ④ ct installkind · helm test No changes → skip ②–④job still passes ct install for each ci/*-values.yaml kubectl create ns myapp-xxxx helm install … --wait --namespace myapp-xxxx helm test → collect logs/events (on failure) --upgrade: install the previous version first, then upgrade to the current one helm uninstall + delete namespace
Figure 1-1: four gates from fastest to slowest; change detection decides whether the later ones run

Reference: typical errors each gate can catch

Errorlint --strictct lintkubeconformct install
Template syntax error (unclosed {{ if }})✓✓—✓
Changed the template but did not bump version—✓——
values.yaml indentation problems / duplicate keysPartially✓ (yamllint)——
spec.template.spec.contianers——✓ (strict mode reports extra fields)✓ (SSA field validation reports the error)
ServiceMonitor's endpoints[0].interval: 30 (should be a string)——✓ (CRD schema)needs the CRD installed on the cluster
Wrong readinessProbe path means it never becomes ready———✓ (timeout)
New version cannot upgrade from the old one (e.g., changed Deployment selector)———✓ (--upgrade)

Interactive: staged PR pipeline simulation

Select the changes in this PR (you can select several to inject issues), then click “Run pipeline”. Each stage shows realistic ct / kubeconform output; it stops on failure and suggests a fix.

Select changes, then click “Run pipeline”.
$ # log output

Core commands

CommandPurposeNotes
helm lint charts/myapp --strict --kube-version 1.37.0Strict lint--with-subcharts also lint dependencies; -f scenario values can be specified
ct list-changed --target-branch mainList changed chartsif output is empty, later steps are skipped
ct lint --config ct.yamlversion bump + yamllint + Yamale + helm lintfor each ci/*-values.yaml lint separately
ct install --config ct.yaml --upgradeinstall, test, upgrade testrequires access to a cluster; --helm-extra-args '--timeout 300s'
helm template … | kubeconform -strict -summaryschema validation of rendered output-kubernetes-version 1.37.0; for CRDs add a second -schema-location
remote: origin
target-branch: main
chart-dirs:
  - charts
# chart-repos:
  # - bitnami=https://charts.bitnami.com/bitnami   # only needed when the chart depends on an external HTTP repository
helm-extra-args: --timeout 300s
check-version-increment: true
validate-maintainers: false     # when true, validates that maintainers.name is a real GitHub account
upgrade: true                   # ct install tests an in-place upgrade from the previous version
# excluded-charts:
#   - experimental-chart
image:
  repository: myapp
  tag: ci            # local image built with docker build and loaded with kind load in the workflow
  pullPolicy: Never
redis:
  enabled: true
image: { repository: myapp, tag: ci, pullPolicy: Never }
metrics:
  serviceMonitor:
    enabled: true    # requires the ServiceMonitor CRD to be pre-installed in kind (see lab)
cd ~/helmlab/helm-charts
helm lint charts/myapp --strict --kube-version 1.37.0
ct lint --config ct.yaml
for f in charts/myapp/ci/*-values.yaml; do
  helm template ci charts/myapp -f "$f" --kube-version 1.37.0 \
  | kubeconform -strict -summary -kubernetes-version 1.37.0 \
      -schema-location default \
      -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
done
==> Linting charts/myapp
1 chart(s) linted, 0 chart(s) failed
Linting charts in directories [charts]
Using config file: ct.yaml
------------------------------------------------------------------------------------------------------------------------
 Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
 myapp => (version: "0.4.1", path: "charts/myapp")
------------------------------------------------------------------------------------------------------------------------
Linting chart "myapp => (version: \"0.4.1\", path: \"charts/myapp\")"
Checking chart "myapp => (version: \"0.4.1\", path: \"charts/myapp\")" for a version bump...
Old chart version: 0.4.0
New chart version: 0.4.1
Chart version ok.
Validating /root/.ct/chart_schema.yaml...
Validation success! 👍
Validating maintainers...
==> Linting charts/myapp
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed
------------------------------------------------------------------------------------------------------------------------
 ✔︎ myapp => (version: "0.4.1", path: "charts/myapp")
------------------------------------------------------------------------------------------------------------------------
All charts linted successfully
Summary: 5 resources found parsing stdin - Valid: 5, Invalid: 0, Errors: 0, Skipped: 0
Summary: 6 resources found parsing stdin - Valid: 6, Invalid: 0, Errors: 0, Skipped: 0

How to verify: Deliberately change the containers in the Deployment to contianers then run again; kubeconform should output stdin - Deployment myapp is invalid: problem validating schema … additional properties 'contianers' not allowed (wording varies by version). Note: The [INFO] icon is recommended in the output above is INFO level; --strict only treat WARNING as a failure. Common errors: When running ct locally, origin/main is too old — first git fetch origin.

Lab 1: set up a PR workflow for helm-charts (about 6 min)

Write the workflow:
name: lint-test
on:
  pull_request:
    paths: ["charts/**", "ct.yaml", ".github/workflows/lint-test.yaml"]
permissions: {}
jobs:
  lint-test:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0                       # ct needs full history to compute changes
      - uses: azure/setup-helm@v5.1.0
        with:
          version: v4.3.2
      - uses: actions/setup-python@v7
        with:
          python-version: "3.x"
      - uses: helm/chart-testing-action@v2.9.0   # installs ct 3.15.0 by default
      - id: list-changed
        run: |
          changed=$(ct list-changed --config ct.yaml --target-branch ${{ github.event.repository.default_branch }})
          if [[ -n "$changed" ]]; then
            echo "changed=true" >> "$GITHUB_OUTPUT"
            echo "charts=$(echo $changed | tr '\n' ' ')" >> "$GITHUB_OUTPUT"
          fi
      - name: helm lint --strict
        if: steps.list-changed.outputs.changed == 'true'
        run: for c in ${{ steps.list-changed.outputs.charts }}; do helm lint "$c" --strict --kube-version 1.37.0; done
      - name: ct lint
        if: steps.list-changed.outputs.changed == 'true'
        run: ct lint --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}
      - name: kubeconform
        if: steps.list-changed.outputs.changed == 'true'
        run: |
          curl -sSL https://github.com/yannh/kubeconform/releases/download/v0.8.0/kubeconform-linux-amd64.tar.gz | tar xz -C /usr/local/bin kubeconform
          for c in ${{ steps.list-changed.outputs.charts }}; do
            for f in "$c"/ci/*-values.yaml; do
              echo "::group::$f"
              helm template ci "$c" -f "$f" --kube-version 1.37.0 | kubeconform -strict -summary \
                -kubernetes-version 1.37.0 -schema-location default \
                -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
              echo "::endgroup::"
            done
          done
      - uses: helm/kind-action@v1.15.2
        if: steps.list-changed.outputs.changed == 'true'
        # default cluster name chart-testing, kind v0.33.0, kubectl v1.37.1
      - name: build & load image, install test CRDs
        if: steps.list-changed.outputs.changed == 'true'
        run: |
          docker build -t myapp:ci ./app            # if the image source is in the same repo; otherwise reference a published image in ci/ values
          kind load docker-image myapp:ci --name chart-testing
          kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
      - name: ct install
        if: steps.list-changed.outputs.changed == 'true'
        run: ct install --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}

In production, pin the ServiceMonitor CRD URL to a specific prometheus-operator release tag instead of main.

Submit a “good” PR:
git switch -c feat/probe-timeout
sed -i 's/^version: 0.4.0/version: 0.4.1/' charts/myapp/Chart.yaml
# e.g., add timeoutSeconds: 2 to readinessProbe in templates/deployment.yaml
git commit -am "feat(myapp): add readiness timeout" && git push -u origin HEAD
gh pr create --fill
gh pr checks --watch
lint-test/lint-test  pass  2m31s  https://github.com/…/actions/runs/…
Submit a “bad” PR: change another template without bumping the version, and confirm ct lint fails:
Checking chart "myapp => (version: \"0.4.1\", path: \"charts/myapp\")" for a version bump...
Old chart version: 0.4.1
New chart version: 0.4.1
Error: failed linting charts: failed processing charts
Verify “test only changes”: create charts/demo (helm create), then in another PR change only charts/demo, and confirm that the log for Charts to be processed shows only demo.
(Optional) make lint-test a required check: in repo Settings → Rules, enable “Require status checks to pass” for main and select lint-test (GitHub course, Lesson 3).

Case 1: missed selector change

Problem: A refactor changed the Deployment's selector.matchLabels by adding a label; lint and kubeconform both passed, but after merge and release, upgrades failed in all environments (selectors are immutable). Fix: In ct.yaml, turn on upgrade: true, so ct installs the previous version first, then upgrades to the current one. For changes that truly break compatibility, bump the major version (ct only tests upgrades within the SemVer range where breaking changes should not be introduced).

Case 2: CI duration for 40 charts in a monorepo

Problem: Every PR does a full install, taking 40 minutes. Fix: PRs test only ct install changed charts; nightly uses a matrix node_image: [kindest/node:v1.35.x, v1.36.x, v1.37.0] to run --all. kubeconform uses -n for concurrency and caches schemas in the Actions cache (-cache directory).

Case 3: CRD schema fetches rate-limited

Problem: kubeconform occasionally gets 429 when fetching schemas from raw.githubusercontent.com. Fix: Download the K8s and CRD schemas used into the repository in advance schemas/ (or an internal mirror),-schema-location 'schemas/{{.ResourceKind}}{{.KindSuffix}}.json'; for CRDs, use openapi2jsonschema to generate from the installed CRDs; versions match the cluster.

Common errors and fixes

Error: failed identifying charts to process: failed creating diff: Error running process: exit status 128 … fatal: bad revision 'origin/main...HEAD'

Cause: Shallow clone or missing target branch reference.

git fetch --unshallow || true
git fetch origin main:refs/remotes/origin/main
ct list-changed --target-branch main

Fix: Set in actions/checkout: fetch-depth: 0; if the target branch is not main, pass --target-branch.

Error: failed linting charts: failed processing charts (the log above shows "Chart version not ok. Needs a version bump!")

Cause:check-version-increment Enabled by default; the chart directory changed but version the version was not increased.

Fix: Bump the version per SemVer. When only files that do not affect package content, such as README, change, you can enable use-helmignore and add the files to .helmignore, so ct treats the chart as unchanged.

Error validating data: … schema_error: Validating 'chart_schema.yaml' … / lintconf.yaml: no such file or directory

Cause: When running the ct binary locally, the default Yamale schema and yamllint config cannot be found.

mkdir -p ~/.ct && tar -xzf chart-testing_3.15.0_linux_amd64.tar.gz -C /tmp && cp /tmp/etc/* ~/.ct/
kubeconform: could not find schema for ServiceMonitor

Cause: Only the default schema location is used, and the CRD has no schema.

Fix: Add -schema-location pointing to CRDs-catalog ({{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json), or a self-converted schema; if none exists, use -skip ServiceMonitor to explicitly skip it, rather than skipping globally -ignore-missing-schemas.

ct install: Error: INSTALLATION FAILED: context deadline exceeded / resource Deployment/myapp-xxxx/myapp not ready

Cause: The image cannot be pulled (pullPolicy: Never not loaded into kind, or a private GHCR image), probes fail, or resources are insufficient.

ct install --config ct.yaml --skip-clean-up --debug
kubectl get pods -A | grep myapp
kubectl describe pod -n <ns> -l app.kubernetes.io/name=myapp | tail -20

When ct fails, it automatically prints Pod logs and events; check these first.

Command-line tasks
1. Run ct install only for charts/myapp, and keep the resources for easier debugging.
ct install --charts charts/myapp --skip-clean-up

Note --charts disables change detection and version bump checks.

2. Use kubeconform to validate the rendered output, output as JSON, and skip ServiceMonitor.
helm template t charts/myapp | kubeconform -strict -summary -output json -skip ServiceMonitor -kubernetes-version 1.37.0
Scenario analysis
The team wants to catch “new chart version cannot upgrade from the live version” before a PR is merged, while keeping CI under 10 minutes. The repository has 12 charts. How would you design it?

In PRs: ct change detection + ct install --upgrade (only for changed charts, upgrading from the previous version to the current one); each chart's ci/ values files keep only the 1–2 most representative scenarios; kubeconform and lint run as parallel jobs. Nightly: --all + multi-K8s-version matrix. For changes that truly need to break compatibility, bump the major version and document the migration steps in the release notes.

Verified teaching videos

▶
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker — TechWorld with Nana
English · Actions basics review (does not cover ct; for chart content, follow this lesson)

No verified dedicated videos were found for chart-testing / kubeconform; see the storyboard script below.

Official documentation

Video storyboard script (about 75 seconds)

Shot 1 · 0–20s
Visual: a chart package on a conveyor belt passes through four gates, labeled lint, ct lint, kubeconform, and kind in turn.
Narration: a chart is a program that generates YAML, and CI should check it from fastest to slowest.
Shot 2 · 20–45s
Visual: git diff highlights the charts/myapp directory; other charts turn gray.
Narration: ct compares against the target branch and only processes changed charts; if the content changed but the version was not bumped, the second gate blocks it.
Shot 3 · 45–75s
Visual: the kind cluster creates a namespace for each ci values file; Pods turn green, helm test passes, and the namespace disappears.
Narration: finally, install, test, and upgrade in a real cluster, then clean up automatically.
or score ≥ 70% on the quiz

Module 2 · Publish charts: chart-releaser and OCI

08:00 – 15:00 · Publish on merge to main: GitHub Release + index.yaml on gh-pages, and/or push to GHCR / ACR / ECR; a given version number always maps to the same bytes
7 minchart-releaser-action v1.9.0 · cr v1.10.1Immutable once published; only new versions can be released★★★★★
Learning objectives
  • Explain the three things chart-releaser does: package changed charts → create a GitHub Release for each version (tag <name>-<version>) and upload the tgz → update the gh-pages index file on the index.yaml branch.
  • Use helm push (or the action's oci_registry_url) to push the same package to GHCR, and compare the login methods for ACR / ECR.
  • Define a version policy: chart version and appVersion when each is bumped, pre-release versions, stamping version numbers in CI; understand “immutable releases.”
Prerequisites: Lesson 1, Module 6 (chart repositories and OCI); ACR / ECR authentication from Lessons 3 and 4. Importance:★★★★★

What: two distribution channels

HTTP chart repository (chart-releaser + GitHub Pages)OCI registry (GHCR / ACR / ECR / Harbor)
Stored astgz files as GitHub Release assets; index.yaml in the gh-pages branch (optional, packages_with_index also put the tgz in the Pages branch)OCI manifest: config (application/vnd.cncf.helm.config.v1+json) + chart layer + optional provenance layer
Consumehelm repo add myrepo https://<user>.github.io/helm-charts → helm install myrepo/myapphelm install oci://ghcr.io/<user>/charts/myapp --version 0.5.0, no repo add required
Indexa constantly growing index.yaml, clients need helm repo updateno index; addressed directly by tag / digest
Integritydigest in the index + optional .provcontent-addressed digest; optional .prov layer; cosign signature (Module 3)
GitOps supportArgo CD and Flux (HelmRepository) both support itArgo CD (repoURL without oci://), Flux (OCIRepository recommended)

Why: why “immutable releases”

  • Helm, Argo CD, and Flux all cache charts; if the same version number maps to different content, different clusters may get different bytes, and incidents cannot be reproduced.
  • chart-releaser fails by default when a release already exists (skip_existing can be skipped); since cr v1.10, you can use CR_REPLACE_EXISTING to replace mutable GitHub Release, but the official README also cautions that consumers may cache old bytes and that publishing a new version is usually preferable; repositories with GitHub immutable releases enabled cannot replace them.
  • OCI tags can be overwritten by default; ECR can be set to IMMUTABLE (Lesson 4), while GHCR / ACR require process controls (or ACR's lock attribute) to guarantee it; in production, pin by digest (Lesson 3).

How: version policy

FieldMeaningWhen to bumpRule
versionVersion of the chart package itself (SemVer 2, required)In the chart package,any file change (templates, default values, dependencies, even the default image tag)breaking values compatibility (renaming/removing keys, selector changes) → major; new optional features → minor; fixes → patch
appVersionThe application version deployed by default; an informational field, often used as image.tag the default value ofwhen the application is releasedSemVer is not required; remember to quote it ("1.10" otherwise YAML parses it as 1.1)
  • If appVersion changes, version must also change— because the package content changed (ct also requires this).
  • Pre-releases: 0.5.0-rc.1; helm install pre-release versions are not selected by default; you need --devel or explicitly --version.
  • OCI tags do not allow +, and when Helm pushes, it replaces build metadata + with _ (covered in Lesson 3).
  • CI stamping: helm package --version 0.5.0 --app-version "$(git rev-parse --short HEAD)" You can set the version without changing Chart.yaml; but then the Chart.yaml in Git does not match the package, so the team must agree that “the tag / package is authoritative.” This lesson uses “Chart.yaml is the single source of truth,” with versions bumped via PRs.

When: which channel to choose

  • Open-source public charts, and user habits helm repo add → chart-releaser + Pages (pushing to OCI as well is better).
  • Internal enterprise, existing image registry and permission system, GitOps → OCI first (no index to maintain; permissions match images).
  • To get both: the chart-releaser-action's oci_registry_url publishes to both destinations at once.
Common misconceptions① “appVersion automatically becomes the image tag” — only when the template uses {{ .Values.image.tag | default .Chart.AppVersion }} does so. ② “Once pushed to GHCR, others can pull it” — new GHCR packages are private by default. ③ “helm push will create index.yaml for me” — OCI has no index; helm search repo also cannot find OCI charts.

Flowchart: dual-channel publishing after merge to main

push to mainChart.yaml 0.5.0 cr packagechanged chart → tgz GitHub Releasetag myapp-0.5.0 · myapp-0.5.0.tgz gh-pages/index.yamlhttps://<user>.github.io/helm-charts oci://ghcr.io/<user>/charts/myapp:0.5.0manifest → config + chart layer (+ .prov layer)Digest: sha256:… → recorded in release notes / GitOps repository cr uploadcr indexhelm push / cr push
Figure 2-1: the same tgz is published to two channels; the version is determined by Chart.yaml

Version comparison

This changeversionappVersion
myapp releases 1.1 (default tag changed to 1.1)0.4.1 → 0.5.0 (minor) or patch, per team convention"1.0" → "1.1"
Add optional ServiceMonitor0.5.0 → 0.6.0unchanged
service.port renamed to service.http.port0.6.0 → 1.0.0 (major)unchanged
Only README changed (in .helmignore)unchangedunchanged

Interactive: version decision tool

Select the type of change in this PR to see the recommended version / appVersion, the behavior of ct and chart-releaser, and what happens when a published version is changed.

Click a change type.
version: 0.4.1 appVersion: "1.0"

Core commands

CommandPurposeNotes
cr package charts/myappPackage into .cr-release-packages/supports --sign --key --keyring
cr upload -o <owner> -r helm-charts --skip-existingcreate GitHub Release and uploadrequires CR_TOKEN
cr index -o <owner> -r helm-charts --pushupdate index.yaml on gh-pagesdefault branch gh-pages
cr push --registry-url oci://ghcr.io/<owner>/charts --skip-existingpush the package to OCIthe same-directory .prov push together
helm push myapp-0.5.0.tgz oci://ghcr.io/<owner>/chartsHelm native pushfirst helm registry login ghcr.io
helm show chart oci://ghcr.io/<owner>/charts/myapp --version 0.5.0verify the publishedoutput includes Digest
# Manually publish OCI once locally to understand what the action does
cd ~/helmlab/helm-charts
helm package charts/myapp -d /tmp/pkg
echo "$GH_PAT_PACKAGES" | helm registry login ghcr.io -u "$GH_USER" --password-stdin
helm push /tmp/pkg/myapp-0.5.0.tgz oci://ghcr.io/$GH_USER/charts
helm show chart oci://ghcr.io/$GH_USER/charts/myapp --version 0.5.0 | head -5
Successfully packaged chart and saved it to: /tmp/pkg/myapp-0.5.0.tgz
Login Succeeded
Pushed: ghcr.io/andy/charts/myapp:0.5.0
Digest: sha256:3b1f0c…e9a2
Pulled: ghcr.io/andy/charts/myapp:0.5.0
Digest: sha256:3b1f0c…e9a2
apiVersion: v2
appVersion: "1.1"
description: Flask + Redis counter demo used across the Helm course
name: myapp

Login comparison for three OCI registries (see Lessons 3 and 4 for details)

# GHCR (in Actions)
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u "${{ github.actor }}" --password-stdin
# ACR (requires azure/login first, OIDC)
az acr login -n $ACR --expose-token --query accessToken -o tsv \
  | helm registry login $ACR.azurecr.io -u 00000000-0000-0000-0000-000000000000 --password-stdin
# ECR (requires configure-aws-credentials first, OIDC; the repository charts/myapp must already exist)
aws ecr get-login-password --region ca-central-1 \
  | helm registry login --username AWS --password-stdin $ACCT.dkr.ecr.ca-central-1.amazonaws.com

Common errors:helm registry login The push target can only be a hostname; it cannot include oci:// a scheme or path (Helm 4 will reject it).

Lab 2: release.yaml dual-channel publishing (about 6 min)

Enable Pages: run the workflow once first (the action creates an empty gh-pages branch), then in Settings → Pages → Source choose “Deploy from a branch”, branch gh-pages / root.
Write the workflow (Module 3 adds helm-docs checks and cosign signing on top of this):
name: release
on:
  push:
    branches: [main]
    paths: ["charts/**"]
concurrency:
  group: chart-publishing-${{ github.repository }}
  cancel-in-progress: false
permissions: {}
jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write        # GitHub Release + gh-pages
      packages: write        # GHCR
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
          persist-credentials: true   # cr pushes gh-pages using git worktree, so credentials must be kept
      - name: Configure Git
        run: |
          git config user.name "$GITHUB_ACTOR"
          git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
      - uses: azure/setup-helm@v5.1.0
        with: { version: v4.3.2 }
      - uses: docker/login-action@v4.8.0
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - id: cr
        uses: helm/chart-releaser-action@v1.9.0
        with:
          charts_dir: charts
          skip_existing: true
          oci_registry_url: oci://ghcr.io/${{ github.repository_owner }}/charts
        env:
          CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CR_GENERATE_RELEASE_NOTES: "true"
      - name: summary
        run: |
          echo "changed: ${{ steps.cr.outputs.changed_charts }}"
          echo '${{ steps.cr.outputs.releases }}' | jq .
Bump the version and merge: in the PR, change version to 0.5.0,appVersion to "1.1", and merge after passing the Module 1 checks.
gh run watch
gh release list | head -3
curl -s https://$GH_USER.github.io/helm-charts/index.yaml | head -20
myapp-0.5.0  Latest  myapp-0.5.0  about 1 minute ago
apiVersion: v1
entries:
  myapp:
  - apiVersion: v2
    appVersion: "1.1"
    created: "2026-11-15T10:12:33.12Z"
    digest: 9d1c…
    name: myapp
    urls:
    - https://github.com/andy/helm-charts/releases/download/myapp-0.5.0/myapp-0.5.0.tgz
    version: 0.5.0
Verify installation from both channels (first set the GHCR package charts/myapp to Public):
helm repo add andy https://$GH_USER.github.io/helm-charts && helm repo update
helm search repo andy/myapp --versions
helm template t andy/myapp --version 0.5.0 | sha256sum
helm template t oci://ghcr.io/$GH_USER/charts/myapp --version 0.5.0 | sha256sum   # the two should match
Verify immutability: without changing the version, push the chart changes on main again and confirm skip_existing that the upload is skipped and the Release is unchanged; leave this case to Module 1's ct version check to block at the PR stage.

Case 1: two different contents under the same version number

Problem: A maintainer manually deleted a Release and republished 1.4.2 to fix a bug. Some users' Argo CD still had the old package cached, while others got the new one, so the problem could not be reproduced. Fix: Publish 1.4.3; enable GitHub immutable releases for the repository; on the OCI side, list the digest in the release notes, and have the GitOps repository reference it by digest or a pinned version.

Case 2: index.yaml too large

Problem: Thousands of versions accumulated over several years, and the index.yaml file reached several MB, making helm repo update updates slow. Fix: Migrate primarily to OCI; keep only recent versions in the HTTP repository (cr does not prune automatically, so a separate script is needed, and users must be notified).

Case 3: publish internal charts to ACR + ECR across two clouds

Problem: A multi-cloud team needs two registries kept in sync. Fix: Package once in the same job,helm push push to both registries (each with its own OIDC login), and compare whether the two Digests match; cosign signs each reference separately (the signature is bound to the digest, so identical content gives the same digest).

Common errors and fixes

fatal: could not read Username for 'https://github.com': No such device or address

Cause: chart-releaser uses git worktree to push gh-pages, but checkout did not keep credentials (or a problematic actions/checkout v6.0.0 was used).

Fix: Use actions/checkout v6.0.1+ / v7 and keep persist-credentials: true, and make sure the job has contents: write.

Error: error creating GitHub release myapp-0.5.0: … already_exists

Cause: The version did not change, but the chart was packaged again.

Fix: Set skip_existing: true; the root fix is to block it at the PR stage with the ct version check.

Error: failed to authorize: failed to fetch oauth token: unexpected status: 401 Unauthorized (helm push ghcr.io)

Cause: Not logged in, the job lacks packages: write, the package already exists and this repository was not added to its Actions access, or a PAT without write:packages is used.

cat ~/.config/helm/registry/config.json | jq '.auths | keys'
gh api /user/packages/container/charts%2Fmyapp --jq '.visibility'
After helm repo add, helm install andy/myapp fails with 404 Not Found

Cause: Pages is not enabled or points to the wrong branch; or the Release asset that the URL in index points to was deleted.

curl -sI https://$GH_USER.github.io/helm-charts/index.yaml | head -1
gh release view myapp-0.5.0 --json assets --jq '.assets[].name'
Command-line tasks
1. Push myapp-0.5.0.tgz to the charts namespace in GHCR, and install that version.
helm push myapp-0.5.0.tgz oci://ghcr.io/$GH_USER/charts
helm install myapp oci://ghcr.io/$GH_USER/charts/myapp --version 0.5.0
2. Without changing Chart.yaml, set the version to 0.5.1-rc.1 and appVersion to the current commit's short hash when packaging.
helm package charts/myapp --version 0.5.1-rc.1 --app-version "$(git rev-parse --short HEAD)"
Scenario analysis
Your chart is used by 30 teams through Argo CD. This change changes resources 's default from empty to requests 100m/128Mi. How should the version be set and the release published?

A change to default values alters every deployment that does not override that value. It is a behavior change but does not break the values interface: bump the minor version (e.g., 0.6.0), state the impact clearly in the Release notes, and do not overwrite old versions. Since Argo CD applications pin the targetRevision version, each team upgrades on its own schedule; if some teams use a 0.* version range, remind them that they will automatically receive the new defaults.

Verified teaching videos

▶
Helm with oras-go v3 Demo Mirroring and Blocking Registries — Terry Howe
English · Demo of Helm's OCI client implementation (oras-go)
▶
What is Helm in Kubernetes? Helm and Helm Charts explained | Kubernetes Tutorial 23 — TechWorld with Nana
English · Chart repository concepts review (recorded in the Helm 2/3 era)

Official documentation

Video storyboard script (about 70 seconds)

Shot 1 · 0–25s
Visual: the merge button is pressed, and one tgz splits into two copies; one flies to GitHub Release + Pages, the other flies to GHCR.
Narration: merging publishes; the same package travels two channels.
Shot 2 · 25–50s
Visual: the version and appVersion counters in Chart.yaml, which tick up respectively on “template changes” and “application releases.”
Narration: version describes the chart package, appVersion describes the application; if the package content changes, version must change.
Shot 3 · 50–70s
Visual: someone tries to overwrite 0.5.0, and is stamped “Published, cannot be modified.”
Narration: don't change a published version; release a new one.
or score ≥ 70% on the quiz

Module 3 · Docs and signing: helm-docs, provenance, cosign

15:00 – 22:00 · Generate the README from values.yaml comments, with CI checks to prevent staleness; make release artifacts verifiable: HTTP repositories use PGP .prov, OCI uses cosign keyless
7 minhelm-docs v1.14.2 · cosign v3.1.4keyless signatures are written to the public transparency log★★★★☆
Learning objectives
  • Use # -- comments to document values,helm-docs to generate the values table in the README; in CI, use git diff --exit-code to block “forgot to regenerate.”
  • Explain .prov 's contents (Chart.yaml + the package's SHA256, PGP-signed) and helm package --sign / helm verify / helm install --verify the usage and limitations of
  • Use cosign to sign the chart pushed to GHCR by digest perform keyless signing and verify with identity constraints (certificate identity + OIDC issuer); enable verification in the Flux OCIRepository.
Prerequisites: Module 2; OIDC from the GitHub course. Importance:★★★★☆

What: documentation and provenance

MechanismQuestion answeredArtifactWho verifies
helm-docsWhat parameters, default values, and meanings does this chart have?README.md (generated by README.md.gotmpl + values comments)People; CI checks whether it is up to date
Helm provenance (PGP)Was this tgz published by the holder of a certain PGP private key, and has it not been tampered with?myapp-0.5.0.tgz.prov (PGP clearsign of Chart.yaml contents + package SHA256)helm verify,helm install --verify
cosign / SigstoreWas this OCI digest signed by a workflow in a certain repository?The signature is stored in the same OCI repository (cosign v3 uses the new bundle format by default and stores it as an OCI 1.1 referring artifact) + a Rekor transparency log entrycosign verify, Flux OCIRepository.spec.verify, admission controllers

Why

  • A hand-written README always goes stale; values comments sit right next to the code, so the generated table and defaults always match values.yaml.
  • A chart creates objects in the cluster with high privileges, so a supply-chain attack (a compromised repository or a replaced tag) can be severe; signing lets consumers before deploying verify the source.
  • Keyless signing requires no long-term private key: GitHub OIDC token → Fulcio issues a 10-minute short-lived certificate (with the workflow identity embedded) → signs and records to Rekor.

How: key details of the three

  • helm-docs: Write above values # -- description; # @default -- text to override the displayed default value; --chart-search-root=charts searched recursively; if none is README.md.gotmpl present, the built-in template is used. Provides pre-commit hooks (helm-docs,helm-docs-built,helm-docs-container).
  • provenance:helm package --sign --key '<uid substring>' --keyring <private key file>; --key must be a substring of the uid,fingerprints cannot be used; GnuPG 2.1+ private keys must first be gpg --export-secret-keys exported to a file; Helm 4.3.0+ can read it directly when verifying pubring.kbx. In CI, use --passphrase-file. .prov When in the same directory as the tgz,helm push and cr push will be uploaded together, and chart-releaser also uploads .prov as a Release asset.
  • cosign: The signing target must be digest (…/myapp@sha256:…), not a tag; when verifying, also constrain --certificate-identity (or -regexp) and --certificate-oidc-issuer, otherwise “anything signed with any GitHub workflow” will pass. The official Helm docs also mention helm-sigstore a plugin as an alternative; this lesson uses the general-purpose cosign.

When

  • Public HTTP repositories: .prov (Artifact Hub and similar sites display signing status).
  • OCI + GitOps: cosign keyless; Flux verifies on pull. Argo CD itself does not verify cosign signatures when pulling charts, but can verify via admission policies (such as Kyverno or Sigstore policy-controller) for images; chart-level verification follows each tool's documentation.
  • The two can be used together: push the tgz with .prov to OCI, then cosign-sign the digest.
Common misconceptions① “Signed means safe” — without constraining identity during verification, it is no verification at all. ② “cosign signing changes the chart's digest” — no; the signature is a separate artifact that references that digest. ③ “helm install --verify can verify cosign signatures on OCI” —--verify it only verifies PGP .prov.

Mechanism diagram: cosign keyless signing and verification

release.yaml jobid-token: writecosign sign …@sha256 GitHub OIDCJWT with aud=sigstore FulcioShort-lived certificate (with workflow identity) RekorTransparency log entry ghcr.io/<user>/charts/myapp0.5.0 → sha256:3b1f… ← signature artifact (bundle: certificate + signature + log proof) Consumers: cosign verify / Flux OCIRepositoryidentity = …/release.yaml@refs/heads/main · issuer = token.actions… Write signature Verify log proof + certificate chain
Figure 3-1 keyless: no long-term private key; trust rests on “which workflow signed it”

Comparison: .prov vs cosign

Helm provenance (.prov)cosign keyless
KeysLong-term PGP private key; must be stored and rotatedNo long-term private key; short-lived certificate + OIDC identity
Binds totgz SHA256 + Chart.yamlOCI manifest digest
Distribution.prov file next to the tgz / OCI provenance layerSignature artifact in the same repository + Rekor
Clienthelm verify,--verifycosign verify Flux, admission controllers
Suited forHTTP repositories, offline environmentsOCI, CI automation, GitOps

Animation: signing and verification chain (tampering can be injected)

Step through keyless signing and verification; choose an attack or mistake and observe at which step it is detected.

Scenario:
Select a scenario, then click Play.
$

Core commands

CommandPurpose
helm-docs --chart-search-root chartsGenerate README.md for all charts
helm package --sign --key 'Helm Lab' --keyring ~/.gnupg/secring.gpg --passphrase-file - charts/myappPackage and generate .prov
helm verify myapp-0.5.0.tgz --keyring pub.ascVerify .prov
cosign sign --yes ghcr.io/u/charts/myapp@sha256:…keyless signing (automatically uses OIDC in CI)
cosign verify … --certificate-identity … --certificate-oidc-issuer …Verification with identity constraints
# -- replica count; ignored when autoscaling is enabled
replicaCount: 2
image:
  # -- image repository
  repository: ghcr.io/andy/myapp
  # -- image tag
  # @default -- same as appVersion in Chart.yaml
  tag: ""
redis:
  # -- whether to deploy the bundled Redis subchart
  enabled: true
cd ~/helmlab/helm-charts
helm-docs --chart-search-root charts
sed -n '/## Values/,$p' charts/myapp/README.md | head -8
INFO[…] Found Chart directories [myapp]
INFO[…] Generating README Documentation for chart charts/myapp
## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| image.repository | string | `"ghcr.io/andy/myapp"` | image repository |
| image.tag | string | same as appVersion in Chart.yaml | image tag |
| redis.enabled | bool | `true` | whether to deploy the bundled Redis subchart |

PGP provenance

gpg --quick-generate-key "Helm Lab <helm-lab@example.com>" rsa3072 sign 1y
gpg --export-secret-keys "Helm Lab" > /tmp/secring.gpg      # Helm signing needs the private key as a file
gpg --export --armor "Helm Lab" > helm-lab-pub.asc
helm package --sign --key 'Helm Lab' --keyring /tmp/secring.gpg charts/myapp -d /tmp/pkg
cat /tmp/pkg/myapp-0.5.0.tgz.prov | head -12
helm verify /tmp/pkg/myapp-0.5.0.tgz --keyring helm-lab-pub.asc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

apiVersion: v2
appVersion: "1.1"
description: Flask + Redis counter demo used across the Helm course
name: myapp
version: 0.5.0

...
files:
  myapp-0.5.0.tgz: sha256:9d1c…
Signed by: Helm Lab <helm-lab@example.com>
Using Key With Fingerprint: 5A1E…
Chart Hash Verified: sha256:9d1c…

cosign: sign and verify OCI charts

REF=ghcr.io/$GH_USER/charts/myapp
DIGEST=$(helm show chart oci://$REF --version 0.5.0 2>&1 | awk '/^Digest:/{print $2}')
# verify (the signature is created by release.yaml on main)
cosign verify "$REF@$DIGEST" \
  --certificate-identity "https://github.com/$GH_USER/helm-charts/.github/workflows/release.yaml@refs/heads/main" \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com | jq '.[0].optional.Subject // .'
Verification for ghcr.io/andy/charts/myapp@sha256:3b1f… --
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - Existence of the claims in the transparency log was verified offline
  - The code-signing certificate was verified using trusted certificate authority certificates

Output format varies with the cosign version; use exit code 0 as the criterion. Common errors: Signing a tag :0.5.0 (cosign resolves it to a digest and warns, but the release process should use the digest explicitly).

Lab 3: add a helm-docs check and cosign signing to release.yaml (about 6 min)

Check in PRs whether the README is up to date (add to lint-test.yaml):
      - name: helm-docs up to date
        run: |
          docker run --rm -v "$PWD:/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.14.2 --chart-search-root charts
          git diff --exit-code -- charts/*/README.md || { echo "::error::README is stale, run helm-docs"; exit 1; }
Sign after release: add to the release job id-token: write, and append after chart-releaser:
    permissions:
      contents: write
      packages: write
      id-token: write          # required for cosign keyless
    steps:
      # ...(Module 2 steps)...
      - uses: sigstore/cosign-installer@v4.1.3     # installs the matching cosign v3.x by default
      - name: sign charts by digest
        if: steps.cr.outputs.changed_charts != ''
        run: |
          echo '${{ steps.cr.outputs.releases }}' | jq -r '.[] | "\(.chart) \(.version)"' | while read c v; do
            REF=ghcr.io/${{ github.repository_owner }}/charts/$c
            DIGEST=$(helm show chart oci://$REF --version "$v" 2>&1 | awk '/^Digest:/{print $2}')
            cosign sign --yes "$REF@$DIGEST"
            echo "### $c $v → $REF@$DIGEST" >> "$GITHUB_STEP_SUMMARY"
          done
Release 0.5.1 and verify locally: after merging the version bump, use the command in the “Commands” tab to cosign verify verify, then deliberately change --certificate-identity 's branch to refs/heads/dev, and confirm that verification fails (none of the expected identities matched).
Force verification in Flux (used in Module 5):
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata: { name: myapp, namespace: flux-system }
spec:
  interval: 5m
  url: oci://ghcr.io/andy/charts/myapp
  ref: { semver: "0.5.x" }
  layerSelector:
    mediaType: "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
    operation: copy
  verify:
    provider: cosign
    matchOIDCIdentity:
      - issuer: "^https://token.actions.githubusercontent.com$"
        subject: "^https://github.com/andy/helm-charts/.github/workflows/release.yaml@refs/heads/main$"
kubectl get ocirepository myapp -n flux-system -o jsonpath='{.status.conditions[?(@.type=="SourceVerified")].message}'
verified signature of revision 0.5.1@sha256:…

Case 1: README and default value mismatch cause misconfiguration

Problem: The README says persistence.enabled defaults to false, but it is actually true, so users get a Pending PVC on kind. Approach: helm-docs + PR check; in README.md.gotmpl add an “Upgrade notes” section maintained by hand.

Case 2: signature verification bypassed by relying on tags

Problem: An attacker with package write access re-pushes 0.5.0 a tag; consumers deploy by tag only. Approach: Sign only the digest; enable verify (unsigned new digests are rejected,SourceVerified=False); GitOps repos reference images by digest (Flux ref.digest).

Case 3: PGP private key leak

Problem: A long-lived private key stored in CI secrets was not rotated for years. Approach: Keep .prov on the public HTTP repository, but store the private key only in a protected environment (GitHub environment with required approval); at the same time, introduce keyless signing for OCI and gradually move verification to cosign.

Common errors and fixes

Error: private key not found / openpgp: key not found (helm package --sign)

Cause: keyring points to pubring.kbx or an old secring.gpg has no private key; or --key specifies a fingerprint.

gpg --list-secret-keys --keyid-format long
gpg --export-secret-keys "Helm Lab" > /tmp/secring.gpg
Error: openpgp: signature made by unknown entity (helm verify)

Cause: The keyring used for verification does not contain the signer's public key. Fix:--keyring helm-lab-pub.asc; Helm 4.3 can read ASCII-armored public keys and kbx files directly.

Error: signing [...]: getting signer: getting key from Fulcio: … no provider found / could not get OIDC token

Cause: the job is missing id-token: write, or it runs on a PR from a fork (no OIDC token available). Fix: Sign only in the main release job, and grant id-token: write.

Error: no matching signatures: none of the expected identities matched what was in the certificate

Cause:--certificate-identity does not match the actual signing workflow (path, branch, or tag ref).

cosign verify "$REF@$DIGEST" --certificate-identity-regexp '.*' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com -o json | jq -r '.[].optional.Subject'

Use only for diagnosis to see the actual identity; switch back to exact matching after confirming.

CLI exercises
1. Generate the README only for charts/myapp, and check for uncommitted changes.
helm-docs --chart-search-root charts/myapp && git diff --exit-code charts/myapp/README.md
2. Use cosign to verify that myapp 0.5.1 was signed by release.yaml on any branch of the helm-charts repository.
cosign verify "$REF@$DIGEST" \
  --certificate-identity-regexp "^https://github.com/$GH_USER/helm-charts/.github/workflows/release.yaml@refs/heads/.+$" \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com
Scenario analysis
The security team requires that “production clusters may only deploy charts signed by the release pipeline on the main branch of the main repository.” The GitOps tool is Flux. Provide an end-to-end design.

Release: only in release.yaml on main, package, push to GHCR, and sign by digest with cosign keyless (id-token: write), enable concurrency and environment protection. Consumption: set in the Flux OCIRepository verify.provider: cosign + matchOIDCIdentity (issuer exactly matches GitHub, subject exactly matches …/release.yaml@refs/heads/main), HelmRelease uses chartRef to reference it; flux-system RBAC forbids teams from modifying OCIRepository. Audit: alert on SourceVerified=False. Images are also verified for signatures by an admission controller.

Verified instructional videos

▶
What is sigstore? The future of supply chain security? — Cloud Native Skunkworks
English · Sigstore (Fulcio / Rekor / cosign) concepts

No verified dedicated videos were found for helm-docs and Helm provenance; see the storyboard script.

Official docs

Video storyboard (about 75 seconds)

Shot 1 · 0–20s
Visual: the # -- comments in values.yaml become table rows that flow into the README.
Narration: docs are written next to the parameters, generated by helm-docs, and CI checks that they are up to date.
Shot 2 · 20–45s
Visual: next to the tgz, a seal labeled SHA256 appears (.prov), and a key icon represents the PGP private key.
Narration: the traditional approach uses PGP signing, and verifiers need your public key.
Shot 3 · 45–75s
Visual: the workflow takes its OIDC ID card to Fulcio to get a 10-minute certificate; after signing, it is logged on the Rekor transparency board; Flux checks the workflow path on the ID card and lets it through.
Narration: keyless signing has no long-lived private key, so verification must always constrain the identity.
or score ≥ 70% on the Quiz

Module 4 · GitOps: managing Helm with Argo CD

22:00 – 30:00 · Argo CD treats the chart as a “template engine”: helm template renders → compare with the cluster → apply on its own; there is no Helm release, and hooks are translated into sync phases and waves
8 minutesArgo CD v3.6.1 (renders only with Helm v4 since 3.5)helm list does not show the release★★★★★
Learning objectives
  • Write an Application with a helm source (three types: HTTP repository / OCI / Git directory repoURL), and understand the precedence of releaseName,valueFiles,valuesObject, and parameters .
  • Use a multi-source Application: the chart comes from GHCR, and environment values come from Git (ref: values + $values/…).
  • Explain the consequences of “Argo CD renders rather than installs”: helm list is empty,lookup is unavailable,helm rollback is invalid, and hook mapping rules and exceptions (test hooks are not supported; defining any Argo CD hook causes all Helm hooks to be ignored).
Prerequisites: K8s Lesson 6 Module 5 (Argo CD installation, Application, selfHeal / prune); hooks from Lesson 6. Importance:★★★★★

What: how Argo CD handles a Helm chart

Official docs quote: Helm is used only to helm template render the chart; the application lifecycle is managed by Argo CD, not Helm. The repo-server fetches the chart → runs helm template with values (Helm v4 since 3.5) → yields manifests → application-controller diffs them against the live cluster state → applies in phase / wave order → health assessment.

Aspecthelm upgrade --installArgo CD helm source
release Secretsh.helm.release.v1.*None; state lives in the Application object, and resources carry Argo CD tracking labels/annotations
helm list / history / rollbackAvailableNot applicable; use argocd app history / rollback or git revert
Cluster informationlookup query live objectsrendering does not connect to the cluster,lookup returns empty; .Capabilities supplied by Argo CD (available as helm.kubeVersion / helm.apiVersions override, per the official docs)
Random valuesregenerated on every upgrade (randAlphaNum)differ on every render → permanent OutOfSync; change the chart or use fixed values
hooksExecuted per Helm eventsmapped to PreSync / Sync / PostSync / PreDelete / PostDelete; install and upgrade are not distinguished
Failure handling--rollback-on-failureno automatic rollback; a failed sync stays failed; can be configured with retry, rollback relies on Git

values sources and precedence

Official precedence: parameters > valuesObject > values > valueFiles > chart's own values.yaml. valueFiles Passed in the order listed to helm template --values (later ones override earlier ones); supports globs (expanded in lexical order); ignoreMissingValueFiles: true allows missing files.

Why: multi-source Application

When the chart is pulled from a Helm repository / OCI,valueFiles it can only reference files inside the chart package; environment values usually live in another Git repository. A multi-source Application lets one source provide the chart and another Git source use ref: values to provide $values prefix; paths are relative to that repo's root. A source that does not set path only provides files and generates no resources.

How: mapping of hooks to sync waves (Argo CD official table)

Helm annotationIn Argo CD
pre-install,pre-upgradePreSync (both run on every sync; Argo CD does not distinguish install from upgrade)
post-install,post-upgradePostSync
pre-delete / post-deletePreDelete / PostDelete
hook-weightequivalent to argocd.argoproj.io/sync-wave
hook-delete-policysupported, but cleaned up per Argo CD's sync semantics
helm.sh/resource-policy: keepequivalent to sync-options: Delete=false
crd-installhandled as a regular CRD by Argo CD
pre-rollback,post-rollback,test-success,test-failure,hook-delete-timeoutnot supported (ignored) —helm test pods will not run

Note: once the chart defines any Argo CD hook,all hooks are ignored. Hooks are created as kubectl apply resources; an existing hook with the same name is not changed unless it has before-hook-creation a deletion policy.

When

  • Need visual diffs, centralized multi-cluster management, or team self-service → Argo CD.
  • The chart heavily relies on lookup,helm test, hooks that distinguish install from upgrade, or downstream tools that depend on the release Secret → consider Flux (Module 5) or adjust the chart.
Common misconceptions① “A Helm app deployed by Argo CD can be changed with helm upgrade for emergency fixes”—this creates two managers; Argo CD reverts it on the next sync (and Helm cannot find the release, so it tries a fresh install and conflicts). ② “repoURL: oci://ghcr.io/…”—for helm-type OCI repositories, repoURL do not write oci://, and the chart name goes in the chart field. ③ “pre-install only runs on first install”—in Argo CD it runs on every sync.

Mechanism diagram: how Argo CD renders and syncs a Helm chart

GHCR chart sourcecharts/myapp 0.5.1 Git values sourceref: values → $values argocd-repo-serverhelm template (Helm v4)→ manifests (cached) application-controllerdiff desired vs liveSynced / OutOfSync ClusterDeployment…No release Secrethelm list = empty Phases and waves of one sync PreSyncpre-install/upgrade Sync: wave -1 → 0 → 1 …Each wave must be healthy before moving to the next PostSyncpost-install/upgrade
Figure 4-1: the chart and values can come from different sources; rendering happens in repo-server, and apply is done by the controller

Interactive: Helm hooks → Argo CD sync-order sorter

Below are the objects and annotations in the myapp chart. Click “Compute order” to see the actual execution order in Argo CD; check “chart has another Argo CD hook” to observe how all Helm hooks are ignored.

Core commands and manifests

CommandPurpose
argocd repo add ghcr.io/andy/charts --type helm --name ghcr --enable-ociRegister an OCI Helm repository (for private ones, add --username/--password)
argocd app create -f app.yaml / kubectl apply -f app.yamlCreate the Application
argocd app manifests myapp --source gitView the rendered manifests
argocd app diff myappDiff desired vs live state
argocd app sync myapp / argocd app wait myapp --healthSync and wait for health
argocd app history myapp / argocd app rollback myapp <ID>Argo CD's own deployment history (rollback requires disabling auto-sync first)
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp-dev
  namespace: argocd
spec:
  project: default
  sources:
    - repoURL: ghcr.io/andy/charts        # OCI: do not write oci://
      chart: myapp
      targetRevision: 0.5.1               # pinned version; a range such as 0.5.* also works
      helm:
        releaseName: myapp
        valueFiles:
          - $values/gitops/values/common.yaml
          - $values/gitops/values/dev.yaml
        valuesObject:
          replicaCount: 1                 # takes precedence over valueFiles
    - repoURL: https://github.com/andy/helm-charts.git
      targetRevision: main
      ref: values                         # only provides values files; do not set path
  destination:
    server: https://kubernetes.default.svc
    namespace: myapp-argo
  syncPolicy:
    automated: { prune: true, selfHeal: true }
    syncOptions: [CreateNamespace=true, ServerSideApply=true]
    retry:
      limit: 3
      backoff: { duration: 10s, factor: 2, maxDuration: 2m }
kubectl apply -f gitops/argocd/myapp-dev.yaml
argocd app wait myapp-dev --health --timeout 180
argocd app get myapp-dev -o tree | head -12
helm list -n myapp-argo                      # empty: Argo CD does not create a release
kubectl get secret -n myapp-argo -l owner=helm
Name:               argocd/myapp-dev
Sync Status:        Synced to 0.5.1
Health Status:      Healthy
KIND        NAMESPACE   NAME          STATUS  HEALTH
Service     myapp-argo  myapp         Synced  Healthy
Service     myapp-argo  myapp-redis   Synced  Healthy
Deployment  myapp-argo  myapp         Synced  Healthy
Deployment  myapp-argo  myapp-redis   Synced  Healthy
NAME	NAMESPACE	REVISION	UPDATED	STATUS	CHART	APP VERSION
No resources found in myapp-argo namespace.

How to verify:kubectl get deploy myapp -n myapp-argo -o yaml | grep -A3 annotations You should see Argo CD's tracking annotations (the default tracking method in v3 is annotation; follow the actual output). Common mistake: Also setting path on the values source of a multi-source app causes Argo CD to try to render the values directory as manifests.

Lab 4: deploy myapp from GHCR with Argo CD (about 7 minutes)

Install Argo CD into the kind lab (for installation details, see K8s Lesson 6):
kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.6.1/manifests/install.yaml
kubectl -n argocd rollout status deploy/argocd-repo-server
argocd login --core            # operate directly via kubeconfig, no need to expose the UI
kubectl config set-context --current --namespace argocd
Prepare environment values: in the helm-charts repository gitops/values/ create common.yaml (image repository) and dev.yaml (image.tag: "1.1",resources), and commit to main.
Create the Application and verify: using the manifest from the Commands tab, run argocd app wait, then access the service:
kubectl -n myapp-argo port-forward svc/myapp 8081:80 &
curl -s localhost:8081/healthz
Observe hook mapping: if the myapp chart has the Lesson 6 pre-upgrade database migration Job, sync twice with argocd app sync myapp-dev, and confirm that it runs every time (kubectl get jobs -n myapp-argo -w); helm test pods will not be created.
Practice drift and failure: kubectl scale deploy/myapp -n myapp-argo --replicas=5, and selfHeal reverts it to 1 within seconds. In Git, change the dev.yaml of image.tag to a nonexistent 9.9 and push:
argocd app get myapp-dev --refresh | grep -E "Sync Status|Health Status"
# rollback = revert the commit in Git (argocd app rollback is rejected while auto-sync is on)
git revert --no-edit HEAD && git push
Sync Status:        Synced to 0.5.1
Health Status:      Progressing          ← new Pod ImagePullBackOff, old ReplicaSet still serving
Sync Status:        Synced to 0.5.1
Health Status:      Healthy              ← restored after revert

Argo CD has no “automatic rollback on failed upgrade”; by default a Deployment stays Progressing until progressDeadlineSeconds (default 600 seconds) and then becomes Degraded. For automatic rollback, see Module 5 (Flux) and Module 7 (Argo Rollouts).

Case 1: a Secret that is permanently OutOfSync

Problem: The chart uses randAlphaNum 16 to generate the Redis password, and lookup to reuse existing values; in Argo CD lookup returns empty, so the password differs on every render; the Secret stays OutOfSync forever, and selfHeal keeps changing the password, causing Redis authentication failures. Approach: Provide the password from External Secrets or a pre-created Secret, and the chart supports existingSecret.

Case 2: HPA conflicts with replicas

Problem: With HPA enabled, the chart still renders replicas. Approach: In the template, guard {{- if not .Values.autoscaling.enabled }}replicas: …{{- end }}; or in the Application, use ignoreDifferences /spec/replicas along with RespectIgnoreDifferences=true.

Case 3: migrating from helm install to Argo CD

Problem: An existing Helm release needs to be handed over to Argo CD. Approach: The Application uses the same releaseName and namespace; the first sync takes over with SSA; after confirming, delete the release Secret (kubectl delete secret -l owner=helm,name=myapp), and do not helm uninstall (this deletes the resources). Before migrating, first argocd app diff.

Common errors and fixes

ComparisonError: rpc error: … failed to fetch chart: … 401 Unauthorized / unexpected status code

Cause: the private GHCR package has no registered credentials, or repoURL was written as oci://….

argocd repo list
argocd repo add ghcr.io/andy/charts --type helm --name ghcr --enable-oci --username andy --password "$GH_PAT_READ"
Error: open $values/gitops/values/dev.yaml: no such file or directory

Cause: a single-source Application uses $values, or the ref name is inconsistent; the path should be relative to the root of the values repository. Fix: Change it to sources a multi-source Application, and in the second source write ref: values; or use ignoreMissingValueFiles (with caution).

The app stays OutOfSync; the diff only shows Secret data or some annotation changing

Cause: the template contains random/time functions (randAlphaNum,now),lookup, or another controller has changed the fields.

argocd app diff myapp-dev
argocd app manifests myapp-dev | grep -n "randAlpha\|checksum" 

Fix: Remove non-deterministic templates; for fields managed by external controllers, use ignoreDifferences.

Pods for helm test / test-success never run, and the post-rollback hook does not run either

Cause: Argo CD does not support these hooks (per the official mapping table). Fix: Change the smoke test to a argocd.argoproj.io/hook: PostSync Job.

CLI exercises
1. View the rendered Deployment for myapp-dev and confirm the image tag.
argocd app manifests myapp-dev | yq 'select(.kind=="Deployment") | .spec.template.spec.containers[].image'
2. Temporarily override one Helm parameter from the command line (this writes to the Application's parameters).
argocd app set myapp-dev --helm-set replicaCount=2

In GitOps, change Git rather than the command line; with auto-sync + selfHeal, this change may be overwritten by Git (depending on whether the Application itself is also managed by Git).

Scenario analysis
In the chart, a pre-upgrade hook runs the database migration, and a post-install hook creates the initial admin. After switching to Argo CD deployment, every sync tries to create the admin and fails with an error. Why? How do you fix it?

Argo CD does not distinguish install from upgrade; post-install maps to PostSync and runs on every sync. Fix: make the Job idempotent (skip if it already exists); or disable this hook via values when deploying with Argo CD, and run it as a one-time manual/pipeline step instead; for the migration Job, add hook-delete-policy: before-hook-creation to ensure it is recreated every time.

Verified teaching videos

▶
How to Use Private OCI Helm Repositories in Argo CD — Akuity
English · directly on this module: connecting a private OCI Helm repository to Argo CD
▶
ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes — TechWorld with Nana
English · Argo CD beginner review (recorded before v3)

Official docs

Video storyboard (about 70 seconds)

Shot 1 · 0–25s
Visual: the chart goes into repo-server's “printing press,” and a stack of YAML comes out; the Helm label stays inside the machine and never enters the cluster.
Narration: Argo CD only borrows Helm to render templates; it does the installation itself, so helm list is empty.
Shot 2 · 25–50s
Visual: two conveyor belts, one carrying the chart and one carrying values, merging at $values.
Narration: a multi-source Application keeps the chart and environment config stored separately.
Shot 3 · 50–70s
Visual: the pre-install and pre-upgrade cards both drop into the PreSync slot.
Narration: Argo CD does not distinguish install from upgrade; the pre and post hooks run on every sync.
or score ≥ 70% on the quiz

Module 5 · GitOps: Flux HelmRelease

30:00 – 38:00 · Flux's helm-controller embeds the Helm SDK and runs real install / upgrade / rollback: releases show up in helm list, and failures are automatically rolled back and retried per remediation
8 minutesFlux v2.10.0 · helm-controller v1.7.1 · HelmRelease v2Core animation★★★★★
Learning objectives
  • Draw the HelmRelease reconciliation chain: GitRepository → Kustomization applies HelmRelease → OCIRepository / HelmRepository pulls the chart → helm-controller composes values, decides the action, executes, waits (kstatus poller) → test → drift detection.
  • Configure install.remediation and upgrade.remediation (retries, strategy rollback/uninstall, remediateLastFailure), as well as upgrade.strategy (RemediateOnFailure / RetryOnFailure).
  • Enable driftDetection.mode: enabled and use ignore rules to exclude fields managed by the HPA; use dependsOn to orchestrate release order; you will also use flux reconcile hr --reset / --force.
Prerequisites: K8s Lesson 6 Flux introduction; cosign verification from Module 3 of this lesson. Importance:★★★★★

What: HelmRelease is a “declarative helm upgrade --install”

helm-controller calls the Helm SDK directly: release records are still written as usual in storage namespace (by default, the same namespace as the HelmRelease) sh.helm.release.v1.* Secret, so helm list / history / get values can all see it, but do not use the Helm CLI to modify it, otherwise the next reconciliation will overwrite it or flag it as drift.

ObjectControllerRole
GitRepository + Kustomizationsource / kustomize-controllerApplies the HelmRelease, OCIRepository, and values ConfigMap from Git to the cluster
OCIRepository (source.toolkit.fluxcd.io/v1)source-controllerPulls the OCI chart by semver / tag / digest, optionally verifies it with cosign / notation; HelmRelease references it via chartRef (recommended in the official examples)
HelmRepository + .spec.chart Templatesource-controllerHTTP repository (e.g. gh-pages); the HelmRelease's spec.chart template generates a HelmChart object
HelmRelease (helm.toolkit.fluxcd.io/v2)helm-controllerComposes values (valuesFrom + values), install/upgrade/test/rollback/uninstall, drift detection

How: decisions in one reconciliation (simplified)

  1. Dependencies (dependsOn) all Ready? If not, wait.
  2. Get the chart artifact (the OCIRepository revision is <version>+<first 12 digest characters>, a digest change triggers an upgrade even if the version stays the same).
  3. Compose values and compute the config digest; compare release storage with the HelmRelease history: not present → install; config/chart changed → upgrade; consistent → skip to drift detection.
  4. Run the Helm action, then wait for readiness per waitStrategy (default poller, i.e. kstatus); optionally run helm test.
  5. On failure: Released=False (InstallFailed / UpgradeFailed), perform rollback (upgrade) or uninstall (install) per remediation, increment the counter by +1, and requeue; after retries are exhausted, stay failed (Ready=False), until the config changes, a new chart version, or --reset.
  6. On success and consistent: driftDetection use a server-side dry-run apply to compare the manifests in Helm storage with the cluster,warn only emits events, while enabled will be corrected.
FieldDefaultDescription (from the HelmRelease v2 docs)
install.remediation.retries0Number of retries after an install failure; uninstall before each retry; negative value = unlimited
upgrade.remediation.retries0Number of retries after an upgrade failure; remediate per
upgrade.remediation.strategyrollbackor uninstall (reinstalls afterwards)
upgrade.remediation.remediateLastFailuretrue when retries > 0whether to also remediate (roll back) the last failure after retries are exhausted
upgrade.strategy.nameRemediateOnFailureRetryOnFailure: no remediation; retry at retryInterval (default 5m)
driftDetection.modeNot enabledwarn / enabled; ignore exclude by path and target
waitStrategy.namepollerkstatus polling; legacy is the Helm v3 wait logic
maxHistory5Number of revisions to keep
releaseName[<targetNamespace>-]<name>Names longer than 53 characters are truncated with a hash; renaming = uninstall and reinstall

Why / When: how Flux and Argo CD handle Helm

Argo CD (Module 4)Flux HelmRelease
Execution methodhelm template + its own applyHelm SDK install/upgrade
helm listNot visibleVisible (read-only use)
hooks / helm test / lookupMapped / partially unsupported / unavailableSame as Helm
Failed upgradeNo automatic rollback; relies on Git revertremediation with automatic rollback + retries
DriftselfHeal (based on rendered output)driftDetection (based on the manifests in Helm storage)
VisualizationStrongCLI / events / third-party UI
Common misconceptions① “Since helm list can see it, helm rollback can be used for emergencies”—you can run it, but the HelmRelease desired state has not changed, so the next reconciliation (or drift correction) upgrades again; for emergencies, you should flux suspend hr then act, or change Git directly. ② “Once retries are exhausted, it keeps retrying”—no, it stays failed until a new config or --reset. ③ “Changing releaseName / targetNamespace is just a rename”—this uninstalls the old release and reinstalls it (downtime).

Architecture diagram: Helm delivery in Flux

Git: gitops/fluxHelmRelease · OCIRepo GHCRcharts/myapp + signature kustomize-controllerApply HelmRelease object source-controllerOCIRepository + cosign verification helm-controllerHelm SDK: install/upgradepoller wait · test · remediationdriftDetection Namespace myapp-fluxDeployment/Service…sh.helm.release.v1.myapp.v3Visible in helm list watch HRArtifact
Figure 5-1: division of labor among the three controllers: fetch Git, fetch the chart, run Helm

State diagram: failed upgrade and remediation (retries: 3, strategy: rollback)

v2 deployed upgrade v3poller timeout UpgradeFailedupgradeFailures=n rollback → v4=v2Remediated=True n ≤ 3: requeue and upgrade againReconciling ProgressingWithRetry Exhausted: Ready=False, stopWait for new config / --reset
Figure 5-2: each failure first rolls back to the last successful version, so production always runs the old version

Core animation: GitOps reconciling a HelmRelease

Choose a scenario and step through it: Git change → source controllers fetch the chart and values → helm-controller renders and decides the action → upgrade → health check (kstatus) → on failure, roll back per remediation. On the right are the HelmRelease conditions and helm history.

Scenario:
Git commitdev values / version source-controllerGit + OCI pull/verify kustomize-ctrlapply HelmRelease helm-controllerdependencies · values · render · decide Helm upgrade (SSA)Write release vN kstatus pollerWait for Ready / timeout remediationrollback · counter · retry Ready=True / drift detectionSSA dry-run comparison and correction
Choose a scenario, then click “Next” or “Autoplay”.
$ flux get hr myapp -n myapp-flux

Core commands

CommandPurpose
flux get sources oci -A / flux get hr -ASources and HelmRelease status
flux reconcile hr myapp -n myapp-flux --with-sourceReconcile now (refresh sources first)
flux reconcile hr myapp --resetReset the failure counter and retry
flux reconcile hr myapp --forceForce one install/upgrade (without changing the spec)
flux suspend hr myapp / flux resume hr myappSuspend/resume (before emergency manual operations)
flux events --for HelmRelease/myapp -n myapp-fluxEvents (drift summary, failure reasons)
flux debug hr myapp -n myapp-flux --show-valuesOutput the final composed values
helm history myapp -n myapp-fluxRead-only view of Helm revisions
apiVersion: v1
kind: Namespace
metadata: { name: myapp-flux }
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata: { name: myapp, namespace: myapp-flux }
spec:
  interval: 5m
  url: oci://ghcr.io/andy/charts/myapp
  ref: { semver: "0.5.x" }
  layerSelector:
    mediaType: "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
    operation: copy
  verify:
    provider: cosign
    matchOIDCIdentity:
      - issuer: "^https://token.actions.githubusercontent.com$"
        subject: "^https://github.com/andy/helm-charts/.github/workflows/release.yaml@refs/heads/main$"
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata: { name: myapp, namespace: myapp-flux }
spec:
  interval: 10m
  timeout: 3m
  chartRef: { kind: OCIRepository, name: myapp }
  releaseName: myapp
  install:
    remediation: { retries: 3 }
  upgrade:
    cleanupOnFail: true
    remediation:
      retries: 2
      strategy: rollback
      remediateLastFailure: true
  test:
    enable: true                     # run the chart's helm test (Lesson 2)
  driftDetection:
    mode: enabled
    ignore:
      - paths: ["/spec/replicas"]
        target: { kind: Deployment }
  valuesFrom:
    - kind: ConfigMap
      name: myapp-dev-values         # generated from values/dev.yaml by the configMapGenerator in gitops/kustomization.yaml
  values:
    replicaCount: 1
flux get hr myapp -n myapp-flux
helm list -n myapp-flux
helm history myapp -n myapp-flux
NAME 	REVISION         	SUSPENDED	READY	MESSAGE
myapp	0.5.1+3b1f0c4d2e9a	False    	True 	Helm install succeeded for release myapp-flux/myapp.v1 with chart myapp@0.5.1+3b1f0c4d2e9a
NAME 	NAMESPACE 	REVISION	UPDATED                	STATUS  	CHART      	APP VERSION
myapp	myapp-flux	1       	2026-11-15 10:40:12 UTC	deployed	myapp-0.5.1	1.1
REVISION	UPDATED                 	STATUS  	CHART      	APP VERSION	DESCRIPTION
1       	Sat Nov 15 10:40:12 2026	deployed	myapp-0.5.1	1.1        	Install complete

How to verify:kubectl get hr myapp -n myapp-flux -o jsonpath='{.status.history[0].chartVersion}'; kubectl get secret -n myapp-flux -l owner=helm You should see the release Secret. Message text follow the actual helm-controller output.

Lab 5: deploy myapp with Flux and practice automatic rollback on a failed upgrade (about 7 minutes)

Install Flux (lab: flux install; production: flux bootstrap github, see K8s Lesson 6):
flux check --pre
flux install
flux create source git helm-charts --url=https://github.com/$GH_USER/helm-charts --branch=main --interval=1m
flux create kustomization myapp-flux --source=GitRepository/helm-charts --path=./gitops --prune=true --interval=5m
Commit the Flux manifests: save the manifest from the Commands tab as gitops/flux/myapp.yaml, and in gitops/ the root directory, add a kustomization (so the generator can reference the values/dev.yaml, avoiding kustomize's “files outside the root directory cannot be loaded” restriction):
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: [flux/myapp.yaml]          # does not include the argocd/ directory
configMapGenerator:
  - name: myapp-dev-values
    namespace: myapp-flux
    files: [values.yaml=values/dev.yaml]
generatorOptions:
  disableNameSuffixHash: true
git add gitops && git commit -m "gitops: flux myapp" && git push
flux reconcile ks myapp-flux --with-source
kubectl -n myapp-flux wait hr/myapp --for=condition=Ready --timeout=5m
Verify Helm visibility and drift correction:
helm list -n myapp-flux
kubectl -n myapp-flux set env deploy/myapp DEBUG=1      # cause drift (replicas is already ignored, so change env instead)
flux reconcile hr myapp -n myapp-flux
flux events --for HelmRelease/myapp -n myapp-flux | tail -3
kubectl -n myapp-flux get deploy myapp -o jsonpath='{.spec.template.spec.containers[0].env}'
… DriftDetected   Cluster state of release myapp-flux/myapp.v1 has drifted from the desired state: Deployment/myapp-flux/myapp changed (0 additions, 1 changes, 0 removals)
… DriftCorrected  …
[{"name":"REDIS_HOST","value":"myapp-redis"}]
Failed upgrade: change the gitops/values/dev.yaml of image.tag to 9.9 , push, and observe:
flux reconcile ks myapp-flux --with-source
watch -n5 "flux get hr myapp -n myapp-flux; helm history myapp -n myapp-flux --max 6"
myapp	0.5.1+3b1f0c4d2e9a	False	False	… upgrade retries exhausted …(the last failure was also rolled back)
REVISION	STATUS    	CHART      	DESCRIPTION
2       	failed    	myapp-0.5.1	Upgrade "myapp" failed: resource Deployment/myapp-flux/myapp not ready. status: InProgress, message: …
3       	superseded	myapp-0.5.1	Rollback to 1
4       	failed    	myapp-0.5.1	Upgrade "myapp" failed: …
5       	superseded	myapp-0.5.1	Rollback to 3
6       	failed    	myapp-0.5.1	Upgrade "myapp" failed: …
7       	deployed  	myapp-0.5.1	Rollback to 5

retries: 2 → 3 upgrade attempts in total (1 + 2 retries), rolling back after each failure; the last failure is also rolled back (remediateLastFailure). Production always runs the old Pods. Exact counts and description text follow the actual output.

Fix and recover: git revert commit and push it. A values change resets the failure counter, and HelmRelease returns to Ready; if the issue is only external (e.g. the image was pushed later), use flux reconcile hr myapp -n myapp-flux --reset.

Case 1: stuck at “upgrade retries exhausted”

Problem: A failed upgrade on Friday exhausted its retries; on Monday, after the image was fixed, the HelmRelease still did not move. Cause: After retries are exhausted, the controller stops until the spec, values, or chart changes, or it is reset. Approach:flux reconcile hr --reset; set up an alert rule that watches Ready=False for more than 15 minutes (via Flux notification-controller or kube-state-metrics custom metrics).

Case 2: platform component ordering

Problem: The myapp chart renders a ServiceMonitor, but kube-prometheus-stack is not installed yet, so the first install fails with no matches for kind "ServiceMonitor". Approach: Add to the myapp HelmRelease dependsOn: [{name: kube-prometheus-stack, namespace: monitoring}]; for CRDs, use install.crds: CreateReplace / upgrade.crds: CreateReplace to let Helm manage them.

Case 3: HPA and drift correction overwrite each other

Problem: With driftDetection: enabled enabled, the replica count scaled up by the HPA is reverted every time. Approach:ignore /spec/replicas (target Deployment); or the chart does not render replicas when HPA is enabled.

Common errors and fixes

HelmRelease Ready=False: upgrade retries exhausted / Failed to upgrade after 3 attempt(s)
kubectl -n myapp-flux get hr myapp -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
kubectl -n myapp-flux get hr myapp -o jsonpath='{.status.upgradeFailures}'
flux events --for HelmRelease/myapp -n myapp-flux

Fix: fix the root cause (image, probes, resources) → change Git or flux reconcile hr myapp --reset.

OCIRepository: no matching signatures / SourceVerified False

Cause: the new version is unsigned, or the subject regex does not match the workflow reference (e.g. a release triggered from a tag is @refs/tags/…).

flux get sources oci myapp -n myapp-flux
cosign verify ghcr.io/andy/charts/myapp@sha256:… --certificate-identity-regexp '.*' --certificate-oidc-issuer https://token.actions.githubusercontent.com -o json | jq -r '.[].optional.Subject'
dependency 'myapp-flux/redis' is not ready

Cause:dependsOn 's HelmRelease is not Ready yet (or the name/namespace is wrong, or there is a circular dependency). Fix:flux get hr -A Fix the upstream first.

Helm install failed … rendered manifests contain a resource that already exists … invalid ownership metadata

Cause: the object was previously created by helm install (another release name) or by Argo CD. Fix: make sure releaseName / namespace match the original release to take ownership; or delete the old object; HelmRelease takes ownership on upgrade by default (disableTakeOwnership can be turned off), per the official docs.

CLI exercises
1. Before an emergency, suspend the HelmRelease, manually run helm rollback to revision 1, then resume.
flux suspend hr myapp -n myapp-flux
helm rollback myapp 1 -n myapp-flux --wait
# After fixing Git:
flux resume hr myapp -n myapp-flux

resume, and the controller reconciles again against the desired state in Git.

2. View the final values that helm-controller uses for rendering.
flux debug hr myapp -n myapp-flux --show-values
Scenario analysis
The team requires “a failed upgrade must not affect production, and it must not retry indefinitely and noisily trigger alerts,” while also requiring “helm history must be visible for auditing.” Write out the key HelmRelease fields and explain them.

Flux (helm list/history visible). upgrade.remediation.retries: 2,strategy: rollback,remediateLastFailure: true → on failure, roll back to the last successful version; stop after at most 3 attempts; timeout: 3m + the default poller (kstatus) ensures timeouts are detectable; upgrade.cleanupOnFail: true clean up newly created resources; maxHistory: 10 keep the audit trail; alerts listen for Ready=False / UpgradeFailed events.

Verified teaching videos

▶
Flux CD v2 With GitOps Toolkit - Kubernetes Deployment And Sync Mechanism — DevOps & AI Toolkit
English · Flux v2 controller roles (recorded earlier; API versions follow this lesson: HelmRelease v2, source v1)
▶
Flux GitOps Tutorial - DevOps and GitOps for Kubernetes — Techno Tim
English · Flux getting-started demo

Official docs

Video storyboard (about 80 seconds)

Shot 1 · 0–20s
Visual: a Git commit lights up, and three controllers hand off in turn: fetch the source, apply the HelmRelease, run Helm.
Narration: Flux turns helm upgrade into an object that is continuously reconciled.
Shot 2 · 20–55s
Visual: the new Pod stays in ImagePullBackOff, the timer reaches 3 minutes, a red UpgradeFailed appears, then a rollback arrow pulls the version back to green v1, and the counter shows 1/3.
Narration: the upgrade fails, helm-controller rolls back per remediation and retries, and when retries are exhausted it stops and waits for you.
Shot 3 · 55–80s
Visual: myapp appears in helm list in the terminal; someone runs kubectl edit, and the event stream shows DriftDetected and DriftCorrected.
Narration: unlike Argo CD, here there is a real Helm release, plus drift correction based on Helm storage.
or score ≥ 70% on the quiz

Module 6 · Helmfile and multi-release orchestration

38:00 – 45:00 · One declarative file describes multiple releases, multiple environments, and dependencies; diff first, and apply only touches what has changed—a push-based “mini GitOps”
7 minutesHelmfile v1.8.4 · helm-diff v3.15.15Starting with v1, template files need the .gotmpl suffix★★★★☆
Learning objectives
  • Write helmfile.yaml.gotmpl: environments,repositories (including OCI),helmDefaults,releases,needs, and values templates.
  • Understand the difference between helmfile -e dev diff / apply / sync / destroy , and in CI use diff --detailed-exitcode to preview changes.
  • Decide when to use Helmfile (push-based, a few clusters, local/CI orchestration, environment bootstrapping), when to use Argo CD / Flux (continuous reconciliation, multiple clusters, drift governance), and how to combine the two (Argo CD's Helmfile plugin, Flux's dependsOn as a replacement for needs).
Prerequisites: Modules 1–5; Lesson 1 helm upgrade --install. Importance:★★★★☆

What: what Helmfile does

Helmfile is a declarative orchestrator for Helm: it reads helmfile (which can be layered and templated) → composes the values for each release for the selected environment → sorts by needs builds the dependency graph → calls helm (diff depends on the helm-diff plugin). It has no in-cluster controller, runs once and exits; releases are regular Helm releases (helm list visible). The official docs say Helmfile supports Helm 3.x and 4.x; starting with v1.8.2, under Helm 4 it skips the removed --recreate-pods.

CommandBehavior
helmfile initChecks / installs dependencies (helm, helm-diff, etc.); runs once after first installation
helmfile -e dev templateRenders all releases (without connecting to the cluster)
helmfile -e dev diffRuns helm diff for each release; --detailed-exitcode returns 2 when there are changes
helmfile -e dev applyDiff first,only for releases with changes runs upgrade; uninstalls releases marked installed: false releases
helmfile -e dev syncRuns upgrade --install on all releases (no diff first)
helmfile -e dev destroyUninstalls in reverse dependency order
-l name=myapp / --include-needsSelectors operate on only some releases, optionally including their dependencies

Why: one person / one pipeline manages multiple releases

  • Multiple helm upgrade commands are scattered across scripts, with environment differences handled by if/else; Helmfile puts “what to install, in what order, and which values for which environment” into one reviewable file.
  • apply 's diff-then-sync gives CI a readable change preview; PR reviewers can see which objects would change.

How: file conventions in v1

  • Starting with Helmfile v1, only helmfiles whose extension is .gotmpl are rendered as Go templates (helmfile.yaml.gotmpl); when using environment values in the same file, use --- to split environments and releases into two documents.
  • OCI repositories: repositories in oci: true,url without oci://, the release writes chart: <repo-name>/myapp.
  • needs Write it as [namespace/]name; Helmfile runs in dependency batches, and releases within the same batch run in parallel.
  • A release's values file can also be .gotmpl, which can reference .Values (environment values) and .Release.Name etc.

When: Helmfile vs GitOps

DimensionHelmfile (push)Argo CD / Flux (pull)
Where it runsDeveloper machine / CI, requires cluster credentialsIn-cluster controller; CI needs no cluster write permissions
DriftOnly discovered on the next run (diff)Continuous detection and correction
Dependency orderingneedsArgo CD sync waves / Flux dependsOn
Best forCluster bootstrapping (installing Argo CD/Flux itself), a few clusters, local dev environments, one-time migrationsLong-running production clusters, multi-cluster
Common misconceptions① “helmfile apply rolls back failed releases”—it just calls helm one by one; rollback depends on the arguments passed to helm (in Helm 4 it is --rollback-on-failure, and the corresponding helmDefaults key; follow the Helmfile docs). ② “needs waits for the app to be healthy”—you need to also enable wait, otherwise the upstream is only “submitted to the API”. ③ “You can freely write {{ }} in helmfile.yaml”—in v1, files that are not .gotmpl are not rendered as templates.

Structure diagram: helmfile layering

environmentsdev: env/dev.yamlprod: env/prod.yaml repositoriesandy: ghcr.io/andy/charts (oci)Local chart path releasesredis (ns myapp-hf)myapp needs: [myapp-hf/redis]values: values/myapp.yaml.gotmplinstalled: {{ .Values.myapp.enabled }}helmDefaults: wait, timeout helmfile -e dev apply1. Compose values for each release2. Batch by dependency graph: [redis] → [myapp]3. helm diff upgrade (for each release)4. Changed ones → helm upgrade --install5. installed:false → helm uninstall
Figure 6-1: three declaration blocks—environments, repositories, and releases; on apply, diff and upgrade run in dependency batches

Interactive: needs dependency graph and execution batches

Click the dependency toggles between releases to see the batches Helmfile computes (releases in the same batch can run in parallel; destroy in reverse order when uninstalling). Turn on “Create cycle” to watch the error.

Example helmfile

environments:
  dev:
    values: [env/dev.yaml]
  prod:
    values: [env/prod.yaml]
---
helmDefaults:
  wait: true
  timeout: 300
  createNamespace: true
  historyMax: 10

repositories:
  - name: andy
    url: ghcr.io/andy/charts
    oci: true

releases:
  - name: redis
    namespace: myapp-hf
    chart: ../charts/redis          # local redis chart from Lesson 2 (copied into the repo)
    values:
      - values/redis.yaml
  - name: myapp
    namespace: myapp-hf
    chart: andy/myapp
    version: {{ .Values.myapp.chartVersion }}
    installed: {{ .Values.myapp.enabled }}
    needs:
      - myapp-hf/redis
    values:
      - values/myapp.yaml.gotmpl
    set:
      - name: redis.enabled         # use a separate redis release
        value: false
# environment values: used by helmfile and *.gotmpl values
myapp:
  enabled: true
  chartVersion: 0.5.1
  imageTag: "1.1"
  replicas: 1
replicaCount: {{ .Values.myapp.replicas }}
image:
  tag: {{ .Values.myapp.imageTag | quote }}
redis:
  host: redis-master.{{ .Release.Namespace }}.svc   # use the actual service name of your redis chart
cd ~/helmlab/helm-charts/deploy
helmfile init                  # install helm-diff (Helm 4 verifies plugin provenance)
helmfile -e dev lint
helmfile -e dev diff --detailed-exitcode; echo "exit=$?"
helmfile -e dev apply
helm list -n myapp-hf
Comparing release=redis, chart=../charts/redis, namespace=myapp-hf
myapp-hf, redis-master, StatefulSet (apps) has been added:
+ …
Comparing release=myapp, chart=andy/myapp, namespace=myapp-hf
myapp-hf, myapp, Deployment (apps) has been added:
+ …
exit=2
…
UPDATED RELEASES:
NAME    NAMESPACE   CHART        VERSION   DURATION
redis   myapp-hf    ../charts/redis 0.1.0      28s
myapp   myapp-hf    andy/myapp   0.5.1         19s
NAME 	NAMESPACE	REVISION	STATUS  	CHART      	APP VERSION
myapp	myapp-hf 	1       	deployed	myapp-0.5.1	1.1
redis	myapp-hf 	1       	deployed	redis-0.1.0	7.4

How to verify: Run without making any changes helmfile -e dev apply, and it should show no changes and upgrade no releases (revision unchanged). helm-diff installation (Helm 4): Helm 4 verifies plugin provenance by default; the helm-diff project recommends importing its GPG public key and then installing from the Release's tarball URL (git repository URLs do not support provenance verification); see the helm-diff README.

Lab 6: orchestrate redis + myapp with Helmfile (about 6 minutes)

Prepare: copy the local redis chart from Lesson 2 into charts/redis, then follow the Commands tab to create the deploy/ directory.
First apply: helmfile -e dev apply, and confirm that redis finishes before myapp (in the log, redis's UPDATED line appears first).
Change preview: change env/dev.yaml in replicas to 2, then run helmfile -e dev diff, and you should see only the myapp Deployment's replicas change; then run apply, and confirm that only myapp's revision goes up by +1.
Preview in CI: add a job to the PR workflow (use kind or a read-only kubeconfig pointing to a test cluster):
      - name: helmfile diff
        run: |
          helmfile -f deploy/helmfile.yaml.gotmpl -e dev diff --detailed-exitcode --suppress-secrets || rc=$?
          [ "${rc:-0}" = "2" ] && echo "::notice::Changes found, see the diff above" || true
          [ "${rc:-0}" = "1" ] && exit 1 || true
Uninstall: set env/dev.yaml in myapp.enabled to false, then apply; myapp is uninstalled and redis is kept; finally helmfile -e dev destroy (uninstalls in reverse order).

Case 1: bootstrapping GitOps with Helmfile

Problem: On a new cluster, cert-manager and Argo CD (or Flux) must be installed before GitOps can run, a chicken-and-egg problem. Approach: A “bootstrap helmfile” contains only these platform releases (pinned versions, needs ordering), run once by the pipeline; afterwards, all other apps are handed over to Argo CD / Flux. Argo CD's own Application can also be used to self-manage.

Case 2: helmfile apply accidentally deletes a release

Problem: An environment file omits enabled, so the template evaluates to false,installed: false causing the production release to be uninstalled. Approach: Write env values as required ({{ .Values.myapp.enabled | required "myapp.enabled is required" }}); require manual review of the diff before production apply; do not use the installed toggle for critical releases.

Case 3: diff is very slow with many releases

Problem: With 80 releases, each diff takes 10 minutes. Approach: Split into layers by label (labels: {tier: platform}), so PRs only diff the releases whose directories changed (-l); increase --concurrency; split the rarely changing platform layer into its own helmfile.

Common errors and fixes

Error: unknown command "diff" for "helm" / helm-diff plugin not installed

Fix:helmfile init; under Helm 4, if plugin verification fails, import the public key per the helm-diff README and install from the tarball URL, or explicitly skip verification in a controlled environment (follow the Helm plugin docs).

err: no releases found that matches specified selector / environment values not taking effect, {{ .Values.myapp }} shown literally

Cause: the file name is not .gotmpl (v1 does not render templates); or environments and releases did not use --- to separate; or forgot -e dev (uses the default environment).

in ./helmfile.yaml.gotmpl: release "myapp-hf/myapp" depends on "myapp-hf/redis" which does not match any release

Cause:needs 's namespace/name is wrong, or is -l filtered out by the selector. Fix: correct the name; for selector cases, add --include-needs.

Error: failed to authorize: … 401 Unauthorized (pulling andy/myapp)

Cause: Not logged in to the private GHCR package. Fix:helm registry login ghcr.io (or configure username/password environment variables under repositories); see Module 2.

CLI exercises
1. Apply only to myapp and its dependencies (prod environment).
helmfile -e prod -l name=myapp --include-needs apply
2. Render all manifests for the dev environment and validate them with kubeconform.
helmfile -e dev template | kubeconform -strict -summary -kubernetes-version 1.37.0
Scenario analysis
The team has 3 clusters, each with about 15 releases, and currently uses Helmfile with Jenkins scheduled applies. Recently, several times someone manually ran helm upgrade, causing production to diverge from the repository. How would you evolve this?

Short term: run scheduled helmfile diff --detailed-exitcode to alert on drift; revoke individuals' cluster write access. Mid term: migrate to Flux (release semantics unchanged, Helm history continues, HelmRelease's dependsOn replaces needs, driftDetection corrects manual changes) or Argo CD (evaluate hooks/lookup differences). Keep Helmfile only for cluster bootstrapping and local development environments.

Verified teaching videos

▶
Helmfile - How to manage Kubernetes Helm releases — DevOps & AI Toolkit
English · Helmfile concepts and demo (recorded before Helmfile v1,.gotmpl conventions follow this lesson)

Official docs

Video storyboard (about 60 seconds)

Shot 1 · 0–20s
Visual: scattered helm command cards are gathered into one helmfile folder.
Narration: Helmfile puts multiple releases and multiple environments into one declarative file.
Shot 2 · 20–45s
Visual: the dependency graph points from redis to myapp, and two batches light up in turn; in the diff output, only one changed line is highlighted.
Narration: batch by dependency, diff first, then upgrade only the releases that changed.
Shot 3 · 45–60s
Visual: a balance scale with Helmfile (push) on one side and a GitOps controller (pull, continuous reconciliation) on the other.
Narration: use Helmfile to bootstrap the cluster, and hand long-running workloads to GitOps.
or score ≥ 70% on the quiz

Module 7 · Upgrade strategy and automated rollback

45:00 – 53:00 · Diff first, then upgrade; waiting is decided by kstatus, with a timeout limit and automatic rollback on failure; when traffic-weighted rollouts are needed, hand off to Argo Rollouts / Flagger
8 minutesHelm 4.3.2 · Argo Rollouts v1.10.2 · Flagger v1.45.0Without --wait, only hooks are waited on by default★★★★★
Learning objectives
  • Explain Helm 4's three wait strategies: hookOnly (the default when --wait is not specified),watcher (--wait used alone, based on kstatus),legacy (Helm 3 logic); --rollback-on-failure will set the default wait to watcher.
  • For helm upgrade in CI, choose --timeout,--cleanup-on-fail,--history-max, and before upgrading, use helm diff upgrade and --dry-run=server to preview.
  • Understand the limits of Helm rollback (it only rolls back Kubernetes objects, not database migrations or external state), and know when canary/blue-green requires Argo Rollouts or Flagger.
Prerequisites: remediation from Module 5; revisions from Lesson 1; rolling updates, probes, and PDBs from the K8s lessons. Importance:★★★★★

What: the components of a safe upgrade

StageTool / flagsPurpose
Previewhelm diff upgrade (plugin),helm upgrade --dry-run=serverShows which objects would change; server mode also runs admission and schema validation
Applyhelm upgrade --install (Helm 4 uses SSA by default for new installs; --server-side auto otherwise reuses the previous method)Write objects and release vN (pending-upgrade → deployed/failed)
Wait--wait (= watcher, kstatus),--wait-for-jobs,--timeout (default 5m, applies to each Kubernetes operation, such as hook Jobs)A Deployment is ready, a Job completes, a Service gets an address, etc., count as success
Failure handling--rollback-on-failure (formerly --atomic),--cleanup-on-failroll back to the last successful revision; clean up resources newly created in this run
Traffic rolloutDeployment's maxSurge/maxUnavailable, minReadySeconds, PDB; Argo Rollouts / Flaggercontrol the speed at which the new version is exposed to users

Why: upgrades without --wait “always succeed”

By default, hookOnly only waits for hook resources; once objects are written to the API, the release is marked as deployed, even if the new Pods keep CrashLoopBackOff. The pipeline is therefore green, yet the problem is in production. --wait Use kstatus to determine the state of each resource (Current / InProgress / Failed) until all are Current or a timeout occurs.

How: choosing parameters

  • --timeout should be greater than “slowest Pod readiness + number of rollout batches × time per batch + hook time”, yet less than the Deployment's progressDeadlineSeconds, so Helm does not give up while the Deployment is still progressing.
  • --rollback-on-failure Rollback applies to Kubernetes objects only; database migrations need a compatible “expand first, contract later” (expand/contract) design, and migrations in hooks must be forward-compatible with the old version.
  • Rollback itself can fail (for example, if the new version deleted a Secret the old version needs), so --history-max should not be too small (default 10).
  • Canary: Helm only handles “declaring the new version”; shifting traffic by percentage and automatically judging based on metrics requires Argo Rollouts (use Rollout resource to replace the Deployment, with canary steps / blueGreen and AnalysisTemplate) or Flagger (Canary resource pointing to an existing Deployment that automatically creates primary/canary; part of the Flux ecosystem; supports multiple service meshes and Ingress).

When

ScenarioRecommended
Pipeline push upgrade (GitHub Actions / Azure Pipelines)helm diff Preview → helm upgrade --install --rollback-on-failure --timeout 5m
FluxHelmRelease remediation (Module 5),waitStrategy: poller
Argo CDNo automatic rollback: health checks + alerts + Git revert; when automation is needed, use Argo Rollouts (auto-abort on metric failure)
Critical user-facing servicesCanary (Argo Rollouts / Flagger) + SLO metric analysis
Incompatible schema changesBlue-green or phased rollout; ship a compatible intermediate version first
Common misconceptions① “--rollback-on-failure can undo database migrations”—no. ② “A longer timeout is always safer”—too long keeps the pipeline hanging and blocks later deployments; combine it with progressDeadlineSeconds make failures surface early. ③ “A canary can be done with two Helm releases”—two Deployments sharing a Service can only split traffic roughly by replica count, and there is no automatic analysis or rollback.

Timeline: failed upgrade with --rollback-on-failure

helm diffPreview changes upgrade v4pending-upgrade watcher wait (kstatus)Deployment InProgress… timeout 5mv4 failed rollback → v5= v3 content deployed t=0t≈5st=5mt≈5m30s Throughout the process, the old ReplicaSet's Pods keep serving (with maxUnavailable=0 + readinessProbe); failed new Pods receive no traffic
Figure 7-1: rollback creates a new revision (its content equals the last successful version)

Comparison: Argo Rollouts vs Flagger

Argo Rollouts (v1.10.2)Flagger (v1.45.0)
WorkloadRollout resource replaces the Deployment (the chart templates need changes)Canary resource references an existing Deployment and automatically generates -primary
Strategycanary (setWeight / pause / analysis steps), blueGreencanary, A/B, blue/green (traffic mirroring, etc.)
Trafficreplica ratio or integration with Ingress / service mesh / Gateway APIdepends on a service mesh or Ingress controller
AnalysisAnalysisTemplate (Prometheus, etc.)built-in metric checks + webhook
Common pairingsArgo CDFlux

Interactive: upgrade timeline simulator

Choose parameters and the new version's behavior, and observe release status, production Pods, and pipeline results.

Wait: Timeout:
New version:

Core commands

CommandDescription
helm diff upgrade myapp oci://… --version 0.5.2 -f dev.yaml -n myapphelm-diff plugin; --detailed-exitcode returns 2 when there are changes
helm upgrade … --dry-run=serverServer-side simulation (admission, schema), not persisted
helm upgrade --install … --rollback-on-failure --timeout 5m --cleanup-on-failautomatic rollback on failure; default wait is watcher
helm upgrade … --wait --wait-for-jobsalso waits for Jobs to complete
helm history myapp -n myapp --max 5View revisions and descriptions
helm rollback myapp 0 -n myapp --waitroll back to the previous revision (0 means the previous one)
REF=oci://ghcr.io/$GH_USER/charts/myapp
kubectl create ns myapp-push --dry-run=client -o yaml | kubectl apply -f -
helm upgrade --install myapp $REF --version 0.5.1 -n myapp-push --set image.tag=1.1 --wait --timeout 3m
helm diff upgrade myapp $REF --version 0.5.1 -n myapp-push --set image.tag=9.9 --detailed-exitcode; echo "diff exit=$?"
helm upgrade myapp $REF --version 0.5.1 -n myapp-push --set image.tag=9.9 \
  --rollback-on-failure --timeout 2m --cleanup-on-fail; echo "upgrade exit=$?"
helm history myapp -n myapp-push --max 3
myapp-push, myapp, Deployment (apps) has changed:
-         image: "ghcr.io/andy/myapp:1.1"
+         image: "ghcr.io/andy/myapp:9.9"
diff exit=2
Error: UPGRADE FAILED: release myapp failed, and has been rolled back due to rollback-on-failure being set: resource Deployment/myapp-push/myapp not ready. status: InProgress, message: …
upgrade exit=1
REVISION	UPDATED                 	STATUS    	CHART      	APP VERSION	DESCRIPTION
1       	Sat Nov 15 11:02:10 2026	superseded	myapp-0.5.1	1.1        	Install complete
2       	Sat Nov 15 11:03:01 2026	failed    	myapp-0.5.1	1.1        	Upgrade "myapp" failed: …
3       	Sat Nov 15 11:05:02 2026	deployed  	myapp-0.5.1	1.1        	Rollback to 1

The exact wording of error messages follows the actual Helm 4.3 output. How to verify that production is unaffected: Open another terminal during the upgrade kubectl -n myapp-push port-forward svc/myapp 8082:80 and loop curl, which should always return 200 (requires readinessProbe and maxUnavailable: 0).

Argo Rollouts canary snippet (replacing the Deployment in the chart)

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata: { name: {{ include "myapp.fullname" . }} }
spec:
  replicas: 4
  selector:
    matchLabels:
      {{- include "myapp.selectorLabels" . | nindent 6 }}
  template: …                      # same as the original Deployment's Pod template
  strategy:
    canary:
      steps:
        - setWeight: 25
        - pause: { duration: 2m }
        - analysis: { templates: [ { templateName: success-rate } ] }
        - setWeight: 50
        - pause: { duration: 2m }

Lab 7: the same failed upgrade under three deployment methods (about 7 minutes)

Push-based (Helm CLI): run the script from the Commands tab and record the exit code,helm history and the curl result.
Compare without --wait:
helm upgrade myapp $REF --version 0.5.1 -n myapp-push --set image.tag=9.9; echo "exit=$?"
helm status myapp -n myapp-push | grep STATUS
kubectl -n myapp-push get pods
exit=0
STATUS: deployed                        ← pipeline is green
myapp-6c9…   1/1  Running            0  9m
myapp-7f4…   0/1  ImagePullBackOff   0  20s   ← problem left in production

After finishing, run helm rollback myapp 0 -n myapp-push --wait.

Flux: reuse the failed-upgrade results from the Module 5 lab and compare helm history (Flux automatic rollback + retries).
Argo CD: reuse the Module 4 results (Progressing → Degraded; requires Git revert).
Record the comparison table:
Method          Failure detected  Prod impact  Auto rollback  Recovery
helm without --wait  No (exit 0)      some Pods abnormal  No     manual rollback
helm --rollback-on-failure  Yes   None         Yes       redeploy after fix
Flux remediation           Yes   None         Yes+retry  change Git / --reset
Argo CD                    Yes (health)  None   No       git revert

Case 1: migration Job succeeds, app fails, and after rollback the old version cannot start

Problem: The pre-upgrade migration dropped an old column; the new version failed due to a configuration error and rolled back; the old version's queries on the old column then errored, causing a site-wide outage. Approach: expand/contract: v2 only adds columns and stays compatible with reads and writes; v3 is the first to drop the old column. Decouple the migration Job from the application, and limit the rollback strategy to the stateless parts.

Case 2: timeout shorter than startup time

Problem: A Java service takes 4 minutes to cold-start and rolls out in 6 batches,--timeout 5m causing every release to “fail and roll back”. Approach: Estimate using “slowest Pod ready time × batches” and add headroom; add a startupProbe; raise maxSurge to reduce the number of batches.

Case 3: the canary detects 5xx errors and aborts automatically

Problem: A downstream API that the new version depends on changed in one region, and the error rate rose by 3%. Approach: An Argo Rollouts AnalysisTemplate queries the Prometheus success rate; if it is < 99%, the analysis fails, the Rollout aborts automatically, and traffic switches back to the stable version. The desired version in the Helm release stays on the new version, and a Git revert finishes the job.

Common errors and fixes

Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

Cause: The previous upgrade was interrupted (pipeline cancelled, or killed on timeout), and the release is stuck in pending-upgrade.

helm history myapp -n myapp-push --max 3
helm rollback myapp <previous deployed revision> -n myapp-push --wait

For the detailed cause and recovery, see Lesson 7; in the pipeline, use concurrency to prevent concurrent deployments.

Error: UPGRADE FAILED: … context deadline exceeded (no rollback)

Cause: Only used --wait without --rollback-on-failure, so the release is marked failed but the objects keep the new version. Fix:helm rollback myapp 0 --wait; add it uniformly in the pipeline --rollback-on-failure.

Flag --atomic has been deprecated, use --rollback-on-failure instead

Cause: Old scripts run on Helm 4. The parameters still work but emit a warning; update scripts and tools (for example, the helm module in kubernetes.core 6.6.0 already maps them).

rollback failed: Error: … no Secret with the name "myapp-config-v2" found / Pod still failing after rollback

Cause: The previous version depends on external objects or data that were deleted or changed. Fix: Check helm get manifest myapp --revision N; for shared resources, add helm.sh/resource-policy: keep; design backward-compatible configuration changes.

Command-line exercises
1. Upgrade and wait for all resources and Jobs to complete; roll back on failure; timeout 8 minutes.
helm upgrade --install myapp $REF --version 0.5.2 -n myapp --wait --wait-for-jobs --rollback-on-failure --timeout 8m
2. Inspect the rendered manifest and values of revision 2 to compare against the failure cause.
helm get manifest myapp -n myapp --revision 2
helm get values myapp -n myapp --revision 2
Scenario analysis
The payment service requires that any single release affects at most 5% of users for 10 minutes; roll back automatically when metrics are abnormal; the team uses Argo CD. Propose a solution.

Argo CD by itself does not do traffic ramp-up or automatic rollback. Introduce Argo Rollouts: in the chart, replace the Deployment with a Rollout; canary steps: setWeight 5 → pause 10m (during which an AnalysisRun queries the error rate and latency) → 25 → 50 → 100; route traffic precisely through an Ingress/Gateway or a service mesh; a failed analysis aborts automatically. In Argo CD, configure health checks for the Rollout (Argo CD has built-in health assessment for Rollouts); after a failed release, use a Git revert to return the desired state to the stable version.

Verified teaching videos

▶
Argo Rollouts Demo — Argo Proj
English · official channel canary release demo

Helm 4's --rollback-on-failure / kstatus waiting: no verified dedicated video was found; see the storyboard script.

Official docs

Video storyboard script (about 70 seconds)

Shot 1 · 0–20s
Visual: the pipeline is green, but new Pods are smoking in the cluster (failing); caption “--wait not added”.
Narration: without waiting for readiness, the upgrade always “succeeds”.
Shot 2 · 20–50s
Visual: the kstatus timer runs out, release v4 turns red, a rollback arrow produces v5, and the old Pods stay green throughout.
Narration: with --wait and --rollback-on-failure, the failure is detected and the release automatically returns to the last successful version.
Shot 3 · 50–70s
Visual: the traffic slider moves from 5% to 25%, the error-rate curve rises, and the slider automatically drops back to 0.
Narration: when you need proportional rollout and automated analysis, hand off to Argo Rollouts or Flagger.
or score ≥ 70% on the “Quiz”

Module 8 · First-five-hours recap, self-check, and cleanup

53:00 – 60:00 · Tie Lessons 1–5 into one delivery chain: write the chart → test the chart → publish and sign → deploy (push / Argo CD / Flux / Helmfile) → upgrade and roll back; use the troubleshooting tree to locate this lesson's typical failures, and clean up thoroughly at the end
7 minCovers Lessons 1–5Interactive troubleshooting tree★★★★☆
Learning objectives
  • Use one diagram to recap the knowledge map of the first five lessons, and name the key commands and common failures at each step.
  • Use the troubleshooting tree to locate five types of automation failures: ct failure, OCI push 401, signature verification failure, Argo CD OutOfSync that never converges, and HelmRelease upgrade failures that keep retrying.
  • Clean up in the right order: stop the GitOps controllers first (otherwise they will 'fix' deleted items back into existence) → release → namespace → controllers → kind; remote cleanup: GHCR packages, gh-pages, Releases (optional).
Prerequisites: Modules 1–7 of this lesson; Lessons 1–4. Importance:★★★★☆

What: knowledge map of the first five hours

LessonTopicWhat you should be able to do nowHow it continues in this lesson
Lesson 1Helm core: release, revision, values precedence, OCI, template/getExplain upgrade --install Full workflow and the release SecretFlux has a release; Argo CD does not
Lesson 2Writing charts: templates, schema, dependencies, lint, testWrite reusable charts that have a schema and testsAutomate these checks with ct lint / ct install
Lesson 3AKS + ACR: Workload Identity, Key Vault, Gateway, pipelinesDeploy from ACR to AKS without long-lived credentialsACR as one of the OCI publishing targets
Lesson 4EKS + ECR: Pod Identity, LBC, Karpenter, pipelinesThe same chart running on EKSECR immutable tags ↔ immutable releases
Lesson 5CI/CD and GitOpsPR testing → release signing → pull-based deployment → automatic rollbackLesson 6 hooks, Lesson 7 deep troubleshooting

Why: compare the five deployment methods side by side

MethodWho runs HelmRelease recordFailed upgradeDrift
helm CLI (Lesson 1)HumanYesManual rollbackNo detection
Pipeline push (Lessons 3, 4)CI runnerYes--rollback-on-failureNo detection
Helmfile (Module 6)Human/CIYesDepends on the arguments passed to helmFound at diff time
Argo CD (Module 4)Render only; Argo CD appliesNoneNo automatic rollback; Git revertselfHeal
Flux (Module 5)helm-controller (SDK)YesRemediation rollback + retriesdriftDetection

How: the principle behind the cleanup order

  • GitOps controllers reconcile continuously: if you delete resources while the controller is still running, it recreates them. First flux suspend / delete the Kustomization and HelmRelease (Flux uninstalls the corresponding release); when Argo CD deletes an Application, use cascading deletion (with the finalizer resources-finalizer.argocd.argoproj.io that deletes the resources).
  • kind is disposable: kind delete cluster --name lab it removes everything in the cluster; but Lesson 6 still uses the lab, so you can delete only the namespace.
  • Remote: GHCR packages (charts and images), the gh-pages branch and GitHub Releases, and Rekor entries (public and cannot be deleted).

When: what to keep for the next lesson

Lesson 6 (hooks, architecture in practice) reuses the kind cluster lab, the helm-charts repository, and the myapp chart in GHCR; it is recommended to delete only the namespaces and GitOps controllers created in this lesson, and keep the repository and packages.

Common misconceptions① “Deleting Argo CD will delete the apps it deployed”—no; after the controller is deleted, the resources become orphans and keep running. ② “Deleting a HelmRelease just deletes one CR”—Flux runs uninstall on that release (unless you suspend first or set the relevant option). ③ “A cosign signature can be withdrawn”—Rekor is an append-only log; you can only handle it by no longer trusting that identity or digest.

Overview: the delivery chain from PR to cluster

PRLesson 2 chartversion +1 CI (M1, M3)lint · ct · kubeconformhelm-docs check Release (M2, M3)Pages · GHCR/ACR/ECR.prov · cosign Argo CD (M4) Flux (M5) Helmfile (M6) Pipeline pushLessons 3, 4 Clusterkind / AKS / EKSUpgrade strategy (M7)wait · rollbackCanary Failure location → troubleshooting tree entry: CI (ct) | Release (401, signing) | Argo CD (OutOfSync) | Flux (upgrade retries) | Helm (pending, timeout)
Figure 8-1: the delivery chain for the first five hours, and where this module's troubleshooting tree applies

Interactive: cleanup-order sorting game

Click steps to add them to your sequence; when finished, click “Check”. Goal: clean up this lesson's Argo CD, Flux, Helmfile, and push-based deployments without letting the controllers 'fix' resources back into existence.

Your sequence:

Cleanup commands

# 1. Stop Flux reconciliation and uninstall the releases Flux manages
flux delete kustomization myapp-flux --silent      # prune=true: deletes objects it applied, such as the HelmRelease; helm-controller then uninstalls the release
flux get hr -A                                      # confirm no HelmRelease remains
# 2. Delete the Argo CD Application (cascade-deletes resources)
kubectl -n argocd patch application myapp-dev --type merge -p '{"metadata":{"finalizers":["resources-finalizer.argocd.argoproj.io"]}}'
kubectl -n argocd delete application myapp-dev
# 3. Helmfile and push-based releases
helmfile -f deploy/helmfile.yaml.gotmpl -e dev destroy
helm uninstall myapp -n myapp-push
# 4. The controllers themselves (when Lesson 6 no longer needs them)
flux uninstall --silent
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.6.1/manifests/install.yaml
kubectl delete ns argocd myapp-argo myapp-flux myapp-hf myapp-push --ignore-not-found
# 5. Verify
helm list -A
kubectl get ns | grep -E 'myapp|argocd|flux' || echo "clean"
NAME	NAMESPACE	REVISION	UPDATED	STATUS	CHART	APP VERSION
clean

Remote cleanup (optional; Lesson 6 still uses the helm-charts repository and the GHCR chart)

# Delete a chart version (GHCR package version)
gh api /user/packages/container/charts%2Fmyapp/versions --jq '.[] | "\(.id) \(.metadata.container.tags)"'
gh api -X DELETE /user/packages/container/charts%2Fmyapp/versions/<VERSION_ID>
# Delete a GitHub Release and its tag
gh release delete myapp-0.5.0 --cleanup-tag --yes
# Revoke the local signing private key and credentials
gpg --delete-secret-and-public-key "Helm Lab"; rm -f /tmp/secring.gpg
helm registry logout ghcr.io

Note: Deleting a published version breaks users who depend on it and the links in index.yaml; public repositories usually only “deprecate” (set in Chart.yaml deprecated: true and publish a new version) instead of deleting. Signature records in Rekor cannot be deleted.

Lab 8: self-check + cleanup (about 6 minutes)

Self-check 1 (2 minutes): without notes, write the four check steps of the PR workflow and the permissions block of the release workflow (contents/packages/id-token). Compare with the labs for Modules 1, 2, and 3.
Self-check 2: run the commands below and explain why the output differs across the three namespaces:
for ns in myapp-argo myapp-flux myapp-push; do echo "== $ns"; helm list -n $ns -q; kubectl get secret -n $ns -l owner=helm -o name; done
== myapp-argo
== myapp-flux
myapp
secret/sh.helm.release.v1.myapp.v3   … v7 (maxHistory defaults to 5; only the latest 5 are kept)
== myapp-push
myapp
secret/sh.helm.release.v1.myapp.v3
Troubleshooting drill: in the troubleshooting tree on the “Troubleshooting” tab, walk through all five paths in order and write one sentence on the root cause of each.
Cleanup: run it from the “Commands” tab, or arrange the order on the “Animation” tab first and then run it. Keep the kind cluster lab and the helm-charts repository for Lesson 6.

Case 1: deleting in the wrong order during cleanup makes resources “come back”

Problem: The ops team first kubectl delete ns myapp-flux, and a few minutes later the namespace and app reappeared. Cause: The Kustomization was still present and recreated the Namespace and HelmRelease from Git. Approach: First suspend / delete the parent Kustomization, or remove the matching directory from Git (prune).

Case 2: release conflict when migrating from Argo CD to Flux

Problem: The same app is managed on both sides: Argo CD selfHeal and Flux driftDetection keep overwriting each other. Approach: First delete the Application from Argo CD, but not cascade-delete it (remove the finalizer); then let the HelmRelease take over with the same releaseName. After confirming, clean up Argo CD's tracking annotations.

Case 3: the release job is the single point of failure in the delivery chain

Problem: release.yaml's GITHUB_TOKEN permissions are too broad: after a malicious PR changed the workflow, a malicious chart was published. Approach: Publishing runs only on push to the protected main branch; least privilege; the signing identity is pinned exactly to the workflow on the main branch; consumers (Flux) enforce signature verification; changes to workflow files require CODEOWNERS review.

Interactive troubleshooting tree: five typical failures in this lesson

Start from the symptom and choose step by step; finally, get diagnostic commands and fix suggestions.

Command-line exercises
1. List the release Secrets recorded by Helm in all namespaces, and determine which apps are managed by Helm/Flux.
kubectl get secret -A -l owner=helm -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,STATUS:.metadata.labels.status
2. Suspend all Flux HelmReleases (before a maintenance window).
flux suspend hr --all -n myapp-flux
Scenario analysis
A new colleague asks: “Why do we need both ct install in CI and Flux remediation? Isn't that redundant?” How do you answer?

They guard different stages. ct install runs before merge, in an isolated kind cluster, to verify that the chart itself installs, upgrades from the previous version, and passes helm test; it catches chart defects. Flux remediation handles environment-specific failures in the real environment (missing image, quota, external dependency, wrong config values) and keeps them from affecting production. The former lowers the rate of occurrence; the latter limits the blast radius.

Verified teaching videos

▶
What is GitOps, How GitOps works and Why it's so useful — TechWorld with Nana
English · GitOps concepts review, suitable as a recap of the first five hours

Official docs

Video storyboard script (about 60 seconds)

Shot 1 · 0–20s
Visual: a conveyor belt from PR to cluster, with five stations lighting up in turn (write, test, publish and sign, deploy, upgrade and roll back).
Narration: over the first five hours, we walked through the entire delivery chain of a chart.
Shot 2 · 20–45s
Visual: each of the five branches of the troubleshooting tree lights up a red dot, then turns green one by one.
Narration: every stage has typical failures; the troubleshooting tree helps you go from symptom to root cause.
Shot 3 · 45–60s
Visual: press “Pause reconciliation” first, then delete the resources; the resources do not come back.
Narration: when cleaning up, stop the controllers first, then delete the resources.
or score ≥ 70% on the “Quiz”

Command cheat sheet

Lesson 5 · CI/CD and GitOps · each code block can be copied with one click
Reference after classHelm 4.3.2
CI: lint / ct / kubeconform (M1)
helm lint charts/myapp --strict --kube-version 1.37.0
ct list-changed --target-branch main
ct lint --config ct.yaml
ct install --config ct.yaml --upgrade
ct install --charts charts/myapp --skip-clean-up --debug
helm template t charts/myapp -f charts/myapp/ci/default-values.yaml \
 | kubeconform -strict -summary -kubernetes-version 1.37.0 -schema-location default \
   -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
Release (M2)
helm package charts/myapp -d dist
helm package charts/myapp --version 0.5.1-rc.1 --app-version "$(git rev-parse --short HEAD)"
helm registry login ghcr.io -u $GH_USER --password-stdin
helm push dist/myapp-0.5.0.tgz oci://ghcr.io/$GH_USER/charts
helm show chart oci://ghcr.io/$GH_USER/charts/myapp --version 0.5.0
cr package charts/myapp
cr upload -o $GH_USER -r helm-charts --skip-existing
cr index -o $GH_USER -r helm-charts --push
cr push --registry-url oci://ghcr.io/$GH_USER/charts --skip-existing
Docs and signing (M3)
helm-docs --chart-search-root charts && git diff --exit-code
helm package --sign --key 'Helm Lab' --keyring /tmp/secring.gpg charts/myapp
helm verify myapp-0.5.0.tgz --keyring helm-lab-pub.asc
helm install myapp ./myapp-0.5.0.tgz --verify --keyring helm-lab-pub.asc
cosign sign --yes ghcr.io/$GH_USER/charts/myapp@$DIGEST
cosign verify ghcr.io/$GH_USER/charts/myapp@$DIGEST \
  --certificate-identity "https://github.com/$GH_USER/helm-charts/.github/workflows/release.yaml@refs/heads/main" \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com
Argo CD (M4)
argocd repo add ghcr.io/$GH_USER/charts --type helm --name ghcr --enable-oci
argocd app manifests myapp-dev
argocd app diff myapp-dev
argocd app sync myapp-dev && argocd app wait myapp-dev --health
argocd app history myapp-dev
argocd app set myapp-dev --helm-set replicaCount=2   # emergency only
helm list -n myapp-argo                               # empty
Flux (M5)
flux get sources oci -A
flux get hr -A
flux reconcile hr myapp -n myapp-flux --with-source
flux reconcile hr myapp -n myapp-flux --reset
flux reconcile hr myapp -n myapp-flux --force
flux suspend hr myapp -n myapp-flux ; flux resume hr myapp -n myapp-flux
flux events --for HelmRelease/myapp -n myapp-flux
flux debug hr myapp -n myapp-flux --show-values
helm history myapp -n myapp-flux
Helmfile (M6)
helmfile init
helmfile -e dev lint
helmfile -e dev template
helmfile -e dev diff --detailed-exitcode --suppress-secrets
helmfile -e dev apply
helmfile -e prod -l name=myapp --include-needs apply
helmfile -e dev destroy
Upgrade and rollback (M7)
helm diff upgrade myapp $REF --version 0.5.2 -n myapp -f dev.yaml
helm upgrade myapp $REF --version 0.5.2 -n myapp --dry-run=server
helm upgrade --install myapp $REF --version 0.5.2 -n myapp \
  --rollback-on-failure --timeout 5m --cleanup-on-fail
helm upgrade … --wait --wait-for-jobs
helm rollback myapp 0 -n myapp --wait
helm get manifest myapp -n myapp --revision 2
Cleanup (M8)
flux delete kustomization myapp-flux --silent
kubectl -n argocd delete application myapp-dev
helmfile -e dev destroy
helm uninstall myapp -n myapp-push
flux uninstall --silent
kubectl delete ns argocd myapp-argo myapp-flux myapp-hf myapp-push --ignore-not-found

Key fields at a glance

ObjectFieldKey points
ct.yamltarget-branch,chart-dirs,check-version-increment,upgradecheckout needs fetch-depth: 0
chart-releaser-actioncharts_dir,skip_existing,oci_registry_url,CR_TOKENcontents: write,persist-credentials: true
Argo CD Applicationchart,targetRevision,helm.valueFiles/valuesObject,ref: valuesthe OCI repoURL does not include oci://
Flux HelmReleasechartRef,upgrade.remediation,driftDetection,dependsOn,valuesFromretries defaults to 0; after they are used up, you need --reset
Flux OCIRepositoryref.semver,layerSelector,verify.matchOIDCIdentitythe revision includes the digest
Helmfileenvironments,repositories(oci: true),needs,installedtemplate files need .gotmpl

Capstone lab + final quiz

Build a full CI for the myapp chart (lint + ct + kubeconform + helm-docs) → push to GHCR and sign → deploy to kind with Argo CD and with Flux → rehearse an automatic rollback from a failed upgrade
After class ≈ 60–90 minutesNo cloud costsCovers 8 modules
Scenario The myapp chart must be handed to the platform team to be managed with GitOps. Requirements: every PR automatically runs lint, a version-bump check, schema validation of the rendered output (including the ServiceMonitor CRD), install and upgrade tests in kind, and a check that the README is current; after merge, it is automatically published to GitHub Pages and GHCR, and the OCI digest is keyless-signed; dev deploys the same chart with Argo CD and staging deploys it with Flux (signature verification enforced); no failed upgrade may affect production, and Flux must roll back automatically.
Cost, permissions, and security Use only the GitHub free tier and local kind. Workflow permissions: PR job contents: read; release job contents: write,packages: write,id-token: write. Keyless signing writes the repository and workflow paths to the public transparency log. Do not store a PAT in the repository; revoke the PAT used to log in to GHCR locally as soon as you are done.
Repository and tools (Module 0): the helm-charts repository contains charts/myapp (0.5.x),ct.yaml,charts/myapp/ci/{default,servicemonitor}-values.yaml; the kind cluster lab is ready.
PR CI (Modules 1, 3): lint-test.yaml contains: list-changed → helm lint --strict → ct lint → kubeconform (K8s 1.37.0 + CRDs-catalog) → helm-docs check → kind-action → build and kind load the image, install the ServiceMonitor CRD → ct install --upgrade. Submit one PR missing a version number and one contianers PR with a typo, and confirm they fail at ct lint and kubeconform respectively; once fixed, everything passes.
Release and signing (Modules 2, 3): release.yaml uses chart-releaser-action v1.9.0 (oci_registry_url pointing to GHCR) + cosign-installer v4.1.3 to sign by digest. Merge 0.6.0:
gh release view myapp-0.6.0
helm show chart oci://ghcr.io/$GH_USER/charts/myapp --version 0.6.0 2>&1 | grep Digest
cosign verify ghcr.io/$GH_USER/charts/myapp@$DIGEST \
  --certificate-identity "https://github.com/$GH_USER/helm-charts/.github/workflows/release.yaml@refs/heads/main" \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com >/dev/null && echo SIGNED
Argo CD deploys dev (Module 4): multi-source Application (GHCR chart 0.6.0 + Git $values), namespace myapp-argo, automated + selfHeal. Verify Healthy,helm list -n myapp-argo is empty.
Flux deploys staging (Module 5): OCIRepository (semver 0.6.x + cosign matchOIDCIdentity) + HelmRelease (upgrade retries 2 / rollback / remediateLastFailure, driftDetection enabled, test enable). Verify SourceVerified=True,helm history has revision 1.
Failed-upgrade drill (Modules 4, 5, 7): at the same time, change the image.tag to 9.9 and push, curling both services in a loop during this:
kubectl -n myapp-argo port-forward svc/myapp 8081:80 & kubectl -n myapp-flux port-forward svc/myapp 8083:80 &
while true; do printf "argo=%s flux=%s\n" $(curl -s -o /dev/null -w "%{http_code}" localhost:8081/healthz) $(curl -s -o /dev/null -w "%{http_code}" localhost:8083/healthz); sleep 5; done
Observations: the Argo CD app becomes Progressing / Degraded (old Pods keep serving), and requires git revert; Flux shows UpgradeFailed → Rollback,helm history several “Rollback to N” entries appear in the history, and once retries are exhausted Ready=False. After the revert, both recover, and Flux's failure counter is reset.
Drift and signing guardrails: in myapp-flux, kubectl set env create drift and confirm DriftCorrected; locally, manually helm push an unsigned 0.6.1, and confirm that Flux's OCIRepository SourceVerified=False, staging does not upgrade.
Cleanup (Module 8): delete the Flux Kustomization → Argo CD Application (cascading) → controllers → namespaces; delete the unsigned 0.6.1 package version; keep the repository and signed versions for Lesson 6.

Acceptance checklist

Open-ended self-check (answer on your own first, then expand the reference answer)

1. Why is ct's version-bump check a prerequisite for immutable releases?

The release process uses the version in Chart.yaml to decide whether to create a new Release or tag. If the content changes but the version does not, either the release is skipped (production never gets the fix) or the old version is overwritten (different consumers get different bytes). Enforcing a version bump in the PR stage guarantees “one version = one set of content.”

2. The same chart is deployed by Argo CD and Flux,pre-upgrade how does hook behavior differ?

Flux uses the Helm SDK: pre-upgrade runs only on upgrade, not on install; Argo CD maps both pre-install and pre-upgrade to PreSync, which runs on every sync. helm test can run in Flux (test.enable), but is ignored in Argo CD.

3. How would you handle an internal CRD with no public schema in kubeconform?

Generate a JSON Schema from the cluster or the CRD source file with openapi2jsonschema, store it in the repository schemas/ and update it with the CRD version; kubeconform appends -schema-location 'schemas/{{.ResourceKind}}{{.KindSuffix}}.json'. Only as a last resort, use -skip, and list the skipped kinds in the PR output.

4. In Flux, the use cases for upgrade.strategy: RetryOnFailure versus the default RemediateOnFailure?

RemediateOnFailure (the default) rolls back via remediation on failure and suits stateless services, protecting production. RetryOnFailure does not roll back; it retries at intervals and suits scenarios where rollback is costly or impossible (such as stateful components or CRD upgrades) and where you want the failed state kept for investigation.

5. In keyless signing, when verifying, specifying only --certificate-oidc-issuer and not the identity: what is the risk?

Anyone who uses GitHub Actions can obtain a certificate from the same issuer and sign any artifact, and verification will pass; you must constrain the identity (repository + workflow + branch). Flux's matchOIDCIdentity.subject uses the same principle.

6. How do Helmfile, Argo CD, and Flux divide responsibilities on your platform?

Reference: Helmfile handles cluster bootstrap (installing the GitOps controllers, cert-manager, and a few other platform components) and local development environments; business apps and the remaining platform components are continuously reconciled by one GitOps tool: choose Argo CD if you need a UI and centralized multi-cluster management, and Flux if you need native Helm semantics and automatic remediation. Avoid having two tools manage the same app.

Final quiz (12 questions, covering all modules)

Sources and version notes

Verification basis for this lesson's technical facts (verified 2026-11-15)
TopicVerification resultSources (accessed 2026-11-15)
Helm version and parametersv4.3.2 (2026-11-13); helm upgrade: --rollback-on-failure (after setting --wait the default is watcher),--wait wait strategy watcher / hookOnly / legacy (hookOnly when unspecified),--timeout default 5m,--server-side default auto,--force-replace,--force-conflicts,--take-ownership,--history-max default 10; helm lint --strict (warnings count as failures),--kube-versionhelm upgrade · helm lint · helm/helm releases
Helm provenance--key is a uid substring, not a fingerprint; GnuPG 2.1+ requires exporting the private key file; Helm 4.3.0+ can read kbx and ASCII-armored public keys when verifying; helm package has --passphrase-file; when the .prov and tgz are in the same directory, helm push upload them together; the Helm docs mention the helm-sigstore pluginProvenance · Registries · helm package
chart-testingct v3.15.0 (2026-10-06); chart-testing-action v2.9.0 installs ct 3.15.0 by default; ct install/lint parameters (--target-branch default main,--remote default origin,--upgrade,--skip-clean-up,--charts/--all disable change detection and version checks,check-version-increment default true); configuration precedence and lookup paths; library charts are not installedhelm/chart-testing(README, doc/ct_install.md, doc/ct_lint.md) · chart-testing-action
kind-actionv1.15.2 (2026-11-04); default kind v0.33.0, kubectl v1.37.1, cluster name chart-testinghelm/kind-action
kubeconformv0.8.0 (2026-06-04); -schema-location default points to yannh/kubernetes-json-schema (confirmed to contain v1.37.0-standalone-strict); CRDs-catalog template {{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json (confirmed that ServiceMonitor, Application, and HelmRelease schemas exist); openapi2jsonschemayannh/kubeconform · CRDs-catalog
chart-releasercr v1.10.1, action v1.9.0 (2026-10-31); inputs charts_dir, charts, skip_existing, mark_as_latest, packages_with_index, pages_branch, oci_registry_url; outputs changed_charts, chart_version, releases; creates gh-pages automatically if missing; checkout v6.0.1+/v7 + persist-credentials; CR_REPLACE_EXISTING (v1.10+; immutable releases cannot be replaced); CR_GENERATE_RELEASE_NOTES; cr push pushes .provchart-releaser-action · chart-releaser
helm-docsv1.14.2 (2024-07-08, still the latest); # -- comments,# @default --,--chart-search-root,--template-files, pre-commit hooks, image jnorwood/helm-docsnorwoodj/helm-docs
cosigncosign v3.1.4 (2026-10-20); v3 defaults to the new bundle format, and signatures are stored as OCI 1.1 referring artifacts; cosign-installer v4.1.3cosign releases(v3.0.0 notes) · cosign-installer
Argo CDv3.6.1 (2026-11-04); Helm is used only for helm template; since 3.5, only Helm v4 renders; value precedence parameters > valuesObject > values > valueFiles; OCI repoURL does not include oci://; multi-source ref: values; hooks mapping table (test / rollback hooks not supported; once an Argo CD hook is defined, all Helm hooks are ignored); enableOCIArgo CD Helm · Private Repositories · releases
Fluxv2.10.0 (2026-10-26), helm-controller v1.7.1; HelmRelease v2: chartRef (OCIRepository / HelmChart / ExternalArtifact), revision version+digest[0:12], install/upgrade remediation (retries default 0, strategy default rollback, remediateLastFailure), upgrade.strategy (RemediateOnFailure / RetryOnFailure, retryInterval default 5m), driftDetection (warn/enabled, ignore), waitStrategy (poller default), dependsOn, maxHistory default 5, releaseName composition rules, storageNamespace,--reset/--force; OCIRepository verify (cosign/notation, matchOIDCIdentity)HelmReleases · OCIRepositories
Helmfile / helm-diffHelmfile v1.8.4 (2026-11-13), supports Helm 3.x and 4.x, and requires helmfile init installing helm-diff; v1.8.2 skips recreatePods under Helm 4; helm-diff v3.15.15 — Helm 4 verifies plugin provenance by default, so installing from the tarball URL is recommendedhelmfile/helmfile · Docs · helm-diff
Other action / tool versionsazure/setup-helm v5.1.0; actions/checkout v7.0.1; actions/setup-python v7.1.0; docker/login-action v4.8.0; Argo Rollouts v1.10.2; Flagger v1.45.0; kind v0.33.0; oras v1.3.6Each project's GitHub Releases (queried via the GitHub API)

Video verification notes

The following videos had their titles and channels verified via the YouTube oEmbed endpoint (2026-11-15): TechWorld with Nana, “GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker” (R8_veQiYBjI); “What is Helm in Kubernetes? Helm and Helm Charts explained | Kubernetes Tutorial 23” (-ykwb1d0DXU); “ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes” (MeU5_k9ssrs); “What is GitOps, How GitOps works and Why it's so useful” (f5EpcWp0THw); Terry Howe, “Helm with oras-go v3 Demo Mirroring and Blocking Registries” (3yPa6mz0nas); Cloud Native Skunkworks, “What is sigstore? The future of supply chain security?” (hAcMGttHCFw); Akuity, “How to Use Private OCI Helm Repositories in Argo CD” (Hn4pgrySYRU); DevOps & AI Toolkit, “Flux CD v2 With GitOps Toolkit - Kubernetes Deployment And Sync Mechanism” (R6OeIgb7lUI) and “Helmfile - How to manage Kubernetes Helm releases” (qIJt8Iq8Zb0); Techno Tim, “Flux GitOps Tutorial - DevOps and GitOps for Kubernetes” (PFLimPh5-wo); Argo Proj, “Argo Rollouts Demo” (hIL0E2gLkf8). oEmbed does not return duration or publish date, so durations are not listed. Three topics (chart-testing / kubeconform, helm-docs / provenance, and Helm 4 wait and rollback) had no verified dedicated video, so storyboard scripts are provided instead. All videos are in English; most were recorded before Helm 4 / Argo CD v3 / Flux v2.10, so this lesson takes precedence for version details.

Voice narration notes

The “Voice” tab uses the browser's Web Speech API (speechSynthesis zh-CN) to read the narration script aloud, with English terms pronounced in en-US; results depend on the operating system's voice packs. This courseware has no embedded audio; the narration script can be given to a TTS tool to generate audio.

Known limitations

  • The commands in this lesson were written from the official docs and were not actually run in this environment; the usernames, digests, times, revision counts, and message text in the “expected output” are all example values.
  • The following were handled conservatively and marked “see the official docs”: when Argo CD renders .Capabilities the sources and helm.kubeVersion/apiVersions override fields; Argo CD v3 default resource tracking; Argo CD's support for chart signature verification (not claimed in this lesson); Helmfile helmDefaults 's corresponding Helm 4 --rollback-on-failure key names (so the examples do not use them); HelmRelease's take-ownership default behavior; how cosign signatures are stored in GHCR (referrers or the fallback tag scheme); and the exact wording of helm-controller events and helm history.
  • chart-releaser-action's packages_with_index,CR_REPLACE_EXISTING and other advanced usage is only briefly covered; for production use, read the recovery instructions in the README in full.
  • Flagger and Argo Rollouts are only briefly introduced (Lessons 6 and 7 do not expand on them); the canary example omits the Service, traffic routing, and AnalysisTemplate definitions.
  • The timing, counters, and logs in the animations illustrate the mechanism; some retries and events are omitted.
  • Lessons 6–8 of this Helm course are being written in parallel with this lesson; cross-lesson references defer to the final content of each lesson.