Skip to content

Commit

Permalink
add externalTrafficPolicy toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
furstblumier committed Feb 3, 2025
1 parent 922448c commit 48072ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions charts/docker-mailserver/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ metadata:
spec:
## If a load balancer is being used, ensure that the newer type of LB that passes along IP information is used
## rather than the legacy one.
{{- if eq .Values.service.type "LoadBalancer" }}
externalTrafficPolicy: Local
{{- else if eq .Values.service.type "NodePort" }}
externalTrafficPolicy: Cluster
{{ end }}
externalTrafficPolicy: {{ default "Local" .Values.service.externalTrafficPolicy }}
selector:
app.kubernetes.io/name: {{ template "dockermailserver.fullname" . }}
release: "{{ .Release.Name }}"
Expand Down
5 changes: 5 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ service:
## - LoadBalancer (to the world)
## - ClusterIP (to the cluster)
type: "LoadBalancer"
## Manually overwrite the externalTrafficPolicy. One of:
## - Local
## - Cluster
## Set it to "Local" when used with type "LoadBalancer", unless you have a good reason not to.
# externalTrafficPolicy: Local
## If there is a port associated with a given service, expose it here.
# port:
## If there is a particular IP that should be used for the service, specify it here.
Expand Down

0 comments on commit 48072ae

Please sign in to comment.