This is a GitOps repository of a Kargo Helm example for getting started.
- A Warehouse which monitors a container repository for new images
- Three Stage (dev, staging, prod) deploy pipeline
- Image tag promotion
- Direct Git commits to dev, staging
- Feature flag promotion
- Kargo v1.3 (for older Kargo versions, switch to the release-X.Y branch)
- GitHub and a container registry (GHCR.io)
gitanddockerinstalled
-
Fork this repo, then clone it locally (from your fork).
-
Run the
personalize.shto customize the manifests to use your GitHub username:
./personalize.sh <yourgithubusername>git committhe personalized changes:
git commit -a -m "personalize manifests"
git push- Create a guestbook container image repository in your GitHub account.
The easiest way to create a new ghcr.io image repository, is by retagging and pushing an existing image with your GitHub username:
docker login ghcr.io
docker buildx imagetools create \
ghcr.io/akuity/guestbook:latest \
-t ghcr.io/<yourgithubusername>/guestbook:v0.0.1You will now have a guestbook container image repository. e.g.:
https://github.com/yourgithubusername/guestbook/pkgs/container/guestbook
-
Change guestbook container image repository to public.
In the GitHub UI, navigate to the "guestbook" container repository, Package settings, and change the visibility of the package to public. This will allow Kargo to monitor this repository for new images, without requiring you to configuring Kargo with container image repository credentials.
-
Download and install the latest CLI from Kargo Releases
./download-cli.sh /usr/local/bin/kargo- Login to Kargo:
kargo login --admin https://<kargo-url>- Apply the Kargo manifests:
kargo apply -f ./kargo- Add the Git repository credentials to Kargo. This can also be done in the UI
in the
kargo-helmProject.
kargo create credentials github-creds \
--project kargo-helm \
--git \
--username <yourgithubusername> \
--repo-url https://github.com/<yourgithubusername>/kargo-helm.gitAs part of the promotion process, Kargo requires privileges to commit changes to your Git repository, as well as the ability to create pull requests. Ensure that the given token has these privileges.
- Promote the image!
You now have a Kargo Pipeline which promotes images from the guestbook
container image repository, through a three-stage deploy pipeline. Visit
the kargo-helm Project in the Kargo UI to see the deploy pipeline.
To promote, click the target icon to the left of the dev Stage, select
the detected Freight, and click Yes to promote. Once promoted, the Freight
will be qualified to be promoted to downstream Stages (staging, prod).
To simulate a release, simply retag an image with a newer semantic version. e.g.:
docker buildx imagetools create \
ghcr.io/akuity/guestbook:latest \
-t ghcr.io/<yourgithubusername>/guestbook:v0.0.2Then refresh the Warehouse in the UI to detect the new Freight.
Edit the base/feature-flags.yaml with a new setting. This will be detected
by the features Warehouse as a promotable configuration.

