From de635a086ae83ea8942a1d738ebe91796eb02b4d Mon Sep 17 00:00:00 2001 From: Burak Ince Date: Fri, 17 Jan 2025 08:50:49 +0100 Subject: [PATCH] Fix wrong mounth and auth config path definition Signed-off-by: Burak Ince --- charts/mlflow/Chart.yaml | 4 ++-- charts/mlflow/README.md | 6 +++--- charts/mlflow/templates/deployment.yaml | 4 ++-- .../mlflow/unittests/__snapshot__/deployment_test.yaml.snap | 4 ++-- charts/mlflow/unittests/deployment_test.yaml | 6 +++--- charts/mlflow/values.yaml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/charts/mlflow/Chart.yaml b/charts/mlflow/Chart.yaml index 71c83b8..735dd0c 100644 --- a/charts/mlflow/Chart.yaml +++ b/charts/mlflow/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.0 +version: 0.11.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to @@ -58,7 +58,7 @@ annotations: url: https://github.com/burakince/mlflow artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/changes: | - - Fix wrong volume setting from secret + - Fix wrong mounth and auth config path definition artifacthub.io/images: | - name: mlflow image: burakince/mlflow:2.19.0 diff --git a/charts/mlflow/README.md b/charts/mlflow/README.md index 0bb4d9f..613d0a5 100644 --- a/charts/mlflow/README.md +++ b/charts/mlflow/README.md @@ -4,7 +4,7 @@ A Helm chart for Mlflow open source platform for the machine learning lifecycle -![Version: 0.10.0](https://img.shields.io/badge/Version-0.10.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.19.0](https://img.shields.io/badge/AppVersion-2.19.0-informational?style=flat-square) +![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.19.0](https://img.shields.io/badge/AppVersion-2.19.0-informational?style=flat-square) ## Get Helm Repository Info @@ -281,12 +281,12 @@ helm upgrade [RELEASE_NAME] community-charts/mlflow | artifactRoot.s3.bucket | string | `""` | S3 bucket name | | artifactRoot.s3.enabled | bool | `false` | Specifies if you want to use AWS S3 Mlflow Artifact Root | | artifactRoot.s3.path | string | `""` | S3 bucket folder. If you want to use root level, please don't set anything. | -| auth | object | `{"adminPassword":"","adminUsername":"","appName":"basic-auth","authorizationFunction":"mlflow.server.auth:authenticate_request_basic_auth","configPath":"/etc/mlflow/auth.ini","defaultPermission":"READ","enabled":false,"postgres":{"database":"","driver":"","enabled":false,"host":"","password":"","port":5432,"user":""},"sqliteFile":"basic_auth.db","sqliteFullPath":""}` | Mlflow authentication settings | +| auth | object | `{"adminPassword":"","adminUsername":"","appName":"basic-auth","authorizationFunction":"mlflow.server.auth:authenticate_request_basic_auth","configPath":"/etc/mlflow/auth/","defaultPermission":"READ","enabled":false,"postgres":{"database":"","driver":"","enabled":false,"host":"","password":"","port":5432,"user":""},"sqliteFile":"basic_auth.db","sqliteFullPath":""}` | Mlflow authentication settings | | auth.adminPassword | string | `""` | Mlflow admin user password | | auth.adminUsername | string | `""` | Mlflow admin user username | | auth.appName | string | `"basic-auth"` | Default registered authentication app name. If you want to use your custom authentication function, please look at: https://mlflow.org/docs/latest/auth/index.html#custom-authentication | | auth.authorizationFunction | string | `"mlflow.server.auth:authenticate_request_basic_auth"` | Default authentication function | -| auth.configPath | string | `"/etc/mlflow/auth.ini"` | Mlflow authentication INI configuration file path. | +| auth.configPath | string | `"/etc/mlflow/auth/"` | Mlflow authentication INI configuration file path. | | auth.defaultPermission | string | `"READ"` | Default permission for all users. More details: https://mlflow.org/docs/latest/auth/index.html#permissions | | auth.enabled | bool | `false` | Specifies if you want to enable mlflow authentication | | auth.postgres | object | `{"database":"","driver":"","enabled":false,"host":"","password":"","port":5432,"user":""}` | PostgreSQL based centrilised authentication database | diff --git a/charts/mlflow/templates/deployment.yaml b/charts/mlflow/templates/deployment.yaml index beadeae..0fcab11 100644 --- a/charts/mlflow/templates/deployment.yaml +++ b/charts/mlflow/templates/deployment.yaml @@ -154,7 +154,7 @@ spec: value: {{ .Values.image.tag | default .Chart.AppVersion | quote }} {{- if .Values.auth.enabled }} - name: MLFLOW_AUTH_CONFIG_PATH - value: {{ .Values.auth.configPath | quote }} + value: {{ printf "%s/basic_auth.ini" (.Values.auth.configPath | trimSuffix "/") }} {{- end }} {{- range $key, $value := .Values.extraEnvVars }} - name: {{ upper $key }} @@ -173,7 +173,7 @@ spec: volumeMounts: {{- if .Values.auth.enabled }} - name: auth-config-secret - mountPath: {{ .Values.auth.configPath | quote }} + mountPath: {{ .Values.auth.configPath | trimSuffix "/" | quote }} readOnly: true {{- end }} {{- with .Values.extraVolumeMounts }} diff --git a/charts/mlflow/unittests/__snapshot__/deployment_test.yaml.snap b/charts/mlflow/unittests/__snapshot__/deployment_test.yaml.snap index 973fd4c..cf706e4 100644 --- a/charts/mlflow/unittests/__snapshot__/deployment_test.yaml.snap +++ b/charts/mlflow/unittests/__snapshot__/deployment_test.yaml.snap @@ -142,7 +142,7 @@ should match snapshot with additional values: - name: MLFLOW_VERSION value: 1.0.0 - name: MLFLOW_AUTH_CONFIG_PATH - value: /etc/mlflow/auth.ini + value: /etc/mlflow/auth/basic_auth.ini envFrom: - configMapRef: name: mlflow-env-configmap @@ -182,7 +182,7 @@ should match snapshot with additional values: runAsNonRoot: true runAsUser: 1000 volumeMounts: - - mountPath: /etc/mlflow/auth.ini + - mountPath: /etc/mlflow/auth name: auth-config-secret readOnly: true - mountPath: /mlflow/data diff --git a/charts/mlflow/unittests/deployment_test.yaml b/charts/mlflow/unittests/deployment_test.yaml index fc02c47..fc89482 100644 --- a/charts/mlflow/unittests/deployment_test.yaml +++ b/charts/mlflow/unittests/deployment_test.yaml @@ -515,7 +515,7 @@ tests: set: auth.enabled: true auth.appName: my-auth - auth.configPath: /my/special/path/my-config.ini + auth.configPath: /my/special/path/ release: name: mlflow namespace: mlflow @@ -531,10 +531,10 @@ tests: value: MLFLOW_AUTH_CONFIG_PATH - equal: path: spec.template.spec.containers[0].env[1].value - value: /my/special/path/my-config.ini + value: /my/special/path/basic_auth.ini - equal: path: spec.template.spec.containers[0].volumeMounts[0].mountPath - value: /my/special/path/my-config.ini + value: /my/special/path - equal: path: spec.template.spec.containers[0].volumeMounts[0].name value: auth-config-secret diff --git a/charts/mlflow/values.yaml b/charts/mlflow/values.yaml index cbe01d5..45452ea 100644 --- a/charts/mlflow/values.yaml +++ b/charts/mlflow/values.yaml @@ -170,7 +170,7 @@ auth: # -- SQLite database folder. Default is user home directory. sqliteFullPath: "" # -- Mlflow authentication INI configuration file path. - configPath: "/etc/mlflow/auth.ini" + configPath: "/etc/mlflow/auth/" # -- PostgreSQL based centrilised authentication database postgres: # -- Specifies if you want to use postgres auth backend storage