Files
service-catalog/manifests/applicationset/airflow/1.16.0/dip-values.yaml
T
wbsong111 a8530d3968 airflow: OIDC 인증 제외 경로 Ingress 추가 (#24)
세션이 없는 상태로 접속하면 Airflow UI 한 페이지가 /static 자원을 수십 개
동시에 요청하고, 각 요청이 저마다 APISIX openid-connect 로그인 플로우를
시작한다. 세션은 state를 하나만 보관하므로 콜백이 동시에 돌아오면 마지막
하나를 뺀 전부가 state 검증에 실패해 500이 난다.

templates/webserver/webserver-ingress-static.yaml 은 업스트림 Apache Airflow
차트에 없는 PaaSup 추가 템플릿이다. dip.unauthenticatedPaths 가 있을 때만
애노테이션 없는 Ingress를 하나 더 렌더해 해당 경로를 인증 없이 통과시킨다.
애노테이션을 전부 비우는 것은 의도된 것으로, plugin-config-name 을 빼는 게
목적이고 cert-manager.io/* 까지 빼는 이유는 웹 Ingress와 같은 TLS Secret 을
두고 Certificate 를 중복 생성하지 않게 하기 위해서다.

값을 ingress.web 아래가 아니라 dip 아래에 두는 이유는 values.schema.json 의
ingress.web 이 additionalProperties: false 라 그 아래 새 키를 넣으면 스키마
검증에서 배포가 실패하기 때문이다. qdrant·litellm 의 dip.mainPath 와 같은
자리를 쓴다.

webserver-ingress.yaml 과 동일한 조건으로 렌더하므로 Airflow 3.0
(webserver → api-server) 전환 시 함께 재작업이 필요하다. 업스트림 파일은
수정하지 않았고 fork 델타는 신규 템플릿 1개뿐이다.

이슈 #24 는 dip-console 이 차트 밖에서 생성하는 방안(B안)을 권고했으나,
실제로 증상이 재현되는 서비스가 airflow 하나로 좁혀져 차트 템플릿(A안)으로
갔다. dip-console 로 옮길 때는 dip.unauthenticatedPaths 를 비우면 된다.

redirect_uri 고정은 여전히 dip-console 몫으로 남는다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 11:19:01 +09:00

202 lines
4.7 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"
# OIDC 인증에서 제외할 경로. 위 plugin-config-name(oidc-keycloak-authz)이 걸린 웹 Ingress와
# 별개로, 애노테이션 없는 Ingress를 하나 더 만들어 이 경로들을 인증 없이 통과시킨다
# (templates/webserver/webserver-ingress-static.yaml — PaaSup 추가 템플릿).
#
# 세션이 없을 때 /static 자원 수십 개가 동시에 OIDC 로그인 플로우를 시작하면서 state가
# 서로 덮어써져 500이 나는 문제를 막는다 (paasup/dip-catalog#24).
# Airflow의 /static은 공개 CSS/JS라 인증 제외에 보안상 문제가 없다.
#
# 비우면(또는 키를 지우면) 이 Ingress는 렌더되지 않는다 — 향후 dip-console이 같은
# 리소스를 차트 밖에서 생성하게 되면 여기를 비워서 중복을 없앤다.
dip:
unauthenticatedPaths:
- /static
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