Skip to content

Commit 48072ae

Browse files
committed
add externalTrafficPolicy toggle
1 parent 922448c commit 48072ae

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

charts/docker-mailserver/templates/service.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ metadata:
2626
spec:
2727
## If a load balancer is being used, ensure that the newer type of LB that passes along IP information is used
2828
## rather than the legacy one.
29-
{{- if eq .Values.service.type "LoadBalancer" }}
30-
externalTrafficPolicy: Local
31-
{{- else if eq .Values.service.type "NodePort" }}
32-
externalTrafficPolicy: Cluster
33-
{{ end }}
29+
externalTrafficPolicy: {{ default "Local" .Values.service.externalTrafficPolicy }}
3430
selector:
3531
app.kubernetes.io/name: {{ template "dockermailserver.fullname" . }}
3632
release: "{{ .Release.Name }}"

charts/docker-mailserver/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ service:
298298
## - LoadBalancer (to the world)
299299
## - ClusterIP (to the cluster)
300300
type: "LoadBalancer"
301+
## Manually overwrite the externalTrafficPolicy. One of:
302+
## - Local
303+
## - Cluster
304+
## Set it to "Local" when used with type "LoadBalancer", unless you have a good reason not to.
305+
# externalTrafficPolicy: Local
301306
## If there is a port associated with a given service, expose it here.
302307
# port:
303308
## If there is a particular IP that should be used for the service, specify it here.

0 commit comments

Comments
 (0)