From 02ce0c47f48fa9cd86dbc8266457f75e982ba147 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Wed, 27 Dec 2023 19:49:51 -0500 Subject: [PATCH] let ingress be enabled by default --- kubernetes/helm/templates/webui-ingress.yaml | 9 ++++++--- kubernetes/helm/values.yaml | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kubernetes/helm/templates/webui-ingress.yaml b/kubernetes/helm/templates/webui-ingress.yaml index 3970825d1..84f819f37 100644 --- a/kubernetes/helm/templates/webui-ingress.yaml +++ b/kubernetes/helm/templates/webui-ingress.yaml @@ -1,11 +1,13 @@ +{{- if .Values.webui.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ollama-webui-ingress namespace: {{ .Values.namespace }} - #annotations: - # Use appropriate annotations for your Ingress controller, e.g., for NGINX: - # nginx.ingress.kubernetes.io/rewrite-target: / +{{- if .Values.webui.ingress.annotations }} + annotations: +{{ toYaml .Values.webui.ingress.annotations | trimSuffix "\n" | indent 4 }} +{{- end }} spec: rules: - host: {{ .Values.webui.ingress.host }} @@ -18,3 +20,4 @@ spec: name: ollama-webui-service port: number: {{ .Values.webui.servicePort }} +{{- end }} diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index bfdf15257..f115f82fe 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -20,4 +20,8 @@ webui: cpu: "500m" memory: "500Mi" ingress: + enabled: true + annotations: + # Use appropriate annotations for your Ingress controller, e.g., for NGINX: + # nginx.ingress.kubernetes.io/rewrite-target: / host: ollama.minikube.local