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

44 lines
1.4 KiB
YAML

# Pull Request generator
# Queries the GitHub API for open PRs against hanzocd/cd-example-apps.
# Filtered by a label that no PR carries, so this generator returns zero matches
# and generates zero Applications. Demonstrates the "quiet zero-result" case:
# the ApplicationSet itself stays healthy with an empty result.
#
# Note: runs anonymously against the GitHub API (no tokenRef). This is fine for
# a low-traffic demo but is rate-limited to ~60 req/hour per source IP. For
# production use, configure a tokenRef pointing at a Secret containing a GitHub
# personal access token. See:
# https://cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Pull-Request/
apiVersion: cd.hanzo.ai/v1alpha1
kind: ApplicationSet
metadata:
name: pull-request
namespace: cd
spec:
generators:
- pullRequest:
github:
owner: hanzocd
repo: cd-example-apps
labels:
- cd-applicationset-demo
requeueAfterSeconds: 1800
template:
metadata:
name: 'appset-pr-{{number}}'
spec:
project: default
source:
repoURL: https://github.com/hanzocd/cd-example-apps
targetRevision: '{{head_sha}}'
path: lightweight/app-a
destination:
server: https://kubernetes.default.svc
namespace: 'appset-pr-{{number}}'
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true
selfHeal: true