The watchtower that spots new versions and the packages that carry them
A Warehouse is a Kargo resource that continuously monitors artifact sources for new versions. When it finds something new, it creates Freight.
Watch a registry for new image tags. Supports Docker Hub, ACR, ECR, GCR, and any OCI registry.
Watch a Git repo for new commits on a branch. Great for config changes or manifests.
Watch a Helm chart repository for new chart versions. Supports OCI and HTTP repos.
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
name: my-warehouse
namespace: my-web-app
spec:
subscriptions:
- image:
repoURL: myacr.azurecr.io/my-web-app
imageSelectionStrategy: SemVer
semverConstraint: ">=1.0.0"
This watches your ACR registry for new tags matching SemVer format.
Selects the highest version matching a semantic versioning constraint. Best for versioned releases.
semverConstraint: ">=1.0.0 <2.0.0"
Selects the most recently pushed image. Useful for dev/staging with build-number tags.
allowTags: "^main-.*"
Tracks a specific tag (e.g. latest) by digest. Detects when the tag is re-pushed.
imageSelectionStrategy: Digest
subscriptions:
- image:
repoURL: myacr.azurecr.io/my-web-app
imageSelectionStrategy: SemVer
# Only pick 1.x versions
semverConstraint: "^1.0.0"
# Ignore pre-release tags
ignoreTags:
- ".*-rc.*"
- ".*-beta.*"
SemVer constraints use the same syntax as npm/Cargo:
^1.0.0 = >=1.0.0, <2.0.0 | ~1.2.0 = >=1.2.0, <1.3.0
subscriptions:
- image:
repoURL: myacr.azurecr.io/my-web-app
imageSelectionStrategy: NewestBuild
# Only consider tags matching this regex
allowTags: "^main-[0-9a-f]{7}$"
# Optionally, platform filter
platform: linux/amd64
When to use: Your CI tags images like main-abc1234 (branch + short SHA). No semantic version, but you always want the newest build.
1. What does a Warehouse do when it discovers a new artifact version?
2. Which image selection strategy should you use for tags like "v1.2.3"?
3. How many artifact sources can a single Warehouse subscribe to?
subscriptions:
- git:
repoURL: https://github.com/my-org/my-app-config.git
# Watch a specific branch
branch: main
# Optional: only care about changes in a path
includePaths:
- "charts/my-app/**"
excludePaths:
- "charts/my-app/README.md"
Kargo tracks the latest commit on the specified branch. Path filters let you ignore irrelevant changes.
subscriptions:
- chart:
# Classic Helm repo
repoURL: https://charts.example.com
name: my-app
semverConstraint: "^2.0.0"
# OR for OCI-based Helm repos:
- chart:
repoURL: oci://myacr.azurecr.io/helm
name: my-app
semverConstraint: ">=1.0.0"
Perfect when your team publishes the Helm chart as a versioned artifact.
A single Warehouse can watch multiple sources at once.
spec:
subscriptions:
- image:
repoURL: myacr.azurecr.io/frontend
imageSelectionStrategy: SemVer
- image:
repoURL: myacr.azurecr.io/backend
imageSelectionStrategy: SemVer
- git:
repoURL: https://github.com/my-org/k8s-config.git
branch: main
When any source has a new version, Kargo creates Freight containing the latest version of all subscribed sources.
freightCreationPolicy fieldspec:
freightCreationPolicy: Automatic # default
# Kargo automatically creates Freight
# when new versions are discovered
Freight is a Kubernetes resource representing a specific, immutable combination of artifact versions discovered by a Warehouse.
apiVersion: kargo.akuity.io/v1alpha1
kind: Freight
metadata:
name: abc123def456 # auto-generated unique ID
namespace: my-web-app
labels:
kargo.akuity.io/alias: jolly-penguin # human-friendly name
spec:
origin:
kind: Warehouse
name: my-warehouse
images:
- repoURL: myacr.azurecr.io/my-web-app
tag: "1.5.0"
digest: sha256:a1b2c3d4e5f6...
commits:
- repoURL: https://github.com/my-org/k8s-config.git
id: 7f8e9d0c...
status:
verifiedIn:
dev:
verifiedAt: "2024-01-15T10:30:00Z"
staging:
verifiedAt: "2024-01-15T11:00:00Z"
approvedFor:
staging:
approvedAt: "2024-01-15T10:45:00Z"
prod:
approvedAt: "2024-01-15T11:15:00Z"
Kargo tracks exactly where each Freight has been verified and approved. Full audit trail.
1. What happens to Freight after it is created?
2. In a multi-source Warehouse, when is new Freight created?
3. Can Freight be modified after creation?
# List all Freight in a project
kargo get freight --project my-web-app
# Output:
# NAME ALIAS ORIGIN AGE
# abc123def456 jolly-penguin my-warehouse 5m
# def789ghi012 brave-dolphin my-warehouse 2h
# Describe a specific Freight
kargo get freight abc123def456 \
--project my-web-app -o yaml
# Via kubectl
kubectl get freight -n my-web-app
Every Freight gets an auto-generated alias (e.g., jolly-penguin, brave-dolphin) so you don't have to remember hash IDs.
kargo promote --freight jolly-penguinKargo uses Kubernetes Secrets to authenticate with private registries and repos.
# For container registries
kubectl create secret generic my-registry-creds \
--namespace my-web-app \
--from-literal=username=myuser \
--from-literal=password=mytoken
# Label it so Kargo discovers it
kubectl label secret my-registry-creds \
--namespace my-web-app \
kargo.akuity.io/cred-type=image
# Annotate with the repo URL pattern
kubectl annotate secret my-registry-creds \
--namespace my-web-app \
kargo.akuity.io/repo-url="myacr.azurecr.io"
# For Git repos (HTTPS with token)
kubectl create secret generic my-git-creds \
--namespace my-web-app \
--from-literal=username=git \
--from-literal=password=ghp_xxxxxxxxxxxx
kubectl label secret my-git-creds \
--namespace my-web-app \
kargo.akuity.io/cred-type=git
kubectl annotate secret my-git-creds \
--namespace my-web-app \
kargo.akuity.io/repo-url="https://github.com/my-org"
# For SSH-based Git access
kubectl create secret generic my-git-ssh \
--namespace my-web-app \
--from-file=sshPrivateKey=/path/to/key
kubectl label secret my-git-ssh \
kargo.akuity.io/cred-type=git
# Option 1: Service Principal
kubectl create secret generic acr-creds \
--namespace my-web-app \
--from-literal=username=$SP_APP_ID \
--from-literal=password=$SP_PASSWORD
kubectl label secret acr-creds \
--namespace my-web-app \
kargo.akuity.io/cred-type=image
kubectl annotate secret acr-creds \
--namespace my-web-app \
kargo.akuity.io/repo-url="myacr.azurecr.io"
# Option 2: Workload Identity (recommended for AKS)
# Configure the Kargo controller SA with
# federated credentials to access ACR
apiVersion: kargo.akuity.io/v1alpha1
kind: Warehouse
metadata:
name: my-warehouse
namespace: my-web-app
spec:
subscriptions:
- image:
repoURL: myacr.azurecr.io/my-web-app
imageSelectionStrategy: SemVer
semverConstraint: ">=1.0.0"
- git:
repoURL: https://github.com/my-org/k8s-config.git
branch: main
includePaths:
- "apps/my-web-app/**"
This Warehouse creates Freight whenever a new image tag or a new Git commit appears.
1. How does Kargo authenticate with private container registries?
2. Which label must be applied to a Secret for Kargo to use it for image registry credentials?
3. What filtering can you apply to a Git subscription in a Warehouse?
kubectl describe warehouse my-warehouse -n my-web-appsemverConstraint, allowTags, and ignoreTags regexkubectl logs -n kargo deploy/kargo-controllerModule 03: Stages & Promotions
Checkpoints in your delivery pipeline and the recipes for deploying changes.