@@ -11,9 +11,6 @@ metadata:
1111 prometheus.io/path : {{ .Values.monitoring.service.path | quote }}
1212 prometheus.io/port : {{ .Values.monitoring.service.port | quote }}
1313 # #
14- # # If a load balancer is being used, ensure that the newer type of LB that passes along IP information is used
15- # # rather than the legacy one.
16- {{- if eq .Values.service.type "LoadBalancer" }}service.beta.kubernetes.io/external-traffic: "OnlyLocal"{{ end }}
1714 {{- if .Values.service.annotations }}
1815 {{ toYaml .Values.service.annotations | indent 2 }}
1916 {{ end }}
@@ -24,6 +21,13 @@ metadata:
2421 release : " {{ .Release.Name }}"
2522 name : {{ template "dockermailserver.fullname" . }}
2623spec :
24+ # # If a load balancer is being used, ensure that the newer type of LB that passes along IP information is used
25+ # # rather than the legacy one.
26+ {{- if eq .Values.service.type "LoadBalancer" }}
27+ externalTrafficPolicy : Local
28+ {{ else }}
29+ externalTrafficPolicy : Cluster
30+ {{ end }}
2731 selector :
2832 app : {{ template "dockermailserver.fullname" . }}
2933 release : " {{ .Release.Name }}"
8791 loadBalancerIP : {{ .Values.service.loadBalancer.publicIp }}
8892 {{ if .Values.service.loadBalancer.allowedIps -}}
8993 loadBalancerSourceRanges :
90- {{ .Values.service.loadBalancer.allowedIps | toYaml | indent 4 }}
94+ {{ .Values.service.loadBalancer.allowedIps | toYaml | indent 4 }}
9195 {{ end -}}
9296 {{ end -}}
9397 {{ end }}
94- externalTrafficPolicy : Local
0 commit comments