Guides
Using Kustomize
Deploy Kustomize overlays with Wardn — implemented
Using Kustomize ✅
Kustomize is implemented — the operator renders overlays (bases, patches, components) inside its reconcile, no kustomize binary needed. manifestType: Auto detects kustomization.yaml automatically.
Repo Structure
A typical Kustomize setup with base + overlays:
my-app/
├── base/
│ ├── kustomization.yaml
│ ├── deployment.yaml
│ └── service.yaml
└── overlays/
├── staging/
│ └── kustomization.yaml
└── production/
├── kustomization.yaml
└── replica-patch.yamlbase/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
commonLabels:
app: my-appoverlays/production/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- path: replica-patch.yaml
images:
- name: myapp
newTag: v1.2.4overlays/production/replica-patch.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 5App Configuration
Point source.git.path at the overlay directory:
apiVersion: cd.wardn.space/v1alpha1
kind: App
metadata:
name: my-app-production
namespace: org-my-org
spec:
source:
type: Git
git:
repoURL: https://github.com/myorg/my-app
branch: main
path: overlays/production
manifestType: Auto # detects kustomization.yaml → Kustomize
kustomize: # optional overrides layered on top
images:
- ghcr.io/acme/api=v1.2.4
namePrefix: prod-
components:
- ../../components/monitoring
destination:
namespace: production
syncPolicy:
automated: true
prune: truesource.git.kustomize applies overrides on top of the tracked kustomization.yaml — you can pin images, prepend a name prefix, or include components without editing the repo.
| Field | Description |
|---|---|
images | newName=newTag entries — image pin overrides |
namePrefix | Prepended to every rendered resource name |
components | Extra component paths to include |
Image Tags and Promotion
Two promotion paths work:
# Option 1 — commit to the overlay (GitOps way)
cd overlays/production
kustomize edit set image myapp=myapp:v1.2.5
git add kustomization.yaml && git commit -m "Promote v1.2.5 to production" && git push
# Option 2 — edit the App's kustomize.images override (no repo commit)
kubectl --kubeconfig k3s.yaml edit app my-app-production -n org-my-org
# or via POST /apps/{ns}/{name}/deploy for image-source appsSubstitution too
source.git.substitution layers a ${VAR} map over rendered output:
source:
type: Git
git:
path: overlays/production
substitution:
ENVIRONMENT: production
IMAGE_TAG: v1.2.4Kustomize vs Helm
| Aspect | Kustomize | Helm |
|---|---|---|
| Status | ✅ implemented | 📋 planned |
| Templating | None (patches) | Go templates |
| Values management | Patches and overlays | values.yaml files |
| Package distribution | Git only | Chart repositories |
| Best for | Simple customizations | Complex, parameterized apps |
Related
- Manifest Management — render pipeline
- Helm Charts Guide — alternative (planned)
- Multi-Cluster Guide — environment promotion patterns
- Configuration —
source.git.kustomizereference