From 705484ce85cf4bfa4b0d8114efcbf8afe7c686f5 Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Thu, 13 Mar 2025 10:27:14 +0300 Subject: [PATCH 1/3] fix: make open ports optional --- ingress/templates/service.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ingress/templates/service.yaml b/ingress/templates/service.yaml index ea17ac2..6dab197 100644 --- a/ingress/templates/service.yaml +++ b/ingress/templates/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.serviceEnabled }} apiVersion: v1 kind: Service metadata: @@ -20,3 +21,4 @@ spec: selector: {{- include "ingress.selectorLabels" . | nindent 4 }} +{{- end }} From e9c25858217bd356b36b52bdcae0f52d15a992ae Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Fri, 14 Mar 2025 07:51:02 +0300 Subject: [PATCH 2/3] fix: prefer annotations --- ingress/templates/service.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ingress/templates/service.yaml b/ingress/templates/service.yaml index 6dab197..9c9a2fb 100644 --- a/ingress/templates/service.yaml +++ b/ingress/templates/service.yaml @@ -1,9 +1,12 @@ -{{- if .Values.serviceEnabled }} apiVersion: v1 kind: Service metadata: name: {{ include "ingress.fullname" . }} labels: {{- include "ingress.labels" . | nindent 4 }} + {{- with .Values.loadBalancerAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ default "LoadBalancer" .Values.ingress.serviceType }} ports: @@ -21,4 +24,3 @@ spec: selector: {{- include "ingress.selectorLabels" . | nindent 4 }} -{{- end }} From f381cbf57e14bb64e09c72ee161c8a166b66146f Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:20:49 +0300 Subject: [PATCH 3/3] refactor: better `annotations` variable placement --- ingress/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingress/templates/service.yaml b/ingress/templates/service.yaml index 9c9a2fb..275a201 100644 --- a/ingress/templates/service.yaml +++ b/ingress/templates/service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: name: {{ include "ingress.fullname" . }} labels: {{- include "ingress.labels" . | nindent 4 }} - {{- with .Values.loadBalancerAnnotations }} + {{- with .Values.loadBalancer.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }}