mirror of
https://github.com/hanzocd/example-apps.git
synced 2026-10-30 20:50:47 +00:00
Manifests the docs and the end-to-end suite deploy against: plain, kustomize, helm and jsonnet variants, plus application sets and sync ordering.
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
apiVersion: cd.hanzo.ai/v1alpha1
|
|
kind: ApplicationSet
|
|
metadata:
|
|
name: progressive-sync
|
|
namespace: cd
|
|
spec:
|
|
generators:
|
|
- matrix:
|
|
generators:
|
|
- list:
|
|
elements:
|
|
- env: dev
|
|
- env: qa
|
|
- env: prod
|
|
- list:
|
|
elements:
|
|
- region: us-east
|
|
- region: us-west
|
|
strategy:
|
|
type: RollingSync
|
|
deletionOrder: Reverse
|
|
rollingSync:
|
|
steps:
|
|
- matchExpressions:
|
|
- key: env
|
|
operator: In
|
|
values: [dev]
|
|
# maxUpdate: 100% (implicit default - all dev apps sync simultaneously)
|
|
- matchExpressions:
|
|
- key: env
|
|
operator: In
|
|
values: [qa]
|
|
maxUpdate: 0 # Manual gate - requires manual sync via CLI or UI
|
|
- matchExpressions:
|
|
- key: env
|
|
operator: In
|
|
values: [prod]
|
|
maxUpdate: 10% # Gradual rollout - with 2 apps, syncs 1 at a time
|
|
template:
|
|
metadata:
|
|
name: 'appset-progressive-{{env}}-{{region}}'
|
|
labels:
|
|
env: '{{env}}'
|
|
region: '{{region}}'
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://github.com/hanzocd/cd-example-apps
|
|
targetRevision: HEAD
|
|
path: lightweight/app-a
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: 'appset-progressive-{{env}}-{{region}}'
|
|
syncPolicy:
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
automated:
|
|
enabled: false
|
|
# NOTE: automated sync is disabled - RollingSync manages sync operations
|