From 2082d67ec82b5e1fc2a4bb322564ae0a0a379e56 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Wed, 23 Sep 2020 04:28:56 +0000 Subject: [PATCH] utilize service for port forwarding in instructions (#22) Merge branch 'master' into techknowlogick-patch-1 Merge branch 'master' into techknowlogick-patch-1 utilize service for port forwarding in instructions Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/22 Reviewed-by: luhahn Reviewed-by: Lunny Xiao --- templates/NOTES.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/NOTES.txt b/templates/NOTES.txt index 289e007..8ed67dd 100644 --- a/templates/NOTES.txt +++ b/templates/NOTES.txt @@ -13,7 +13,6 @@ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "gitea.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.http.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "gitea.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:{{ .Values.service.http.port }} to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME {{ .Values.service.http.port }}:{{ .Values.service.http.port }} + kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-http {{ .Values.service.http.port }}:{{ .Values.service.http.port }} {{- end }}