From c9d3e69b24b851dd54dfd436ed41e995082f3dc6 Mon Sep 17 00:00:00 2001 From: ihiverlet <94982379+ihiverlet@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:58:18 +0100 Subject: [PATCH] get independent targetPort value from port value in service (#123) --- charts/library-chart/Chart.yaml | 2 +- charts/library-chart/templates/_service.tpl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/library-chart/Chart.yaml b/charts/library-chart/Chart.yaml index 3704f2a9..baf414e6 100644 --- a/charts/library-chart/Chart.yaml +++ b/charts/library-chart/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: library-chart -version: 1.5.19 +version: 1.5.20 type: library diff --git a/charts/library-chart/templates/_service.tpl b/charts/library-chart/templates/_service.tpl index 373d7c6a..c9c540cf 100644 --- a/charts/library-chart/templates/_service.tpl +++ b/charts/library-chart/templates/_service.tpl @@ -15,23 +15,27 @@ spec: {{- end }} ports: - port: {{ .Values.networking.service.port }} - targetPort: {{ .Values.networking.service.port }} + targetPort: {{ default .Values.networking.service.port .Values.networking.service.targetPort }} protocol: TCP name: main + {{ if .Values.networking.user }} {{ if .Values.networking.user.enabled }} - port: {{ .Values.networking.user.port }} targetPort: {{ .Values.networking.user.port }} protocol: TCP name: user {{- end }} + {{- end }} {{ if .Values.spark }} {{ if .Values.spark.sparkui }} + {{ if .Values.networking.sparkui }} - port: {{ .Values.networking.sparkui.port }} targetPort: {{ .Values.networking.sparkui.port }} protocol: TCP name: sparkui {{- end }} {{- end }} + {{- end }} selector: {{- include "library-chart.selectorLabels" . | nindent 4 }} {{- end }}