From cdeddbc4e91ca8172be639c493ae586c5ec3fc1a Mon Sep 17 00:00:00 2001 From: Joao Morais Date: Wed, 12 Jun 2024 16:19:59 -0300 Subject: [PATCH] fix install output message --- haproxy-ingress/templates/NOTES.txt | 4 ++-- haproxy-ingress/templates/_helpers.tpl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/haproxy-ingress/templates/NOTES.txt b/haproxy-ingress/templates/NOTES.txt index f7c96d6..d2f8a24 100644 --- a/haproxy-ingress/templates/NOTES.txt +++ b/haproxy-ingress/templates/NOTES.txt @@ -7,7 +7,7 @@ Get the application URL by running these commands: export HTTP_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[0].nodePort}" {{ include "haproxy-ingress.fullname" . }}) export HTTPS_NODE_PORT=$(kubectl --namespace {{ .Release.Namespace }} get services -o jsonpath="{.spec.ports[1].nodePort}" {{ include "haproxy-ingress.fullname" . }}) - export NODE_IP=$(kubectl --namespace {{ .Release.Namespace }} get nodes -o jsonpath="{.items[0].status.addresses[1].address}") + export NODE_IP=$(kubectl --namespace {{ .Release.Namespace }} get nodes -o jsonpath="{.items[0].status.addresses[0].address}") echo "Visit http://$NODE_IP:$HTTP_NODE_PORT to access your application via HTTP." echo "Visit https://$NODE_IP:$HTTPS_NODE_PORT to access your application via HTTPS." @@ -25,7 +25,7 @@ You can watch the status by running: HAProxy is exposed as a `ClusterIP` type service. Get the application URL by running these commands: - export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app={{ include "haproxy-ingress.name" . }},component={{ .Values.controller.name }},release={{ .Release.Name }}") + export POD_NAME=$(kubectl --namespace {{ .Release.Namespace }} get pods -o jsonpath="{.items[0].metadata.name}" -l "app.kubernetes.io/name={{ include "haproxy-ingress.name" . }},app.kubernetes.io/instance={{ .Release.Name }}") kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 echo "Visit http://127.0.0.1:8080 to access your application." diff --git a/haproxy-ingress/templates/_helpers.tpl b/haproxy-ingress/templates/_helpers.tpl index 32cdbf1..1a40ab8 100644 --- a/haproxy-ingress/templates/_helpers.tpl +++ b/haproxy-ingress/templates/_helpers.tpl @@ -59,6 +59,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }} +{{/* need to update NOTES.txt whenever update these labels */}} {{- define "haproxy-ingress.selectorLabels" -}} app.kubernetes.io/name: {{ include "haproxy-ingress.name" . }} app.kubernetes.io/instance: {{ .Release.Name }}