Files
service-catalog/manifests/applicationset/airflow/1.16.0/applicationset.yaml
T
wbsong111 3ee1c1ee23 카탈로그 앱 내장 bitnami postgresql → cnpg-cluster 전환 (1차 5개 차트)
이슈 #9에서 결정된 CloudNativePG 채택을 카탈로그 앱에 확장 적용한다.
airflow/lakekeeper/mlflow/superset/flowise 5개 차트가 내장하던 bitnami
postgresql 서브차트를 끄고 앱 전용 cnpg-cluster 인스턴스를 외부 DB로 쓰도록
전환했다. 5개 모두 dev 클러스터 격리 네임스페이스에서 배포 테스트로 실측 검증했다.

gitea/keycloak/dnsup 는 서브차트가 아니라 공유 postgresql-ha 를 외부 참조하며
paasup/dipup 레포 관리 대상이라 제외했다 — 인수인계 문서만 추가했다.

배포 구조:
- ArgoCD ApplicationSet 으로 DB(syncWave 0) → 앱(syncWave 1) 순서를 보장한다.
  기존 openmetadata/victoria-metrics 관례를 따랐다. cnpg-cluster 차트는 범용
  상태로 유지하고 앱별 값은 manifests/applicationset/<app>/ 에 둔다.

검증 중 발견해 함께 고친 문제:
- lakekeeper: cnpg 의 -ro 는 replica 전용이라 instances:1 에서 엔드포인트가
  0개다. 읽기 연결을 -r(전체 라운드로빈)로 교체했다.
- airflow/superset: ingressClassName 누락 + kong 애노테이션 잔존으로 이
  클러스터(apisix 전용)에서 ingress 접근이 아예 불가능했다. apisix + regex
  path 로 교체했다.
- 배포 테스트가 PV 만 지우고 Longhorn Volume CR 을 남겨 storageScheduled 가
  누적됐다(orphan 112개 ~1TB 로 배포 차단). 두 스크립트의 정리 로직을 고쳤다.

재사용 구조화:
- .claude/skills/chart-to-cnpg/ 신규. 남은 4개 차트(langflow-ide, langfuse,
  litellm, nemo)에 같은 절차를 재사용한다. flowise 에 실제 적용해 검증했다.
- 배포 테스트 공통 절차는 .claude/deploy-test-procedure.md, 환경 함정은
  .claude/pitfalls.md 로 단일화하고 앱별 README 는 참조만 남겼다.

관련: #9, #14

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 15:17:46 +09:00

62 lines
2.0 KiB
YAML

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