카탈로그 앱 내장 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>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# airflow ArgoCD ApplicationSet
|
||||
|
||||
`airflow-db`(cnpg-cluster, syncWave 0) → `airflow`(syncWave 1) 2단계로 배포한다.
|
||||
전체 스키마는 [manifests/applicationset/openmetadata/1.12.1/](../../openmetadata/1.12.1/)와
|
||||
[manifests/applicationset/victoria-metrics/1.0.0/](../../victoria-metrics/1.0.0/)를 따른다.
|
||||
|
||||
## 구성
|
||||
|
||||
- `applicationset.yaml` — list generator로 Application 2개 생성.
|
||||
- `airflow-db-values.yaml` — cnpg-cluster 환경 오버레이 템플릿(DB/owner, 시크릿 참조).
|
||||
- `airflow-values.yaml` — airflow 환경 오버레이 템플릿(DB 비밀번호만).
|
||||
|
||||
두 파일 모두 **템플릿**이다 — dip-console이 렌더링해 값 repo(`dip/tenant-catalog`)의
|
||||
`airflow/*.yaml`로 커밋하는 것을 가정한다.
|
||||
|
||||
## 값 적용 순서 (2단)
|
||||
|
||||
각 Application은 `baseValues`(카탈로그 차트의 `custom-values.yaml`) + `valuesPath`(값 repo의
|
||||
환경 오버레이, 나중 파일 우선)를 병합한다.
|
||||
|
||||
## 사전 준비 (ArgoCD 밖)
|
||||
|
||||
- `cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에 먼저
|
||||
설치되어 있어야 한다 — 없으면 `airflow-db`(Cluster CR)가 webhook 부재로 생성 자체가 거부된다.
|
||||
- `airflow-db-values.yaml`의 `bootstrap.initdb.secretName`과 동일한 이름·값의 K8s Secret이
|
||||
대상 네임스페이스에 미리 존재해야 한다(`username`/`password` 키).
|
||||
- ArgoCD가 `Cluster.postgresql.cnpg.io` 커스텀 리소스의 상태를 "Healthy"로 판정하려면
|
||||
`argocd-cm`에 해당 CRD용 커스텀 헬스 체크(Lua)가 등록되어 있어야 sync-wave 1이 정상
|
||||
대기한다 — 미등록 시 wave 0이 Progressing으로만 남아 wave 1로 못 넘어갈 수 있다.
|
||||
|
||||
## 배포 테스트
|
||||
|
||||
절차와 주의사항은 [.claude/deploy-test-procedure.md](../../../../.claude/deploy-test-procedure.md)
|
||||
"카탈로그 앱 → cnpg-cluster 전환 배포 테스트" 절을 따른다.
|
||||
`APP_POD_SELECTOR="component=webserver"`, fixture는
|
||||
`scripts/deploy-test/fixtures/airflow-deploy-test-overrides.yaml`.
|
||||
@@ -0,0 +1,25 @@
|
||||
# airflow 전용 cnpg-cluster 환경 오버레이 템플릿.
|
||||
# dip-console이 렌더링해 값 repo(dip/tenant-catalog)의 airflow/airflow-db-values.yaml로
|
||||
# 커밋하는 것을 가정한 시작점이다. 배포 테스트로 검증된 값 그대로다
|
||||
# (지난 세션: manifests/helm/cnpg-cluster/1.0.0/custom-values-airflow.yaml).
|
||||
instances: 1
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: airflow
|
||||
owner: airflow
|
||||
secretName: "$INFISICAL_SECRET"
|
||||
|
||||
databases:
|
||||
- name: airflow
|
||||
owner: airflow
|
||||
ensure: present
|
||||
reclaimPolicy: retain
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,9 @@
|
||||
# airflow 환경 오버레이 템플릿 — custom-values.yaml(baseValues) 위에 얹힌다.
|
||||
# DB 비밀번호처럼 환경별로 달라야 하는 민감값만 담는다. 나머지 연결 정보(host/db/user 등)는
|
||||
# custom-values.yaml에 이미 있으므로 여기서 중복 기입하지 않는다.
|
||||
#
|
||||
# airflow-db-values.yaml의 bootstrap.initdb.secretName과 실제 값이 일치해야 한다
|
||||
# ($INFISICAL_SECRET 토큰은 dip-console이 같은 시크릿 값으로 렌더링하는 것을 가정).
|
||||
data:
|
||||
metadataConnection:
|
||||
pass: "$INFISICAL_SECRET"
|
||||
@@ -0,0 +1,61 @@
|
||||
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
|
||||
@@ -0,0 +1,37 @@
|
||||
# flowise ArgoCD ApplicationSet
|
||||
|
||||
`flowise-db`(cnpg-cluster, syncWave 0) → `flowise`(syncWave 1) 2단계로 배포한다.
|
||||
전체 스키마는 [manifests/applicationset/openmetadata/1.12.1/](../../openmetadata/1.12.1/)와
|
||||
[manifests/applicationset/victoria-metrics/1.0.0/](../../victoria-metrics/1.0.0/)를 따른다.
|
||||
|
||||
## 구성
|
||||
|
||||
- `applicationset.yaml` — list generator로 Application 2개 생성.
|
||||
- `flowise-db-values.yaml` — cnpg-cluster 환경 오버레이 템플릿(DB/owner, 시크릿 참조).
|
||||
- `flowise-values.yaml` — flowise 환경 오버레이 템플릿(DB 비밀번호만).
|
||||
|
||||
두 파일 모두 **템플릿**이다 — dip-console이 렌더링해 값 repo(`dip/tenant-catalog`)의
|
||||
`flowise/*.yaml`로 커밋하는 것을 가정한다.
|
||||
|
||||
## 값 적용 순서 (2단)
|
||||
|
||||
각 Application은 `baseValues`(카탈로그 차트의 `custom-values.yaml`) + `valuesPath`(값 repo의
|
||||
환경 오버레이, 나중 파일 우선)를 병합한다.
|
||||
|
||||
## 사전 준비 (ArgoCD 밖)
|
||||
|
||||
- `cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에 먼저
|
||||
설치되어 있어야 한다.
|
||||
- `flowise-db-values.yaml`의 `bootstrap.initdb.secretName`과 동일한 이름·값의 K8s Secret이
|
||||
대상 네임스페이스에 미리 존재해야 한다(`username`/`password` 키).
|
||||
- ArgoCD가 `Cluster.postgresql.cnpg.io` 커스텀 리소스의 상태를 "Healthy"로 판정하려면
|
||||
`argocd-cm`에 해당 CRD용 커스텀 헬스 체크(Lua)가 등록되어 있어야 sync-wave 1이 정상 대기한다.
|
||||
- flowise는 내장 postgresql을 끄는 것(`postgresql.enabled: false`)만으로는 부족하고
|
||||
`externalPostgresql.enabled: true`를 함께 켜야 한다 — 다른 차트와 다른 점이다.
|
||||
|
||||
## 배포 테스트
|
||||
|
||||
절차와 주의사항은 [.claude/deploy-test-procedure.md](../../../../.claude/deploy-test-procedure.md)
|
||||
"카탈로그 앱 → cnpg-cluster 전환 배포 테스트" 절을 따른다.
|
||||
`APP_POD_SELECTOR="app.kubernetes.io/component=flowise"`, fixture는
|
||||
`scripts/deploy-test/fixtures/flowise-deploy-test-overrides.yaml`.
|
||||
@@ -0,0 +1,59 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: flowise
|
||||
namespace: platform
|
||||
spec:
|
||||
goTemplate: true
|
||||
goTemplateOptions: ["missingkey=error"]
|
||||
generators:
|
||||
- list:
|
||||
# syncWave 0: 전용 cnpg-cluster DB 인스턴스 먼저 배포
|
||||
# syncWave 1: flowise 본체 (postgresql.enabled: false, 위 DB의 -rw 서비스를 바라봄)
|
||||
elements:
|
||||
- name: flowise-db
|
||||
chartPath: manifests/helm/cnpg-cluster/1.0.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: flowise/flowise-db-values.yaml
|
||||
syncWave: "0"
|
||||
- name: flowise
|
||||
chartPath: manifests/helm/flowise/6.0.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: flowise/flowise-values.yaml
|
||||
syncWave: "1"
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ .name }}"
|
||||
namespace: platform
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "{{ .syncWave }}"
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://gitea.example.org/dip/service-catalog
|
||||
targetRevision: master
|
||||
path: "{{ .chartPath }}"
|
||||
helm:
|
||||
releaseName: "{{ .name }}"
|
||||
valueFiles:
|
||||
- "{{ .baseValues }}"
|
||||
- $values/{{ .valuesPath }}
|
||||
- repoURL: https://gitea.example.org/dip/tenant-catalog
|
||||
targetRevision: master
|
||||
ref: values
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: flowise
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
retry:
|
||||
limit: 5
|
||||
backoff:
|
||||
duration: 10s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
@@ -0,0 +1,24 @@
|
||||
# flowise 전용 cnpg-cluster 환경 오버레이 템플릿.
|
||||
# dip-console이 렌더링해 값 repo(dip/tenant-catalog)의 flowise/flowise-db-values.yaml로
|
||||
# 커밋하는 것을 가정한 시작점이다.
|
||||
instances: 1
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: flowise
|
||||
owner: flowise
|
||||
secretName: "$INFISICAL_SECRET"
|
||||
|
||||
databases:
|
||||
- name: flowise
|
||||
owner: flowise
|
||||
ensure: present
|
||||
reclaimPolicy: retain
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,8 @@
|
||||
# flowise 환경 오버레이 템플릿 — custom-values.yaml(baseValues) 위에 얹힌다.
|
||||
# DB 비밀번호처럼 환경별로 달라야 하는 민감값만 담는다. 나머지 연결 정보(host/db/user 등)는
|
||||
# custom-values.yaml에 이미 있으므로 여기서 중복 기입하지 않는다.
|
||||
#
|
||||
# flowise-db-values.yaml의 bootstrap.initdb.secretName과 실제 값이 일치해야 한다
|
||||
# ($INFISICAL_SECRET 토큰은 dip-console이 같은 시크릿 값으로 렌더링하는 것을 가정).
|
||||
externalPostgresql:
|
||||
password: "$INFISICAL_SECRET"
|
||||
@@ -0,0 +1,35 @@
|
||||
# lakekeeper ArgoCD ApplicationSet
|
||||
|
||||
`lakekeeper-db`(cnpg-cluster, syncWave 0) → `lakekeeper`(syncWave 1) 2단계로 배포한다.
|
||||
전체 스키마는 [manifests/applicationset/openmetadata/1.12.1/](../../openmetadata/1.12.1/)와
|
||||
[manifests/applicationset/victoria-metrics/1.0.0/](../../victoria-metrics/1.0.0/)를 따른다.
|
||||
|
||||
## 구성
|
||||
|
||||
- `applicationset.yaml` — list generator로 Application 2개 생성.
|
||||
- `lakekeeper-db-values.yaml` — cnpg-cluster 환경 오버레이 템플릿(DB/owner, 시크릿 참조).
|
||||
- `lakekeeper-values.yaml` — lakekeeper 환경 오버레이 템플릿(DB 비밀번호만).
|
||||
|
||||
두 파일 모두 **템플릿**이다 — dip-console이 렌더링해 값 repo(`dip/tenant-catalog`)의
|
||||
`lakekeeper/*.yaml`로 커밋하는 것을 가정한다.
|
||||
|
||||
## 값 적용 순서 (2단)
|
||||
|
||||
각 Application은 `baseValues`(카탈로그 차트의 `custom-values.yaml`) + `valuesPath`(값 repo의
|
||||
환경 오버레이, 나중 파일 우선)를 병합한다.
|
||||
|
||||
## 사전 준비 (ArgoCD 밖)
|
||||
|
||||
- `cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에 먼저
|
||||
설치되어 있어야 한다.
|
||||
- `lakekeeper-db-values.yaml`의 `bootstrap.initdb.secretName`과 동일한 이름·값의 K8s Secret이
|
||||
대상 네임스페이스에 미리 존재해야 한다(`username`/`password` 키).
|
||||
- ArgoCD가 `Cluster.postgresql.cnpg.io` 커스텀 리소스의 상태를 "Healthy"로 판정하려면
|
||||
`argocd-cm`에 해당 CRD용 커스텀 헬스 체크(Lua)가 등록되어 있어야 sync-wave 1이 정상 대기한다.
|
||||
|
||||
## 배포 테스트
|
||||
|
||||
절차와 주의사항은 [.claude/deploy-test-procedure.md](../../../../.claude/deploy-test-procedure.md)
|
||||
"카탈로그 앱 → cnpg-cluster 전환 배포 테스트" 절을 따른다.
|
||||
`APP_POD_SELECTOR="app.kubernetes.io/component=catalog"`, fixture는
|
||||
`scripts/deploy-test/fixtures/lakekeeper-deploy-test-overrides.yaml`.
|
||||
@@ -0,0 +1,59 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: lakekeeper
|
||||
namespace: platform
|
||||
spec:
|
||||
goTemplate: true
|
||||
goTemplateOptions: ["missingkey=error"]
|
||||
generators:
|
||||
- list:
|
||||
# syncWave 0: 전용 cnpg-cluster DB 인스턴스 먼저 배포
|
||||
# syncWave 1: lakekeeper 본체 (postgresql.enabled: false, 위 DB의 -rw/-r 서비스를 바라봄)
|
||||
elements:
|
||||
- name: lakekeeper-db
|
||||
chartPath: manifests/helm/cnpg-cluster/1.0.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: lakekeeper/lakekeeper-db-values.yaml
|
||||
syncWave: "0"
|
||||
- name: lakekeeper
|
||||
chartPath: manifests/helm/lakekeeper/0.11.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: lakekeeper/lakekeeper-values.yaml
|
||||
syncWave: "1"
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ .name }}"
|
||||
namespace: platform
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "{{ .syncWave }}"
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://gitea.example.org/dip/service-catalog
|
||||
targetRevision: master
|
||||
path: "{{ .chartPath }}"
|
||||
helm:
|
||||
releaseName: "{{ .name }}"
|
||||
valueFiles:
|
||||
- "{{ .baseValues }}"
|
||||
- $values/{{ .valuesPath }}
|
||||
- repoURL: https://gitea.example.org/dip/tenant-catalog
|
||||
targetRevision: master
|
||||
ref: values
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: lakekeeper
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
retry:
|
||||
limit: 5
|
||||
backoff:
|
||||
duration: 10s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
@@ -0,0 +1,25 @@
|
||||
# lakekeeper 전용 cnpg-cluster 환경 오버레이 템플릿.
|
||||
# dip-console이 렌더링해 값 repo(dip/tenant-catalog)의 lakekeeper/lakekeeper-db-values.yaml로
|
||||
# 커밋하는 것을 가정한 시작점이다. 배포 테스트로 검증된 값 그대로다
|
||||
# (지난 세션: manifests/helm/cnpg-cluster/1.0.0/custom-values-lakekeeper.yaml).
|
||||
instances: 1
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: lakekeeper
|
||||
owner: lakekeeper
|
||||
secretName: "$INFISICAL_SECRET"
|
||||
|
||||
databases:
|
||||
- name: lakekeeper
|
||||
owner: lakekeeper
|
||||
ensure: present
|
||||
reclaimPolicy: retain
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,8 @@
|
||||
# lakekeeper 환경 오버레이 템플릿 — custom-values.yaml(baseValues) 위에 얹힌다.
|
||||
# DB 비밀번호처럼 환경별로 달라야 하는 민감값만 담는다. 나머지 연결 정보(host_read/host_write/
|
||||
# database/user 등)는 custom-values.yaml에 이미 있으므로 여기서 중복 기입하지 않는다.
|
||||
#
|
||||
# lakekeeper-db-values.yaml의 bootstrap.initdb.secretName과 실제 값이 일치해야 한다
|
||||
# ($INFISICAL_SECRET 토큰은 dip-console이 같은 시크릿 값으로 렌더링하는 것을 가정).
|
||||
externalDatabase:
|
||||
password: "$INFISICAL_SECRET"
|
||||
@@ -0,0 +1,35 @@
|
||||
# mlflow ArgoCD ApplicationSet
|
||||
|
||||
`mlflow-db`(cnpg-cluster, syncWave 0) → `mlflow`(syncWave 1) 2단계로 배포한다.
|
||||
전체 스키마는 [manifests/applicationset/openmetadata/1.12.1/](../../openmetadata/1.12.1/)와
|
||||
[manifests/applicationset/victoria-metrics/1.0.0/](../../victoria-metrics/1.0.0/)를 따른다.
|
||||
|
||||
## 구성
|
||||
|
||||
- `applicationset.yaml` — list generator로 Application 2개 생성.
|
||||
- `mlflow-db-values.yaml` — cnpg-cluster 환경 오버레이 템플릿(DB/owner, 시크릿 참조).
|
||||
- `mlflow-values.yaml` — mlflow 환경 오버레이 템플릿(DB 비밀번호만).
|
||||
|
||||
두 파일 모두 **템플릿**이다 — dip-console이 렌더링해 값 repo(`dip/tenant-catalog`)의
|
||||
`mlflow/*.yaml`로 커밋하는 것을 가정한다.
|
||||
|
||||
## 값 적용 순서 (2단)
|
||||
|
||||
각 Application은 `baseValues`(카탈로그 차트의 `custom-values.yaml`) + `valuesPath`(값 repo의
|
||||
환경 오버레이, 나중 파일 우선)를 병합한다.
|
||||
|
||||
## 사전 준비 (ArgoCD 밖)
|
||||
|
||||
- `cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에 먼저
|
||||
설치되어 있어야 한다.
|
||||
- `mlflow-db-values.yaml`의 `bootstrap.initdb.secretName`과 동일한 이름·값의 K8s Secret이
|
||||
대상 네임스페이스에 미리 존재해야 한다(`username`/`password` 키).
|
||||
- ArgoCD가 `Cluster.postgresql.cnpg.io` 커스텀 리소스의 상태를 "Healthy"로 판정하려면
|
||||
`argocd-cm`에 해당 CRD용 커스텀 헬스 체크(Lua)가 등록되어 있어야 sync-wave 1이 정상 대기한다.
|
||||
|
||||
## 배포 테스트
|
||||
|
||||
절차와 주의사항은 [.claude/deploy-test-procedure.md](../../../../.claude/deploy-test-procedure.md)
|
||||
"카탈로그 앱 → cnpg-cluster 전환 배포 테스트" 절을 따른다.
|
||||
`APP_POD_SELECTOR="app.kubernetes.io/component=tracking"`, fixture는
|
||||
`scripts/deploy-test/fixtures/mlflow-deploy-test-overrides.yaml`.
|
||||
@@ -0,0 +1,59 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: mlflow
|
||||
namespace: platform
|
||||
spec:
|
||||
goTemplate: true
|
||||
goTemplateOptions: ["missingkey=error"]
|
||||
generators:
|
||||
- list:
|
||||
# syncWave 0: 전용 cnpg-cluster DB 인스턴스 먼저 배포
|
||||
# syncWave 1: mlflow 본체 (postgresql.enabled: false, 위 DB의 -rw 서비스를 바라봄)
|
||||
elements:
|
||||
- name: mlflow-db
|
||||
chartPath: manifests/helm/cnpg-cluster/1.0.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: mlflow/mlflow-db-values.yaml
|
||||
syncWave: "0"
|
||||
- name: mlflow
|
||||
chartPath: manifests/helm/mlflow/2.1.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: mlflow/mlflow-values.yaml
|
||||
syncWave: "1"
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ .name }}"
|
||||
namespace: platform
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "{{ .syncWave }}"
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://gitea.example.org/dip/service-catalog
|
||||
targetRevision: master
|
||||
path: "{{ .chartPath }}"
|
||||
helm:
|
||||
releaseName: "{{ .name }}"
|
||||
valueFiles:
|
||||
- "{{ .baseValues }}"
|
||||
- $values/{{ .valuesPath }}
|
||||
- repoURL: https://gitea.example.org/dip/tenant-catalog
|
||||
targetRevision: master
|
||||
ref: values
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: mlflow
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
retry:
|
||||
limit: 5
|
||||
backoff:
|
||||
duration: 10s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
@@ -0,0 +1,25 @@
|
||||
# mlflow 전용 cnpg-cluster 환경 오버레이 템플릿.
|
||||
# dip-console이 렌더링해 값 repo(dip/tenant-catalog)의 mlflow/mlflow-db-values.yaml로
|
||||
# 커밋하는 것을 가정한 시작점이다. 배포 테스트로 검증된 값 그대로다
|
||||
# (지난 세션: manifests/helm/cnpg-cluster/1.0.0/custom-values-mlflow.yaml).
|
||||
instances: 1
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: mlflow
|
||||
owner: mlflow
|
||||
secretName: "$INFISICAL_SECRET"
|
||||
|
||||
databases:
|
||||
- name: mlflow
|
||||
owner: mlflow
|
||||
ensure: present
|
||||
reclaimPolicy: retain
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,8 @@
|
||||
# mlflow 환경 오버레이 템플릿 — custom-values.yaml(baseValues) 위에 얹힌다.
|
||||
# DB 비밀번호처럼 환경별로 달라야 하는 민감값만 담는다. 나머지 연결 정보(host/db/user 등)는
|
||||
# custom-values.yaml에 이미 있으므로 여기서 중복 기입하지 않는다.
|
||||
#
|
||||
# mlflow-db-values.yaml의 bootstrap.initdb.secretName과 실제 값이 일치해야 한다
|
||||
# ($INFISICAL_SECRET 토큰은 dip-console이 같은 시크릿 값으로 렌더링하는 것을 가정).
|
||||
externalDatabase:
|
||||
password: "$INFISICAL_SECRET"
|
||||
@@ -0,0 +1,39 @@
|
||||
# superset ArgoCD ApplicationSet
|
||||
|
||||
`superset-db`(cnpg-cluster, syncWave 0) → `superset`(syncWave 1) 2단계로 배포한다.
|
||||
전체 스키마는 [manifests/applicationset/openmetadata/1.12.1/](../../openmetadata/1.12.1/)와
|
||||
[manifests/applicationset/victoria-metrics/1.0.0/](../../victoria-metrics/1.0.0/)를 따른다.
|
||||
|
||||
## 구성
|
||||
|
||||
- `applicationset.yaml` — list generator로 Application 2개 생성.
|
||||
- `superset-db-values.yaml` — cnpg-cluster 환경 오버레이 템플릿(DB/owner, 시크릿 참조).
|
||||
- `superset-values.yaml` — superset 환경 오버레이 템플릿(DB 비밀번호만).
|
||||
|
||||
두 파일 모두 **템플릿**이다 — dip-console이 렌더링해 값 repo(`dip/tenant-catalog`)의
|
||||
`superset/*.yaml`로 커밋하는 것을 가정한다.
|
||||
|
||||
## 값 적용 순서 (2단)
|
||||
|
||||
각 Application은 `baseValues`(카탈로그 차트의 `custom-values.yaml`) + `valuesPath`(값 repo의
|
||||
환경 오버레이, 나중 파일 우선)를 병합한다.
|
||||
|
||||
## 사전 준비 (ArgoCD 밖)
|
||||
|
||||
- `cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에 먼저
|
||||
설치되어 있어야 한다.
|
||||
- `superset-db-values.yaml`의 `bootstrap.initdb.secretName`과 동일한 이름·값의 K8s Secret이
|
||||
대상 네임스페이스에 미리 존재해야 한다(`username`/`password` 키).
|
||||
- ArgoCD가 `Cluster.postgresql.cnpg.io` 커스텀 리소스의 상태를 "Healthy"로 판정하려면
|
||||
`argocd-cm`에 해당 CRD용 커스텀 헬스 체크(Lua)가 등록되어 있어야 sync-wave 1이 정상 대기한다.
|
||||
- `custom-values.yaml`은 Keycloak OIDC 연동(`AUTH_TYPE = AUTH_OAUTH`)이 기본 활성화되어
|
||||
있고 `client_secret`/keycloak URL이 플레이스홀더다 — 실제 배포 전 반드시 실제 값으로
|
||||
채워야 한다. 채우지 않으면 로그인 화면에 "Keycloak으로 로그인" 버튼만 뜨고 실제로는
|
||||
로그인이 불가능하다(아이디/비번 입력폼 자체가 사라짐).
|
||||
|
||||
## 배포 테스트
|
||||
|
||||
절차와 주의사항은 [.claude/deploy-test-procedure.md](../../../../.claude/deploy-test-procedure.md)
|
||||
"카탈로그 앱 → cnpg-cluster 전환 배포 테스트" 절을 따른다.
|
||||
`APP_POD_SELECTOR="app=superset"`, fixture는
|
||||
`scripts/deploy-test/fixtures/superset-deploy-test-overrides.yaml`.
|
||||
@@ -0,0 +1,59 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: superset
|
||||
namespace: platform
|
||||
spec:
|
||||
goTemplate: true
|
||||
goTemplateOptions: ["missingkey=error"]
|
||||
generators:
|
||||
- list:
|
||||
# syncWave 0: 전용 cnpg-cluster DB 인스턴스 먼저 배포
|
||||
# syncWave 1: superset 본체 (postgresql.enabled: false, 위 DB의 -rw 서비스를 바라봄)
|
||||
elements:
|
||||
- name: superset-db
|
||||
chartPath: manifests/helm/cnpg-cluster/1.0.0
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: superset/superset-db-values.yaml
|
||||
syncWave: "0"
|
||||
- name: superset
|
||||
chartPath: manifests/helm/superset/0.13.5
|
||||
baseValues: custom-values.yaml
|
||||
valuesPath: superset/superset-values.yaml
|
||||
syncWave: "1"
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ .name }}"
|
||||
namespace: platform
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "{{ .syncWave }}"
|
||||
spec:
|
||||
project: default
|
||||
sources:
|
||||
- repoURL: https://gitea.example.org/dip/service-catalog
|
||||
targetRevision: master
|
||||
path: "{{ .chartPath }}"
|
||||
helm:
|
||||
releaseName: "{{ .name }}"
|
||||
valueFiles:
|
||||
- "{{ .baseValues }}"
|
||||
- $values/{{ .valuesPath }}
|
||||
- repoURL: https://gitea.example.org/dip/tenant-catalog
|
||||
targetRevision: master
|
||||
ref: values
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: superset
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
retry:
|
||||
limit: 5
|
||||
backoff:
|
||||
duration: 10s
|
||||
factor: 2
|
||||
maxDuration: 3m
|
||||
@@ -0,0 +1,25 @@
|
||||
# superset 전용 cnpg-cluster 환경 오버레이 템플릿.
|
||||
# dip-console이 렌더링해 값 repo(dip/tenant-catalog)의 superset/superset-db-values.yaml로
|
||||
# 커밋하는 것을 가정한 시작점이다. 배포 테스트로 검증된 값 그대로다
|
||||
# (지난 세션: manifests/helm/cnpg-cluster/1.0.0/custom-values-superset.yaml).
|
||||
instances: 1
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: superset
|
||||
owner: superset
|
||||
secretName: "$INFISICAL_SECRET"
|
||||
|
||||
databases:
|
||||
- name: superset
|
||||
owner: superset
|
||||
ensure: present
|
||||
reclaimPolicy: retain
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,9 @@
|
||||
# superset 환경 오버레이 템플릿 — custom-values.yaml(baseValues) 위에 얹힌다.
|
||||
# DB 비밀번호처럼 환경별로 달라야 하는 민감값만 담는다. 나머지 연결 정보(host/db/user 등)는
|
||||
# custom-values.yaml에 이미 있으므로 여기서 중복 기입하지 않는다.
|
||||
#
|
||||
# superset-db-values.yaml의 bootstrap.initdb.secretName과 실제 값이 일치해야 한다
|
||||
# ($INFISICAL_SECRET 토큰은 dip-console이 같은 시크릿 값으로 렌더링하는 것을 가정).
|
||||
supersetNode:
|
||||
connections:
|
||||
db_pass: "$INFISICAL_SECRET"
|
||||
@@ -122,17 +122,40 @@ logs:
|
||||
|
||||
### 4) Postgresql 설정
|
||||
|
||||
- 내장 postgresql을 사용하여 배포할 수 있다.
|
||||
- 내장 bitnami postgresql 서브차트 대신, `cnpg-cluster`(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
- **사전 조건**: `cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에
|
||||
먼저 설치되어 있어야 한다.
|
||||
- **배포 순서**
|
||||
``` sh
|
||||
# 1) airflow용 DB 계정 시크릿 생성 (아래 password는 metadataConnection.pass와 동일해야 한다)
|
||||
kubectl create secret generic airflow-db-app-secret \
|
||||
--from-literal=username=airflow --from-literal=password=airflow -n airflow
|
||||
|
||||
# 2) 전용 cnpg-cluster 배포
|
||||
helm upgrade airflow-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
-f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
-f manifests/applicationset/airflow/1.16.0/airflow-db-values.yaml \
|
||||
--install -n airflow
|
||||
|
||||
# 3) airflow 배포 (기존 배포 방법과 동일)
|
||||
helm upgrade airflow ./ -f custom-values.yaml --install -n airflow --create-namespace
|
||||
```
|
||||
- ArgoCD로 배포한다면 `manifests/applicationset/airflow/1.16.0/`의 ApplicationSet을 쓴다 —
|
||||
`airflow-db`(syncWave 0) → `airflow`(syncWave 1) 순서로 자동 배포된다. 자세한 내용은
|
||||
해당 디렉토리의 `README.md` 참고.
|
||||
- custom-values.yaml
|
||||
``` yaml
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
enablePostgresUser: true
|
||||
postgresPassword: postgres # postgres 유저의 패스워드 설정
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi # airflow에서 사용하는 DB의 볼륨 사이즈 설정
|
||||
storageClass: "" # DB 볼륨 배포를 위한 storage class 설정
|
||||
```
|
||||
enabled: false
|
||||
|
||||
data:
|
||||
metadataConnection:
|
||||
user: airflow
|
||||
pass: airflow # 위 시크릿 생성 시 사용한 password와 동일해야 한다
|
||||
protocol: postgresql
|
||||
host: airflow-db-rw # cnpg-cluster 릴리스명이 airflow-db일 때의 rw 서비스명
|
||||
port: 5432
|
||||
db: airflow
|
||||
sslmode: disable
|
||||
```
|
||||
- 참고: `manifests/applicationset/airflow/1.16.0/airflow-db-values.yaml`
|
||||
@@ -4,11 +4,17 @@
|
||||
ingress:
|
||||
web:
|
||||
enabled: true
|
||||
# Kong → APISIX 마이그레이션(issue #139, mlflow/lakekeeper와 동일). 이 클러스터에는
|
||||
# kong ingress controller가 없어 `kubernetes.io/ingress.class: kong` 애노테이션 방식은
|
||||
# 어떤 컨트롤러도 인식하지 않아 접근 자체가 불가능했다(실측 — CLASS: <none>).
|
||||
ingressClassName: "apisix"
|
||||
# 기본 path "/" 는 정확히 "/" 만 매치되어(exact) airflow가 "/home" 등으로 리다이렉트한
|
||||
# 뒤에는 전부 404가 난다(실측). lakekeeper와 동일하게 regex 전체 매치로 바꾼다.
|
||||
path: "/.*"
|
||||
annotations:
|
||||
cert-manager.io/issuer: "root-ca-issuer"
|
||||
kubernetes.io/ingress.class: kong
|
||||
konghq.com/protocols: https
|
||||
konghq.com/https-redirect-status-code: "301"
|
||||
cert-manager.io/cluster-issuer: "root-ca-issuer"
|
||||
k8s.apisix.apache.org/ssl-redirect: "true"
|
||||
k8s.apisix.apache.org/use-regex: "true"
|
||||
hosts:
|
||||
- name: "airflow.example.org"
|
||||
tls:
|
||||
@@ -81,13 +87,19 @@ logs:
|
||||
statsd:
|
||||
enabled: false
|
||||
|
||||
# 내장 bitnami postgresql 서브차트 대신 cnpg-cluster(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
# 사전 배포: helm install airflow-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
# -f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
# -f manifests/applicationset/airflow/1.16.0/airflow-db-values.yaml -n <ns>
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
enablePostgresUser: true
|
||||
postgresPassword: postgres
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi # airflow에서 사용하는 DB의 볼륨 사이즈 설정
|
||||
storageClass: ""
|
||||
enabled: false
|
||||
|
||||
data:
|
||||
metadataConnection:
|
||||
user: airflow
|
||||
pass: airflow
|
||||
protocol: postgresql
|
||||
host: airflow-db-rw
|
||||
port: 5432
|
||||
db: airflow
|
||||
sslmode: disable
|
||||
@@ -34,13 +34,21 @@ ingress:
|
||||
- flowise.example.org
|
||||
secretName: flowise-tls-secret
|
||||
|
||||
# 내장 bitnami postgresql 서브차트 대신 cnpg-cluster(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
# 사전 배포: helm install flowise-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
# -f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
# -f manifests/applicationset/flowise/6.0.0/flowise-db-values.yaml -n <ns>
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
externalPostgresql:
|
||||
enabled: true
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
|
||||
host: flowise-db-rw # cnpg-cluster 릴리스명이 flowise-db일 때의 rw 서비스명
|
||||
port: 5432
|
||||
username: flowise
|
||||
password: flowise # cnpg-cluster 부트스트랩 시크릿의 password와 동일해야 한다
|
||||
database: flowise
|
||||
|
||||
redis:
|
||||
enabled: true
|
||||
|
||||
|
||||
@@ -68,12 +68,20 @@ catalog:
|
||||
secret:
|
||||
secretName: root-ca-secret
|
||||
|
||||
# lakekeeper DB
|
||||
# lakekeeper DB — 내장 postgres 서브차트 대신 cnpg-cluster(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
postgresql:
|
||||
storage:
|
||||
className:
|
||||
requestedSize: 5Gi
|
||||
resources: {}
|
||||
enabled: false
|
||||
|
||||
externalDatabase:
|
||||
type: postgres
|
||||
# -ro는 replica 전용이라 instances:1(권장 기준, small 티어)에서는 엔드포인트가 없다 —
|
||||
# -r(전체 인스턴스 라운드로빈, primary 포함)을 대신 쓴다. 배포 테스트로 실측된 문제다.
|
||||
host_read: "lakekeeper-db-r"
|
||||
host_write: "lakekeeper-db-rw"
|
||||
port: 5432
|
||||
database: lakekeeper
|
||||
user: lakekeeper
|
||||
password: lakekeeper
|
||||
|
||||
# OIDC 인증
|
||||
auth:
|
||||
@@ -162,11 +170,35 @@ extraVolumes:
|
||||
|
||||
### 4) PostgreSQL 데이터베이스 설정
|
||||
|
||||
- 내장 postgres 서브차트(`groundhog2k/postgres`) 대신 `cnpg-cluster`(전용 인스턴스)를 외부 DB로
|
||||
사용한다. **사전 조건**: `cloudnative-pg` operator가 클러스터에 먼저 설치되어 있어야 한다.
|
||||
- **배포 순서**
|
||||
``` sh
|
||||
kubectl create secret generic lakekeeper-db-app-secret \
|
||||
--from-literal=username=lakekeeper --from-literal=password=lakekeeper -n lakekeeper
|
||||
|
||||
helm upgrade lakekeeper-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
-f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
-f manifests/applicationset/lakekeeper/0.11.0/lakekeeper-db-values.yaml \
|
||||
--install -n lakekeeper
|
||||
|
||||
helm upgrade lakekeeper ./ -f custom-values.yaml --install -n lakekeeper --create-namespace
|
||||
```
|
||||
- ArgoCD로 배포한다면 `manifests/applicationset/lakekeeper/0.11.0/`의 ApplicationSet을 쓴다 —
|
||||
`lakekeeper-db`(syncWave 0) → `lakekeeper`(syncWave 1) 순서로 자동 배포된다. 자세한 내용은
|
||||
해당 디렉토리의 `README.md` 참고.
|
||||
|
||||
| Name | 설명 | 기본값 |
|
||||
| ------------------------- | ------------------------------------------------------------ | ----------- |
|
||||
| `postgresql.storage.className` | 스토리지 클래스 | `""` |
|
||||
| `postgresql.storage.requestedSize` | PostgreSQL 스토리지 크기 | `5Gi` |
|
||||
| `postgresql.resources` | PostgreSQL 리소스 설정 | `{}` |
|
||||
| `postgresql.enabled` | 내장 postgres 서브차트 사용 여부. cnpg-cluster 사용 시 `false` | `false` |
|
||||
| `externalDatabase.host_write` | cnpg-cluster의 rw 서비스명(`<release>-rw`) | `lakekeeper-db-rw` |
|
||||
| `externalDatabase.host_read` | cnpg-cluster의 ro 서비스명(`<release>-ro`) | `lakekeeper-db-ro` |
|
||||
| `externalDatabase.database`, `.user`, `.password` | DB 계정 정보. cnpg-cluster 부트스트랩 시크릿과 동일해야 한다 | 참고 예시 |
|
||||
|
||||
> 참고: `manifests/applicationset/lakekeeper/0.11.0/lakekeeper-db-values.yaml`
|
||||
>
|
||||
> OpenFGA 인증/권한 스토어(`internalOpenFGA: true`)는 여전히 자체 bitnami postgresql
|
||||
> 서브차트(`openfga.postgresql`)를 내장 사용한다 — 이번 전환 범위에는 포함되지 않았다.
|
||||
|
||||
### 5) OIDC 인증 설정
|
||||
|
||||
|
||||
@@ -29,13 +29,27 @@ catalog:
|
||||
secret:
|
||||
secretName: root-ca-secret
|
||||
|
||||
# lakekeeper DB
|
||||
# lakekeeper DB — 내장 postgres 서브차트(groundhog2k/postgres) 대신
|
||||
# cnpg-cluster(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
# 사전 배포: helm install lakekeeper-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
# -f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
# -f manifests/applicationset/lakekeeper/0.11.0/lakekeeper-db-values.yaml -n <ns>
|
||||
postgresql:
|
||||
enabled: true
|
||||
storage:
|
||||
className:
|
||||
requestedSize: 5Gi
|
||||
resources: {}
|
||||
enabled: false
|
||||
|
||||
externalDatabase:
|
||||
type: postgres
|
||||
# cnpg-cluster의 -ro 서비스는 replica 파드에만 연결되는데, 권장 배포 기준인
|
||||
# instances: 1(small 티어)에서는 replica가 없어 -ro가 엔드포인트 0개인 서비스가
|
||||
# 된다 — lakekeeper의 read-connection이 영구히 재시도만 하며 멈춘다(배포 테스트로 실측).
|
||||
# -r은 인스턴스 수와 무관하게 항상 primary를 포함해 라운드로빈하므로 이 값을 쓴다.
|
||||
# instances를 3 이상으로 올려 실제 replica를 운용하는 경우에도 -r로 충분하다.
|
||||
host_read: "lakekeeper-db-r"
|
||||
host_write: "lakekeeper-db-rw"
|
||||
port: 5432
|
||||
database: lakekeeper
|
||||
user: lakekeeper
|
||||
password: lakekeeper
|
||||
|
||||
|
||||
# OIDC 인증
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# MLflow 배포
|
||||
|
||||
bitnami/mlflow 차트(2.1.0) 기반 배포 가이드다.
|
||||
|
||||
## 1. 배포 방법
|
||||
|
||||
### 1) 사전 조건
|
||||
|
||||
- 내장 bitnami postgresql 서브차트 대신 `cnpg-cluster`(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
`cloudnative-pg` operator(`manifests/helm/cloudnative-pg/0.29.0`)가 클러스터에 먼저 설치되어
|
||||
있어야 한다.
|
||||
|
||||
### 2) 배포 순서
|
||||
|
||||
```sh
|
||||
git clone https://github.com/paasup/dip-catalog.git
|
||||
cd dip-catalog
|
||||
|
||||
# 1) mlflow용 DB 계정 시크릿 생성 (password는 externalDatabase.password와 동일해야 한다)
|
||||
kubectl create secret generic mlflow-db-app-secret \
|
||||
--from-literal=username=mlflow --from-literal=password=mlflow1234 -n mlflow
|
||||
|
||||
# 2) 전용 cnpg-cluster 배포
|
||||
helm upgrade mlflow-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
-f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
-f manifests/applicationset/mlflow/2.1.0/mlflow-db-values.yaml \
|
||||
--install -n mlflow --create-namespace
|
||||
|
||||
# 3) mlflow 배포
|
||||
helm upgrade mlflow manifests/helm/mlflow/2.1.0 -f custom-values.yaml --install -n mlflow
|
||||
```
|
||||
|
||||
ArgoCD로 배포한다면 `manifests/applicationset/mlflow/2.1.0/`의 ApplicationSet을 쓴다 —
|
||||
`mlflow-db`(syncWave 0) → `mlflow`(syncWave 1) 순서로 자동 배포된다. 자세한 내용은 해당
|
||||
디렉토리의 `README.md` 참고.
|
||||
|
||||
## 2. custom-values.yaml 설명
|
||||
|
||||
### 1) 이미지 설정
|
||||
|
||||
private 환경 배포 시 registry를 변경한다.
|
||||
|
||||
```yaml
|
||||
image:
|
||||
repository: bitnamilegacy/mlflow
|
||||
gitImage:
|
||||
repository: bitnamilegacy/git
|
||||
waitContainer:
|
||||
image:
|
||||
repository: bitnamilegacy/os-shell
|
||||
```
|
||||
|
||||
### 2) PostgreSQL 설정
|
||||
|
||||
내장 postgresql 서브차트를 끄고 `externalDatabase`로 cnpg-cluster를 가리킨다.
|
||||
|
||||
```yaml
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
externalDatabase:
|
||||
dialectDriver: "postgresql"
|
||||
host: "mlflow-db-rw" # cnpg-cluster 릴리스명이 mlflow-db일 때의 rw 서비스명
|
||||
port: 5432
|
||||
user: mlflow
|
||||
password: mlflow1234 # 위 시크릿 생성 시 사용한 password와 동일해야 한다
|
||||
database: mlflow
|
||||
```
|
||||
|
||||
참고: `manifests/applicationset/mlflow/2.1.0/mlflow-db-values.yaml`
|
||||
|
||||
### 3) MinIO 설정
|
||||
|
||||
아티팩트 저장소로 내장 minio 서브차트를 사용한다(`minio.enabled: true`). private 환경에서는
|
||||
`minio.image.repository`를 내부 registry로 변경한다.
|
||||
|
||||
```yaml
|
||||
minio:
|
||||
enabled: true
|
||||
auth:
|
||||
rootUser: admin
|
||||
rootPassword: admin1234
|
||||
image:
|
||||
repository: bitnamilegacy/minio
|
||||
```
|
||||
@@ -45,20 +45,20 @@ run:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
|
||||
# 내장 bitnami postgresql 서브차트 대신 cnpg-cluster(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
# 사전 배포: helm install mlflow-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
# -f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
# -f manifests/applicationset/mlflow/2.1.0/mlflow-db-values.yaml -n <ns>
|
||||
postgresql:
|
||||
auth:
|
||||
username: mlflow
|
||||
password: mlflow1234
|
||||
image:
|
||||
repository: bitnamilegacy/postgresql
|
||||
primary:
|
||||
reousrces:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
enabled: false
|
||||
|
||||
externalDatabase:
|
||||
dialectDriver: "postgresql"
|
||||
host: "mlflow-db-rw"
|
||||
port: 5432
|
||||
user: mlflow
|
||||
password: mlflow1234
|
||||
database: mlflow
|
||||
minio:
|
||||
enabled: true
|
||||
auth:
|
||||
|
||||
@@ -247,34 +247,38 @@ bootstrapScript: |
|
||||
|
||||
### 6) postgresql
|
||||
|
||||
- subchart로 포함된 postgresql을 배포하기 위한 설정이다.
|
||||
- 내장 bitnami postgresql 서브차트 대신 `cnpg-cluster`(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
- **사전 조건**: `cloudnative-pg` operator가 클러스터에 먼저 설치되어 있어야 한다.
|
||||
- **배포 순서**
|
||||
``` sh
|
||||
kubectl create secret generic superset-db-app-secret \
|
||||
--from-literal=username=superset --from-literal=password=superset -n superset
|
||||
|
||||
``` yaml
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
# DB의 계정 및 기본 생성되는 database를 설정한다.
|
||||
username: superset
|
||||
password: superset
|
||||
database: superset
|
||||
image:
|
||||
# private 환경에서 배포할 때 사용할 registry로 설정을 변경한다.
|
||||
registry: docker.io
|
||||
primary:
|
||||
# DB의 리소스를 설정한다.
|
||||
resources:
|
||||
limits: {}
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
# DB에서 사용할 Disk 설정으로 StorageClass와 사이즈를 설정한다.
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: ""
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
size: 8Gi
|
||||
```
|
||||
helm upgrade superset-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
-f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
-f manifests/applicationset/superset/0.13.5/superset-db-values.yaml \
|
||||
--install -n superset
|
||||
|
||||
helm upgrade superset ../superset --install -n superset --create-namespace \
|
||||
-f ./custom-values.yaml
|
||||
```
|
||||
- ArgoCD로 배포한다면 `manifests/applicationset/superset/0.13.5/`의 ApplicationSet을 쓴다 —
|
||||
`superset-db`(syncWave 0) → `superset`(syncWave 1) 순서로 자동 배포된다. 자세한 내용은
|
||||
해당 디렉토리의 `README.md` 참고.
|
||||
- custom-values.yaml
|
||||
``` yaml
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
supersetNode:
|
||||
connections:
|
||||
db_host: 'superset-db-rw' # cnpg-cluster 릴리스명이 superset-db일 때의 rw 서비스명
|
||||
db_port: "5432"
|
||||
db_user: superset
|
||||
db_pass: superset # 위 시크릿 생성 시 사용한 password와 동일해야 한다
|
||||
db_name: superset
|
||||
```
|
||||
- 참고: `manifests/applicationset/superset/0.13.5/superset-db-values.yaml`
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -99,11 +99,17 @@ tolerations: []
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "selfsigned-issuer"
|
||||
cert-manager.io/duration: 8760h
|
||||
# airflow와 동일하게 실측된 문제 — ingressClassName 미지정 시 이 클러스터의 apisix가
|
||||
# 아예 인식하지 않아 CLASS: <none>으로 뜨고 접근이 불가능하다. path도 exact "/" 만
|
||||
# 매치되면 superset의 내부 리다이렉트(예: /login/) 이후 전부 404가 나 regex로 바꾼다.
|
||||
ingressClassName: "apisix"
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "selfsigned-issuer"
|
||||
cert-manager.io/duration: 8760h
|
||||
cert-manager.io/renew-before: 720h
|
||||
path: /
|
||||
k8s.apisix.apache.org/use-regex: "true"
|
||||
k8s.apisix.apache.org/ssl-redirect: "true"
|
||||
path: /.*
|
||||
pathType: ImplementationSpecific
|
||||
hosts:
|
||||
- superset.example.org
|
||||
@@ -133,8 +139,11 @@ supersetNode:
|
||||
redis_ssl:
|
||||
enabled: false
|
||||
ssl_cert_reqs: CERT_NONE
|
||||
# You need to change below configuration incase bringing own PostgresSQL instance and also set postgresql.enabled:false
|
||||
db_host: '{{ .Release.Name }}-postgresql'
|
||||
# 내장 bitnami postgresql 서브차트 대신 cnpg-cluster(전용 인스턴스)를 외부 DB로 사용한다.
|
||||
# 사전 배포: helm install superset-db manifests/helm/cnpg-cluster/1.0.0 \
|
||||
# -f manifests/helm/cnpg-cluster/1.0.0/custom-values.yaml \
|
||||
# -f manifests/applicationset/superset/0.13.5/superset-db-values.yaml -n <ns>
|
||||
db_host: 'superset-db-rw'
|
||||
db_port: "5432"
|
||||
db_user: superset
|
||||
db_pass: superset
|
||||
@@ -160,23 +169,7 @@ supersetCeleryFlower:
|
||||
resources: {}
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: superset
|
||||
password: superset
|
||||
database: superset
|
||||
image:
|
||||
registry: docker.io
|
||||
primary:
|
||||
resources:
|
||||
limits: {}
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: ""
|
||||
size: 8Gi
|
||||
enabled: false
|
||||
|
||||
redis:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user