render service only when not in hostnet

This commit is contained in:
Stavros kois
2022-11-15 20:07:49 +02:00
parent 19b575e1ca
commit e28a9d3742

View File

@@ -1,4 +1,3 @@
{{- if not .Values.hostNetwork }}
{{ $selectors := list }}
{{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }}
{{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }}
@@ -8,5 +7,6 @@
{{ $params := . }}
{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }}
{{ $_1 := set .Values "extraSelectorLabels" $selectors }}
{{- if not .Values.hostNetwork }}
{{ include "common.classes.service" $params }}
{{- end }}