Merge remote-tracking branch with mlflow 1.9.0 README conflict resolved

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wbsong111
2026-04-27 10:44:11 +09:00
22 changed files with 424 additions and 98 deletions
+85 -36
View File
@@ -1,6 +1,7 @@
# MLflow 배포 (OIDC Auth + Multi-Tenant Workspace)
MLflow 3.11.1 + mlflow-oidc-auth v7.0.3을 Keycloak과 연동하고, 팀별 workspace로 멀티테넌시를 구성하는 가이드이다.
커스텀 이미지 `paasup/mlflow:v3.11.1-oidc`에 OIDC 플러그인이 포함되어 있다.
---
@@ -139,7 +140,24 @@ helm upgrade mlflow manifests/helm/mlflow/1.9.0/ \
## 3. custom-values.yaml 설명
### 3.1 OIDC 환경변수
### 3.1 이미지 설정
OIDC 플러그인이 포함된 커스텀 이미지를 사용한다.
```yaml
image:
repository: paasup/mlflow
tag: "v3.11.1-oidc"
initImages:
mlflowDbMigration:
repository: paasup/mlflow
tag: "v3.11.1-oidc"
```
---
### 3.2 OIDC 환경변수
```yaml
extraEnvVars:
@@ -168,7 +186,7 @@ extraEnvVars:
---
### 3.2 Multi-Tenant Workspace 환경변수
### 3.3 Multi-Tenant Workspace 환경변수
```yaml
extraEnvVars:
@@ -207,7 +225,7 @@ extraEnvVars:
---
### 3.3 OIDC App 활성화
### 3.4 OIDC App 활성화
```yaml
extraArgs:
@@ -224,7 +242,7 @@ auth:
---
### 3.4 Secret 참조
### 3.5 Secret 참조
```yaml
extraSecretNamesForEnvFrom:
@@ -233,7 +251,7 @@ extraSecretNamesForEnvFrom:
---
### 3.5 볼륨 마운트
### 3.6 볼륨 마운트
```yaml
extraVolumes:
@@ -255,43 +273,25 @@ extraVolumeMounts:
---
### 3.6 PostgreSQL 설정
### 3.7 OIDC Auth Middleware 패치
`mlflow-oidc-auth` 플러그인의 `auth_middleware.py`를 차트에 포함된 버전으로 교체한다.
워크스페이스 지원(`x-mlflow-workspace` 헤더 처리) 등 업스트림 수정 사항을 반영한다.
```yaml
postgresql:
oidcAuthPatch:
enabled: true
auth:
username: mlflow
password: mlflow1234 # 변경 권장
database: mlflow
image:
repository: bitnamilegacy/postgresql
primary:
persistence:
enabled: true
mountPath: "/usr/local/lib/python3.11/site-packages/mlflow_oidc_auth/middleware/auth_middleware.py"
```
`OIDC_USERS_DB_URI`도 동일한 접속 정보를 사용한다.
파일 소스: `files/auth_middleware.py`
---
### 3.7 S3 (MinIO) 설정
```yaml
artifactRoot:
proxiedArtifactStorage: true
defaultArtifactsDestination: "s3://mlflow/artifacts"
s3:
enabled: true
bucket: mlflow
path: artifacts
awsAccessKeyId: "adminuser"
awsSecretAccessKey: "adminuser"
extraEnvVars:
MLFLOW_S3_ENDPOINT_URL: "http://minio.minio.svc.cluster.local:9000"
MLFLOW_S3_IGNORE_TLS: "true"
```
> **Python 버전 확인**: 컨테이너 이미지의 Python 버전이 다를 경우 `mountPath`를 수정한다.
>
> ```sh
> kubectl exec -n mlflow <pod> -- python -c \
> "import mlflow_oidc_auth.middleware.auth_middleware as m; print(m.__file__)"
> ```
---
@@ -320,6 +320,55 @@ ingress:
---
### 3.9 PostgreSQL 설정
내장 PostgreSQL을 사용한다.
```yaml
postgresql:
enabled: true
auth:
username: mlflow
password: mlflow1234 # 변경 권장
database: mlflow
image:
repository: bitnamilegacy/postgresql
primary:
persistence:
enabled: true
```
`OIDC_USERS_DB_URI`도 동일한 접속 정보를 사용한다.
```yaml
extraEnvVars:
OIDC_USERS_DB_URI: "postgresql://mlflow:mlflow1234@mlflow-postgresql:5432/mlflow"
```
---
### 3.10 S3 (MinIO) 설정
```yaml
artifactRoot:
proxiedArtifactStorage: true
defaultArtifactsDestination: "s3://mlflow/artifacts"
s3:
enabled: true
bucket: mlflow
path: artifacts
awsAccessKeyId: "adminuser" # MinIO access key
awsSecretAccessKey: "adminuser" # MinIO secret key
extraEnvVars:
MLFLOW_S3_ENDPOINT_URL: "http://minio.minio.svc.cluster.local:9000"
MLFLOW_S3_IGNORE_TLS: "true"
```
외부 MinIO 사용 시 `MLFLOW_S3_ENDPOINT_URL`을 해당 엔드포인트로 변경한다.
---
## 4. 배포 검증
### 4.1 OIDC 인증 검증