2026-09-10 15:41:15 +02:00
2026-09-10 15:29:43 +02:00
2026-09-10 13:57:05 +02:00
2026-09-10 13:57:05 +02:00
2026-09-10 15:29:43 +02:00
2026-09-10 15:29:43 +02:00
2026-09-10 13:57:05 +02:00
2026-09-10 15:29:43 +02:00

\

kub-web-test

Two Git branches, three deployed environments.

Branches

  • dev — development changes go here
  • prod — Kargo writes promoted content here

There is deliberately no staging branch.

Sites / Kargo Stages

  • DEV — http://web-dev.max.test.scrumdapp.open-ict.hu
  • STAGING — http://web-staging.max.test.scrumdapp.open-ict.hu
  • PROD — http://web-prod.max.test.scrumdapp.open-ict.hu
push to dev
    |
    v
Warehouse
    |
    v (automatic)
   DEV
    |
    v (manual)
 STAGING
    |
    v (manual)
   PROD
    |
    +--> writes promoted content to prod branch

Staging is pinned by Kargo to the exact commit selected from dev. Prod permanently tracks the prod branch.

Initial Git setup

git init
git remote add origin https://git.5vl.nl/5vl/kub-web-test.git

git checkout -b dev
git add .
git commit -m "Initial Helm and Kargo setup"
git push -u origin dev

# Seed prod once so Argo CD has something to deploy initially.
git checkout -b prod
git push -u origin prod

git checkout dev

After that, do your normal work on dev.

Bootstrap Kargo project

kubectl apply -f bootstrap/00-kargo-project.yaml
kubectl get namespace web

Kargo Git credentials

Kargo needs write permission because the prod promotion pushes to prod.

Do not commit the real token.

read -s -p "Git token: " GIT_TOKEN
echo

kubectl create secret generic kub-web-test-git \
  -n web \
  --from-literal=repoURL=https://git.5vl.nl/5vl/kub-web-test.git \
  --from-literal=username=5vl \
  --from-literal=password="$GIT_TOKEN"

kubectl label secret kub-web-test-git \
  -n web \
  kargo.akuity.io/cred-type=git

Argo CD repository credentials

If the repository is private:

kubectl create secret generic kub-web-test-repository \
  -n argocd \
  --from-literal=type=git \
  --from-literal=url=https://git.5vl.nl/5vl/kub-web-test.git \
  --from-literal=username=5vl \
  --from-literal=password="$GIT_TOKEN"

kubectl label secret kub-web-test-repository \
  -n argocd \
  argocd.argoproj.io/secret-type=repository

Then:

unset GIT_TOKEN

Create Argo CD apps and Kargo pipeline

kubectl apply -f bootstrap/01-argocd-applications.yaml
kubectl apply -f bootstrap/02-kargo-pipeline.yaml

Check:

kubectl get applications -n argocd
kubectl get warehouse -n web
kubectl get stages -n web
kubectl get freight -n web

Test the flow

Make any change on dev:

git checkout dev
# edit something
git add .
git commit -m "Test deployment"
git push

Then:

  1. Kargo discovers the commit as Freight.
  2. dev auto-promotes it.
  3. Check the DEV site.
  4. Manually promote that Freight to staging.
  5. Check the STAGING site.
  6. Manually promote the same Freight to prod.
  7. Kargo force-updates the prod branch to that exact selected revision.
  8. Argo CD syncs the PROD site from prod.

The three Kubernetes namespaces are:

  • web-dev
  • web-staging
  • web-prod
S
Description
No description provided
Readme 43 KiB
Languages
HTML 100%