Skip to content

Commit 33a268f

Browse files
authored
Merge pull request docker-mailserver#145 from furstblumier/feature/externaltraffic-toggle
Thanks for the reminder, forgot I hadn't merge this.
2 parents a475362 + f529989 commit 33a268f

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

charts/docker-mailserver/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "14.0.0"
33
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
44
name: docker-mailserver
5-
version: 4.1.3
5+
version: 4.1.4
66
sources:
77
- https://github.com/docker-mailserver/docker-mailserver-helm
88
maintainers:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
service:
2-
type: ClusterIP
2+
type: ClusterIP

charts/docker-mailserver/templates/service.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ 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" }}
29+
{{- if or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer") }}
30+
{{- if .Values.service.externalTrafficPolicy }}
31+
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
32+
{{- end }}
33+
{{- if and (not .Values.service.externalTrafficPolicy) (eq .Values.service.type "LoadBalancer") }}
3034
externalTrafficPolicy: Local
31-
{{- else if eq .Values.service.type "NodePort" }}
35+
{{- end }}
36+
{{- if and (not .Values.service.externalTrafficPolicy) (eq .Values.service.type "NodePort") }}
3237
externalTrafficPolicy: Cluster
33-
{{ end }}
38+
{{- end }}
39+
{{- end }}
3440
selector:
3541
app.kubernetes.io/name: {{ template "dockermailserver.fullname" . }}
3642
release: "{{ .Release.Name }}"

charts/docker-mailserver/values.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,15 @@ deployment:
298298
service:
299299
## What scope the service should be exposed in. One of:
300300
## - LoadBalancer (to the world)
301+
## - NodePort (to the world, via high port on a node)
301302
## - ClusterIP (to the cluster)
302-
type: "LoadBalancer"
303+
type: "ClusterIP"
304+
## Manually overwrite the externalTrafficPolicy. One of:
305+
## - Local
306+
## - Cluster
307+
## Set it to "Local" when used with type "LoadBalancer" and set it to "Cluster" when used with "NodePort",
308+
## unless you have a good reason not to.
309+
# externalTrafficPolicy: "Cluster"
303310
## If there is a port associated with a given service, expose it here.
304311
# port:
305312
## If there is a particular IP that should be used for the service, specify it here.

0 commit comments

Comments
 (0)