Skip to content

Commit 6816dcd

Browse files
authored
Merge pull request docker-mailserver#167 from DuncanvR/fix/service-private-ip
Fix service template to set ClusterIP
2 parents 22f7d4c + e53e15d commit 6816dcd

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

charts/docker-mailserver/templates/service.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ spec:
142142
{{- end }}
143143

144144
type: {{ default "ClusterIP" .Values.service.type }}
145-
{{- if eq .Values.service.type "LoadBalancer" }}
146-
{{- if .Values.service.loadBalancer.publicIp }}
147-
loadBalancerIP: {{ .Values.service.loadBalancer.publicIp }}
148-
{{- if .Values.service.loadBalancer.allowedIps }}
149-
loadBalancerSourceRanges:
150-
{{ .Values.service.loadBalancer.allowedIps | toYaml | indent 4 }}
151-
{{- end }}
152-
{{- end }}
145+
{{- if .Values.service.clusterIp }}
146+
clusterIP: {{ .Values.service.clusterIp }}
153147
{{- end }}

charts/docker-mailserver/values.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -306,18 +306,7 @@ service:
306306
## Note: It's quite unlikely that an IP should be specific. Normally, the best thing to do is leave it to Kubernetes
307307
## to allocate a free IP from the pool.
308308
## Default: Automatically assign a random IP
309-
# privateIp:
310-
## Only relevant if the `type` above is "LoadBalancer"
311-
loadBalancer:
312-
## If there is already a reserved public IP that this load balancer should use, indicate it here.
313-
## Default: Automatically assign a random, ephemeral IP
314-
# publicIp:
315-
## If there should be firewall rules restricting the load balancer to a limited set of IPs, specify those IPs below
316-
## in CIDR format. If all IPs should be allowed access, set the CIDR as "0.0.0.0/0"
317-
allowedIps:
318-
- "0.0.0.0/0"
319-
## If there is a Hostname associated with this site, add it here and it will be rendered in the documentation.
320-
# hostName:
309+
# clusterIp:
321310
annotations: {}
322311
labels: {}
323312

0 commit comments

Comments
 (0)