Skip to content

Commit f65c224

Browse files
cmk-jarekbokysan
authored andcommitted
add k8s version min requirement
1 parent 86ee369 commit f65c224

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

helm/mail/templates/service.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
protocol: TCP
2222
name: smtp
2323
{{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.service.nodePort }}{{ end }}
24-
{{ if .Values.service.appprotocol }}appProtocol: {{ .Values.service.appprotocol }}{{ end }}
24+
{{ if and (semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion) .Values.service.appprotocol }}appProtocol: {{ .Values.service.appprotocol }}{{ end }}
2525
selector:
2626
{{- $selectorLabels | nindent 4 }}
2727
{{- if .Values.headlessService.enabled }}
@@ -47,7 +47,7 @@ spec:
4747
targetPort: smtp
4848
protocol: TCP
4949
name: smtp
50-
{{ if .Values.service.appprotocol }}appProtocol: {{ .Values.service.appprotocol }}{{ end }}
50+
{{ if and (semverCompare ">=1.20-0" .Capabilities.KubeVersion.GitVersion) .Values.service.appprotocol }}appProtocol: {{ .Values.service.appprotocol }}{{ end }}
5151
selector:
5252
{{- $selectorLabels | nindent 4 }}
5353
{{- end -}}

0 commit comments

Comments
 (0)