Files
zeekay cded7148d1 Example applications for Hanzo CD
Manifests the docs and the end-to-end suite deploy against: plain, kustomize,
helm and jsonnet variants, plus application sets and sync ordering.
2026-09-04 23:49:48 -07:00

68 lines
1.9 KiB
YAML

# Git generator — Directories variant
# Scans the repo at the target revision and generates one Application per matching directory.
apiVersion: cd.hanzo.ai/v1alpha1
kind: ApplicationSet
metadata:
name: git-directories
namespace: cd
spec:
generators:
- git:
repoURL: https://github.com/hanzocd/cd-example-apps
revision: HEAD
directories:
- path: lightweight/app-*
template:
metadata:
name: 'appset-git-dir-{{path.basename}}'
spec:
project: default
source:
repoURL: https://github.com/hanzocd/cd-example-apps
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: 'appset-git-dir-{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true
selfHeal: true
---
# Git generator — INTENTIONALLY BROKEN
# Points at a revision that does not exist so the generator fails at fetch time.
# Demonstrates what a generator-level failure looks like: the ApplicationSet CR
# shows an ErrorOccurred condition, no child Applications are generated.
apiVersion: cd.hanzo.ai/v1alpha1
kind: ApplicationSet
metadata:
name: git-broken
namespace: cd
spec:
generators:
- git:
repoURL: https://github.com/hanzocd/cd-example-apps
revision: this-branch-does-not-exist
directories:
- path: '*'
template:
metadata:
name: 'appset-git-broken-{{path.basename}}'
spec:
project: default
source:
repoURL: https://github.com/hanzocd/cd-example-apps
targetRevision: HEAD
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: 'appset-git-broken-{{path.basename}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true
selfHeal: true