Skip to content

Commit

Permalink
Fix mlflow health endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Burak Ince <burak.ince@linux.org.tr>
  • Loading branch information
burakince committed Jan 17, 2025
1 parent de635a0 commit dfe7310
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions charts/mlflow/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.11.0
version: 0.12.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
Expand Down Expand Up @@ -58,7 +58,7 @@ annotations:
url: https://github.com/burakince/mlflow
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: |
- Fix wrong mounth and auth config path definition
- Fix health endpoint
artifacthub.io/images: |
- name: mlflow
image: burakince/mlflow:2.19.0
Expand Down
2 changes: 1 addition & 1 deletion charts/mlflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A Helm chart for Mlflow open source platform for the machine learning lifecycle

![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)
![Version: 0.12.0](https://img.shields.io/badge/Version-0.12.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

Expand Down
5 changes: 5 additions & 0 deletions charts/mlflow/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "mlflow.health" -}}
{{- $basPath := default "/" .Values.extraArgs.staticPrefix }}
{{- printf "%s/health" ($basPath | trimSuffix "/" )}}
{{- end }}
4 changes: 2 additions & 2 deletions charts/mlflow/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ spec:
protocol: TCP
livenessProbe:
httpGet:
path: {{ .Values.extraArgs.staticPrefix | default "/" }}
path: {{ include "mlflow.health" . }}
port: {{ .Values.service.name }}
{{- with .Values.livenessProbe }}
{{- toYaml . | nindent 12 }}
{{- end }}
readinessProbe:
httpGet:
path: {{ .Values.extraArgs.staticPrefix | default "/" }}
path: {{ include "mlflow.health" . }}
port: {{ .Values.service.name }}
{{- with .Values.readinessProbe }}
{{- toYaml . | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ should match snapshot of default values:
livenessProbe:
failureThreshold: 5
httpGet:
path: /
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 30
Expand All @@ -66,7 +66,7 @@ should match snapshot of default values:
readinessProbe:
failureThreshold: 5
httpGet:
path: /
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 30
Expand Down Expand Up @@ -153,7 +153,7 @@ should match snapshot with additional values:
livenessProbe:
failureThreshold: 5
httpGet:
path: /
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 30
Expand All @@ -166,7 +166,7 @@ should match snapshot with additional values:
readinessProbe:
failureThreshold: 5
httpGet:
path: /
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 30
Expand Down
4 changes: 2 additions & 2 deletions charts/mlflow/unittests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].livenessProbe.httpGet.path
value: /mlflow
value: /mlflow/health
- equal:
path: spec.template.spec.containers[0].readinessProbe.httpGet.path
value: /mlflow
value: /mlflow/health

- it: should check that the db checker init container is present if enabled with postgres
set:
Expand Down

0 comments on commit dfe7310

Please sign in to comment.