Skip to content

Commit 140add2

Browse files
authored
Merge pull request docker-mailserver#180 from younsl/feat/support-service-trafficdistribution-field
feat: Add spec.trafficDistribution field for service
2 parents efe0896 + 1d93508 commit 140add2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

charts/docker-mailserver/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,6 @@ spec:
145145
{{- if .Values.service.clusterIp }}
146146
clusterIP: {{ .Values.service.clusterIp }}
147147
{{- end }}
148+
{{- if .Values.service.trafficDistribution }}
149+
trafficDistribution: {{ .Values.service.trafficDistribution }}
150+
{{- end }}

charts/docker-mailserver/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ service:
300300
## Set it to "Local" when used with type "LoadBalancer" and set it to "Cluster" when used with "NodePort",
301301
## unless you have a good reason not to.
302302
# externalTrafficPolicy: "Cluster"
303+
## Traffic distribution preference for Services. One of:
304+
## - PreferClose
305+
## - PreferSameZone (started from 1.34)
306+
## - PreferSameNode (started from 1.34)
307+
## Ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution
308+
trafficDistribution: ""
303309
## If there is a port associated with a given service, expose it here.
304310
# port:
305311
## If there is a particular IP that should be used for the service, specify it here.

0 commit comments

Comments
 (0)