apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: airflow namespace: platform spec: goTemplate: true goTemplateOptions: ["missingkey=error"] generators: - list: # syncWave 0: 전용 cnpg-cluster DB 인스턴스 먼저 배포 # syncWave 1: airflow 본체 (postgresql.enabled: false, 위 DB의 -rw 서비스를 바라봄) elements: - name: airflow-db chartPath: manifests/helm/cnpg-cluster/1.0.0 baseValues: custom-values.yaml valuesPath: airflow/airflow-db-values.yaml syncWave: "0" - name: airflow chartPath: manifests/helm/airflow/1.16.0 baseValues: custom-values.yaml valuesPath: airflow/airflow-values.yaml syncWave: "1" template: metadata: name: "{{ .name }}" namespace: platform annotations: argocd.argoproj.io/sync-wave: "{{ .syncWave }}" spec: project: default sources: # Source 1: 카탈로그 repo (Helm 차트) - repoURL: https://gitea.example.org/dip/service-catalog targetRevision: master path: "{{ .chartPath }}" helm: releaseName: "{{ .name }}" valueFiles: - "{{ .baseValues }}" # 카탈로그 차트의 정적 베이스값(custom-values) - $values/{{ .valuesPath }} # Source 2의 환경 오버레이 (나중 = 우선) # Source 2: 값(values) repo — dip-console이 렌더한 환경별 값 - repoURL: https://gitea.example.org/dip/tenant-catalog targetRevision: master ref: values destination: server: https://kubernetes.default.svc namespace: airflow syncPolicy: automated: prune: true selfHeal: true syncOptions: - CreateNamespace=true - ServerSideApply=true retry: limit: 5 backoff: duration: 10s factor: 2 maxDuration: 3m