[bitnami/mlflow] Add support for Gateway API HTTPRoutes to MLflow chart (#36555)

* add support for gateway api httproutes

Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>

* Update bitnami/mlflow/values.yaml

Co-authored-by: David Gomez <david.gomez@broadcom.com>
Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>

* Update bitnami/mlflow/templates/tracking/httproute.yaml

Co-authored-by: David Gomez <david.gomez@broadcom.com>
Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>

* Update bitnami/mlflow/templates/NOTES.txt

Co-authored-by: David Gomez <david.gomez@broadcom.com>
Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>

* fix filters typo in mlflow httproute

Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>

* re-instate the else if clause in notes.txt

Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>

---------

Signed-off-by: Jana Awada <jana.awada@scilifelab.uu.se>
Co-authored-by: David Gomez <david.gomez@broadcom.com>
This commit is contained in:
Jana Awada
2026-06-23 13:28:26 +02:00
committed by GitHub
co-authored by David Gomez
parent 935cef053b
commit 491442d889
6 changed files with 2279 additions and 2130 deletions
+1 -1
View File
@@ -46,4 +46,4 @@ sources:
- https://github.com/bitnami/charts/tree/main/bitnami/mlflow
- https://github.com/bitnami/containers/tree/main/bitnami/mlflow
- https://github.com/mlflow/mlflow
version: 5.2.1
version: 5.3.0
+7
View File
@@ -278,6 +278,13 @@ To back up and restore Helm chart deployments on Kubernetes, you need to back up
| `tracking.ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
| `tracking.ingress.secrets` | Custom TLS certificates as secrets | `[]` |
| `tracking.ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
| `tracking.httproute.enabled` | Enable Gateway API HTTPRoute record generation for mlflow tracking | `false` |
| `tracking.httproute.hostname` | Default hostname for the HTTPRoute | `mlflow.local` |
| `tracking.httproute.path` | Default path for the HTTPRoute | `/` |
| `tracking.httproute.annotations` | Additional annotations for the HTTPRoute resource | `{}` |
| `tracking.httproute.parentRefs` | List of Gateway parentRefs the HTTPRoute should attach to | `[]` |
| `tracking.httproute.extraHostnames` | An array with additional hostnames to be covered with the HTTPRoute | `[]` |
| `tracking.httproute.extraRules` | Additional rules to be added to the HTTPRoute | `[]` |
| `tracking.networkPolicy.enabled` | Enable creation of NetworkPolicy resources | `true` |
| `tracking.networkPolicy.allowExternal` | The Policy model to apply | `true` |
| `tracking.networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
+11 -1
View File
@@ -57,7 +57,17 @@ MLflow Tracking Server can be accessed through the following DNS name from withi
To access your MLflow site from outside the cluster follow the steps below:
{{- if .Values.tracking.ingress.enabled }}
{{- if .Values.tracking.httproute.enabled }}
1. Get the MLflow URL and associate its hostname to your Gateway's external IP:
GATEWAY_NAME=$(kubectl get --namespace {{ include "common.names.namespace" . }} httproute {{ include "mlflow.v0.tracking.fullname" . }} -o jsonpath="{.spec.parentRefs[0].name}")
GATEWAY_NAMESPACE=$(kubectl get --namespace {{ include "common.names.namespace" . }} httproute {{ include "mlflow.v0.tracking.fullname" . }} -o jsonpath="{.spec.parentRefs[0].namespace}")
GATEWAY_IP=$(kubectl get gateway --namespace $GATEWAY_NAMESPACE $GATEWAY_NAME -o jsonpath="{.status.addresses[0].value}")
echo "MLflow URL: https://{{ .Values.tracking.httproute.hostnames | first }}"
echo "$GATEWAY_IP {{ .Values.tracking.httproute.hostnames | first }}" | sudo tee -a /etc/hosts
{{- else if .Values.tracking.ingress.enabled }}
1. Get the MLflow URL and associate MLflow hostname to your cluster external IP:
@@ -0,0 +1,43 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.tracking.enabled .Values.tracking.httproute.enabled }}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ template "mlflow.v0.tracking.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $labels := include "common.tplvalues.merge" (dict "values" (list .Values.tracking.httproute.labels .Values.commonLabels) "context" .) }}
labels: {{- include "common.labels.standard" (dict "customLabels" $labels "context" .) | nindent 4 }}
app.kubernetes.io/part-of: mlflow
app.kubernetes.io/component: tracking
{{- if or .Values.tracking.httproute.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.tracking.httproute.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" .) | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- if .Values.tracking.httproute.parentRefs }}
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.httproute.parentRefs "context" .) | nindent 4 }}
{{- else }}
- name: gateway
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}
hostnames: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.httproute.hostnames "context" .) | nindent 4 }}
rules:
- backendRefs:
- name: {{ template "mlflow.v0.tracking.fullname" . }}
port: {{ ternary (.Values.tracking.service.ports.https | int) (.Values.tracking.service.ports.http | int) .Values.tracking.tls.enabled }}
weight: 1
{{- if .Values.tracking.httproute.matches }}
matches: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.httproute.matches "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.tracking.httproute.filters }}
filters: {{- include "common.tplvalues.render" (dict "value" .Values.tracking.httproute.filters "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.tracking.httproute.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.tracking.httproute.extraRules "context" .) | nindent 4 }}
{{- end }}
{{- end }}
File diff suppressed because it is too large Load Diff
+46
View File
@@ -655,6 +655,52 @@ tracking:
## name: http
##
extraRules: []
## @section tracking.httproute Gateway API HTTPRoute configuration
## ref: https://gateway-api.sigs.k8s.io/api-types/httproute/
##
httproute:
## @param tracking.httproute.enabled Enable HTTPRoute generation for MLflow tracking
##
enabled: false
## @param tracking.httproute.annotations Additional annotations for the HTTPRoute resource
##
annotations: {}
## @param tracking.httproute.labels Additional labels for the HTTPRoute resource
##
labels: {}
## @param tracking.httproute.parentRefs Gateways the HTTPRoute is attached to. If unspecified, it'll be attached to Gateway named 'gateway' in the same namespace.
## e.g:
## parentRefs:
## - name: my-gateway
## sectionName: http
## namespace: default
##
parentRefs: []
## @param tracking.httproute.hostnames [array] List of hostnames matching HTTP header
##
hostnames:
- mlflow.local
## @param tracking.httproute.matches [array] List of match rules applied to the HTTPRoute for the default svc backend reference
##
matches:
- path:
type: PathPrefix
value: /
## @param tracking.httproute.filters List of filter rules applied to the HTTPRoute for the default svc backend reference
##
filters: []
## @param tracking.httproute.extraRules List of extra rules applied to the HTTPRoute
## e.g:
## extraRules:
## - matches:
## - path:
## type: PathPrefix
## value: /api
## backendRefs:
## - name: mlflow-tracking
## port: 5000
##
extraRules: []
## Network Policy configuration
## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##