-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathservice-external.yaml
More file actions
91 lines (91 loc) · 2.95 KB
/
Copy pathservice-external.yaml
File metadata and controls
91 lines (91 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{{- if .Values.front.externalService.enabled -}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-ext" (include "mailu.front.serviceName" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: front
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.front.externalService.annotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.front.externalService.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: front
{{- with .Values.front.externalService }}
type: {{ .type | default "ClusterIP" }}
externalTrafficPolicy: {{ .externalTrafficPolicy | default "Local" }}
{{- if .loadBalancerIP }}
loadBalancerIP: {{ .loadBalancerIP }}
{{- end }}
ports:
{{- if .ports.pop3 }}
- name: pop3
port: 110
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.pop3 }}
nodePort: {{ .nodePorts.pop3 }}
{{- end }}
{{- end }}
{{- if .ports.pop3s }}
- name: pop3s
port: 995
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.pop3s }}
nodePort: {{ .nodePorts.pop3s }}
{{- end }}
{{- end }}
{{- if .ports.imap }}
- name: imap
port: 143
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.imap }}
nodePort: {{ .nodePorts.imap }}
{{- end }}
{{- end }}
{{- if .ports.imaps }}
- name: imaps
port: 993
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.imaps }}
nodePort: {{ .nodePorts.imaps }}
{{- end }}
{{- end }}
{{- if .ports.smtp }}
- name: smtp
port: 25
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.smtp }}
nodePort: {{ .nodePorts.smtp }}
{{- end }}
{{- end }}
{{- if .ports.smtps }}
- name: smtps
port: 465
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.smtps }}
nodePort: {{ .nodePorts.smtps }}
{{- end }}
{{- end }}
{{- if .ports.submission }}
- name: smtpd
port: 587
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.submission }}
nodePort: {{ .nodePorts.submission }}
{{- end }}
{{- end }}
{{- if .ports.manageSieve }}
- name: sieve
port: 4190
protocol: TCP
{{- if and (eq $.Values.front.externalService.type "NodePort") .nodePorts.manageSieve }}
nodePort: {{ .nodePorts.manageSieve }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}