From 9b06ea0f0e1eb6d2f0ab334cc7f96a46f8d59a0f Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Fri, 8 Dec 2023 18:37:17 +0200 Subject: [PATCH] fixup --- library/common-test/tests/chartContext/portal_test.yaml | 2 +- library/common/templates/lib/util/_chartcontext.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/common-test/tests/chartContext/portal_test.yaml b/library/common-test/tests/chartContext/portal_test.yaml index d6f28c29..69fcfea2 100644 --- a/library/common-test/tests/chartContext/portal_test.yaml +++ b/library/common-test/tests/chartContext/portal_test.yaml @@ -725,7 +725,7 @@ tests: my-other-service: enabled: true ports: - my-port: + my-port1: enabled: true port: 123457 my-port2: diff --git a/library/common/templates/lib/util/_chartcontext.tpl b/library/common/templates/lib/util/_chartcontext.tpl index df519d06..63a96aa8 100644 --- a/library/common/templates/lib/util/_chartcontext.tpl +++ b/library/common/templates/lib/util/_chartcontext.tpl @@ -132,7 +132,7 @@ {{- end -}} {{- if not $selectedPort -}} - {{- $portName := ($selectedService.ports | keys | mustFirst) -}} + {{- $portName := ($selectedService.ports | keys | sortAlpha | mustFirst) -}} {{- $selectedPort = (get $selectedService.ports $portName) -}} {{- end -}}