From fdd511962e16dd93f47d77c4c3b79a42a94cede8 Mon Sep 17 00:00:00 2001 From: Mike Shade Date: Thu, 7 Sep 2023 11:27:58 -0400 Subject: [PATCH] :pencil: simplify the port forward command in NOTES --- chart/kronic/templates/NOTES.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chart/kronic/templates/NOTES.txt b/chart/kronic/templates/NOTES.txt index 659ceda..a51cf24 100644 --- a/chart/kronic/templates/NOTES.txt +++ b/chart/kronic/templates/NOTES.txt @@ -16,10 +16,8 @@ Thanks for using Kronic! export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kronic.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 "kronic.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT + kubectl --namespace {{ .Release.Namespace }} port-forward deployment/{{ include "kronic.fullname" . }} 8000:8000 + echo "Visit http://127.0.0.1:8000 to use Kronic" {{- end }} Submit issues or feedback at: https://github.com/mshade/kronic/issues