From bf55d8b8de33b86d68a2e7c00b187347ba65c2de Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Fri, 25 Nov 2022 18:30:47 +0200 Subject: [PATCH] fix identation --- .../common/1.0.0/templates/class/_service.tpl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/common/1.0.0/templates/class/_service.tpl b/library/common/1.0.0/templates/class/_service.tpl index 72e4022610..f72db4b3ec 100644 --- a/library/common/1.0.0/templates/class/_service.tpl +++ b/library/common/1.0.0/templates/class/_service.tpl @@ -110,7 +110,7 @@ spec: {{- end }} {{- end -}} {{- end }} -ports: + ports: {{- range $name, $port := $svcValues.ports }} {{- if $port.enabled }} {{- $protocol := "TCP" -}} {{/* Default to TCP if no protocol is specified */}} @@ -121,20 +121,20 @@ ports: {{- $protocol = . -}} {{- end -}} {{- end }} - - port: {{ $port.port }} - name: {{ $name }} - protocol: {{ $protocol }} - targetPort: {{ $port.targetPort | default $name }} + - port: {{ $port.port }} + name: {{ $name }} + protocol: {{ $protocol }} + targetPort: {{ $port.targetPort | default $name }} {{- if and (eq $svcType "NodePort") $port.nodePort }} - nodePort: {{ $port.nodePort }} + nodePort: {{ $port.nodePort }} {{- end -}} {{- end -}} {{- end -}} {{- if not (has $svcType (list "ExternalName" "ExternalIP")) }} -selector: + selector: {{- with $svcValues.selector -}} {{/* If custom selector defined */}} {{- range $k, $v := . }} - {{ $k }}: {{ tpl $v $root }} + {{ $k }}: {{ tpl $v $root }} {{- end -}} {{- else }} {{/* else use the generated selectors */}} {{- include "ix.v1.common.labels.selectorLabels" $root | nindent 4 }}