From 6f8e675aca933719168ffccb17679d08154ebfd1 Mon Sep 17 00:00:00 2001 From: Trevor Royer Date: Wed, 10 Mar 2021 17:53:21 -0600 Subject: [PATCH] add openshift route --- mlflow/Chart.yaml | 2 +- mlflow/README.md | 1 + mlflow/templates/route.yaml | 21 +++++++++++++++++++++ mlflow/values.yaml | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 mlflow/templates/route.yaml diff --git a/mlflow/Chart.yaml b/mlflow/Chart.yaml index 3cd108c..9ba6a93 100644 --- a/mlflow/Chart.yaml +++ b/mlflow/Chart.yaml @@ -7,5 +7,5 @@ maintainers: - email: contact@larribas.me name: Lorenzo Arribas type: application -version: 1.0.1 +version: 1.0.2 appVersion: 1.7.2 diff --git a/mlflow/README.md b/mlflow/README.md index 3e93281..36e07d0 100644 --- a/mlflow/README.md +++ b/mlflow/README.md @@ -106,6 +106,7 @@ By default, the ingress controller is disabled. You can, however, instruct the C | podSecurityContext | object | `{}` | | | replicaCount | int | `1` | | | resources | object | `{}` | | +| route.enabled | bool | `false` | Creates an OpenShift route object as an alternative to ingress. | | securityContext | object | `{}` | | | service.port | int | `5000` | | | service.type | string | `"NodePort"` | | diff --git a/mlflow/templates/route.yaml b/mlflow/templates/route.yaml new file mode 100644 index 0000000..76487b2 --- /dev/null +++ b/mlflow/templates/route.yaml @@ -0,0 +1,21 @@ +{{- if .Values.route.enabled -}} +kind: Route +apiVersion: route.openshift.io/v1 +metadata: + name: {{ include "mlflow.fullname" . }} + labels: + {{- include "mlflow.selectorLabels" . | nindent 4 }} +spec: + to: + kind: Service + name: {{ include "mlflow.fullname" . }} + weight: 100 + port: + targetPort: http + {{- if .Values.route.tls }} + tls: + termination: {{ .Values.route.tls.termination }} + insecureEdgeTerminationPolicy: {{ .Values.route.tls.insecureEdgeTerminationPolicy }} + {{- end }} + wildcardPolicy: None +{{- end }} diff --git a/mlflow/values.yaml b/mlflow/values.yaml index 757a476..6e9296e 100644 --- a/mlflow/values.yaml +++ b/mlflow/values.yaml @@ -75,6 +75,12 @@ ingress: # hosts: # - chart-example.local +route: + enabled: false + # tls: + # termination: edge + # insecureEdgeTerminationPolicy: Allow + resources: {} # limits: # cpu: 100m