From 2912391830e9a6516eaa69afc6aa2b66d14a5086 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Sun, 28 Apr 2024 12:54:37 +0000 Subject: [PATCH] Fix the service name --- templates/NOTES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/NOTES.txt b/templates/NOTES.txt index 8ba32d6..80022d3 100644 --- a/templates/NOTES.txt +++ b/templates/NOTES.txt @@ -6,13 +6,13 @@ {{- end }} {{- end }} {{- else if contains "NodePort" .Values.ui.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ollama.fullname" . }}-webui) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ (printf "%s-webui" (include "ollama.fullname" .)) }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.ui.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "ollama.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ollama.fullname" . }}-webui --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ (printf "%s-webui" (include "ollama.fullname" .)) }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.ui.service.port }} {{- else if contains "ClusterIP" .Values.ui.service.type }} echo "Visit http://127.0.0.1:8080 to access Ollama WebUI."