1084713614
flowise/6.0.0 의 dip-values.yaml + dip-questions.yaml 스키마를 airflow 에 적용했다.
doc1 은 cnpg-cluster(airflow-db), doc2 는 airflow 본체다.
dip-values.yaml
- bootstrap.initdb 의 database/owner 는 airflow-db-values.yaml 과 맞춘 airflow.
- databases[] 도 airflow/airflow. 차트 기본값인 appdb/appuser 를 쓰면 appuser
롤이 생성되지 않아 Database CR reconcile 이 실패한다.
- bootstrap.initdb 에는 ensure/reclaimPolicy 를 넣지 않았다. cnpg-cluster 의
cluster.yaml 이 읽지 않는 databases[] 전용 키다.
- postgresql.enabled: false. 내장 bitnami 대신 syncWave 0 의 cnpg 를 쓴다.
- metadataConnection.host 는 "{{ .Name }}-airflow-db-rw". dip 배포는 cnpg
릴리스명에 테넌트 접두사를 붙여 나간다(관측: instance=demo01-air-airflow-db).
flowise 의 externalPostgresql.host 와 같은 규칙이다.
dip-questions.yaml
- git-sync 는 GIT_SYNC_*/GITSYNC_* 네 키를 모두 선언한다. 차트가 네 개를 각각
secretKeyRef 로 잡아서 하나라도 없으면 파드가 기동되지 않는다.
- connection 기본값 호스트는 $CATALOG_NAME-airflow-db-rw.$CATALOG_NAME.
차트가 data.metadataSecretName 의 connection 키를
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN 에 그대로 주입하므로 이 값이 유일한 실효 값이다.
두 파일의 토큰 형식 차이는 의도한 것이다 — dip-questions 는 $CATALOG_NAME,
dip-values 는 {{ .Name }} 가 각 파일의 기존 관례다.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
188 lines
3.9 KiB
YAML
188 lines
3.9 KiB
YAML
instances: 1
|
|
|
|
postgresql:
|
|
imageName: "docker.io/paasup/cnpg-postgresql:18.4-bci15.7-hardened-20260803"
|
|
|
|
parameters:
|
|
max_connections: "200"
|
|
shared_buffers: 256MB
|
|
work_mem: 8MB
|
|
maintenance_work_mem: 128MB
|
|
effective_cache_size: 1GB
|
|
log_timezone: Asia/Seoul
|
|
timezone: Asia/Seoul
|
|
|
|
sharedPreloadLibraries:
|
|
- pgaudit
|
|
- pg_stat_statements
|
|
|
|
primaryUpdateStrategy: unsupervised
|
|
primaryUpdateMethod: switchover
|
|
|
|
storage:
|
|
size: 20Gi
|
|
storageClass: longhorn
|
|
|
|
walStorage:
|
|
enabled: true
|
|
size: 10Gi
|
|
storageClass: longhorn
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 2Gi
|
|
|
|
bootstrap:
|
|
initdb:
|
|
database: airflow
|
|
owner: airflow
|
|
secretName: "$INFISICAL_SECRET"
|
|
encoding: UTF8
|
|
postInitApplicationSQL: []
|
|
|
|
databases:
|
|
- name: airflow
|
|
owner: airflow
|
|
ensure: present
|
|
reclaimPolicy: retain
|
|
extensions:
|
|
- name: pg_stat_statements
|
|
- name: pgaudit
|
|
|
|
enableSuperuserAccess: false
|
|
|
|
affinity:
|
|
enablePodAntiAffinity: true
|
|
podAntiAffinityType: preferred
|
|
topologyKey: kubernetes.io/hostname
|
|
nodeSelector: {}
|
|
tolerations: []
|
|
|
|
monitoring:
|
|
enablePodMonitor: false
|
|
|
|
backup:
|
|
enabled: false
|
|
retentionPolicy: 30d
|
|
barmanObjectStore:
|
|
destinationPath: ""
|
|
endpointURL: ""
|
|
s3Credentials:
|
|
accessKeyId:
|
|
name: ""
|
|
key: ACCESS_KEY_ID
|
|
secretAccessKey:
|
|
name: ""
|
|
key: ACCESS_SECRET_KEY
|
|
|
|
scheduledBackup:
|
|
enabled: false
|
|
schedule: "0 0 2 * * *"
|
|
|
|
pooler:
|
|
enabled: false
|
|
instances: 2
|
|
type: rw
|
|
poolMode: transaction
|
|
---
|
|
ingress:
|
|
web:
|
|
enabled: true
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: "root-ca-issuer"
|
|
cert-manager.io/duration: 8760h
|
|
cert-manager.io/renew-before: 720h
|
|
k8s.apisix.apache.org/plugin-config-name: oidc-keycloak-authz
|
|
ingressClassName: "apisix"
|
|
pathType: "Prefix"
|
|
hosts:
|
|
- name: "{{ .Name }}.{{ .Domain }}"
|
|
tls:
|
|
enabled: true
|
|
secretName: "{{ .Name }}-tls-secret"
|
|
|
|
executor: "KubernetesExecutor"
|
|
|
|
config:
|
|
core:
|
|
executor: KubernetesExecutor
|
|
default_timezone: kst
|
|
logging:
|
|
colored_console_log: "False"
|
|
logging_level: "INFO"
|
|
webserver:
|
|
enable_proxy_fix: "True"
|
|
rbac: "True"
|
|
default_ui_timezone: kst
|
|
|
|
scheduler:
|
|
replicas: 1
|
|
|
|
dags:
|
|
persistence:
|
|
enabled: true
|
|
size: 5Gi
|
|
storageClassName: longhorn
|
|
accessMode: ReadWriteMany
|
|
gitSync:
|
|
enabled: true
|
|
repo: "$dags.gitSync.repo"
|
|
branch: master
|
|
rev: HEAD
|
|
depth: 1
|
|
subPath: ""
|
|
credentialsSecret: "$INFISICAL_SECRET"
|
|
env:
|
|
- name: GIT_SSL_NO_VERIFY
|
|
value: "true"
|
|
|
|
webserver:
|
|
defaultUser:
|
|
enabled: true
|
|
password: "$webserver.defaultUser.password"
|
|
livenessProbe:
|
|
initialDelaySeconds: 120
|
|
readinessProbe:
|
|
initialDelaySeconds: 120
|
|
startupProbe:
|
|
initialDelaySeconds: 30
|
|
webserverConfig: |
|
|
AUTH_ROLE_PUBLIC = 'User'
|
|
|
|
logs:
|
|
persistence:
|
|
enabled: true
|
|
size: 5Gi
|
|
storageClassName: longhorn
|
|
|
|
statsd:
|
|
enabled: false
|
|
|
|
# 내장 bitnami postgresql 서브차트 대신 syncWave 0 의 cnpg-cluster(airflow-db)를 쓴다.
|
|
postgresql:
|
|
enabled: false
|
|
|
|
migrateDatabaseJob:
|
|
useHelmHooks: false
|
|
|
|
data:
|
|
# 시크릿의 connection 키(전체 DSN)를 그대로 쓴다 — 이 값이 설정되면 차트는
|
|
# <release>-metadata 시크릿을 만들지 않는다.
|
|
metadataSecretName: "$INFISICAL_SECRET"
|
|
# metadataSecretName 이 있으면 접속에는 쓰이지 않지만, pgbouncer/keda 경로와
|
|
# NOTES 출력이 참조하므로 cnpg 서비스에 맞춰 둔다.
|
|
# 호스트 접두사는 flowise/6.0.0/dip-values.yaml 의 externalPostgresql.host 와 같은 규칙이다
|
|
# — dip 배포에서 cnpg 릴리스명이 테넌트 접두사를 달고 나가므로 {{ .Name }} 가 필요하다.
|
|
metadataConnection:
|
|
user: airflow
|
|
protocol: postgresql
|
|
host: "{{ .Name }}-airflow-db-rw"
|
|
port: 5432
|
|
db: airflow
|
|
sslmode: disable
|
|
|