From 3df75ec1d908f3c36da1b0e0c2c825eba6ffadac Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Fri, 19 Apr 2019 19:33:05 -0400 Subject: [PATCH] Improve getting LoadBalancer address in NOTES.txt See https://github.com/helm/charts/issues/84 Signed-off-by: Scott Rigby --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..736dc31b3 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -256,7 +256,7 @@ const defaultNotes = `1. Get the application URL by running these commands: {{- else if contains "LoadBalancer" .Values.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 ".fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")