Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Patching Software with GitOps, Helm, and Argo CD

This is a minor upgrade. Major upgrades are harder.

Argo CD deploys whatever is on main.

  1. Pull the repo and open a new branch.

    cd ~/git/forgejo
    git pull
    git switch -c ariadne/forgejo-17.3.2
    
  2. Render the current chart and build an old template with Helm.

    helm dependency build chart
    helm template forgejo chart -n forgejo > forgejo-old.yaml
    
  3. Change the software version (this is the upgrade step).

    sed -i 's/version: 17.1.1/version: 17.3.2/' chart/Chart.yaml
    
  4. Render the updated chart and build a new template with Helm.

    helm dependency update chart
    helm template forgejo chart -n forgejo > forgejo-new.yaml
    
  5. Diff the templates

    This is a sanity check step, Helm requires new Chart.yaml, and Chart.lock files.

    diff forgejo-old.yaml forgejo-new.yaml | less
    
  6. Removed the templates

    These don’t get deployed, only checked.

    rm forgejo-old.yaml 
    rm forgejo-new.yaml
    
  7. Commit Chart.yaml, and Chart.lock

    git add chart/Chart.yaml chart/Chart.lock
    git commit -m "Minor upgrade: Forgejo 15.0.3 to 15.0.11"
    git push -u origin ariadne/forgejo-17.3.2
    
  8. Open a PR (or merge to main)

    Fast-forward … I’ll merge into main on my own repo.

    git fetch origin
    git checkout main && git pull --ff-only
    git merge --ff-only origin/ariadne/forgejo-17.3.2
    git push origin main
    
  9. Check kubectl to see if it deployed.

    !
    ! Skip the wait with refresh=hard
    !
    kubectl -n argocd annotate app forgejo argocd.argoproj.io/refresh=hard --overwrite
    kubectl -n argocd get app forgejo -w
    kubectl -n forgejo rollout status deploy/forgejo
    

Rolling back

git revert HEAD
git push origin main

References

Helm

Helm Dependency Update

Forgejo Helm Chart

Last Modified • Saturday, November 7, 2026. 5:48 am UTC+00:00 • Commit: acaedbb