x
apiVersion v1
kind Service
metadata
name include "james.fullname" . -mail
labels
"james.labels" . | nindent 4 - include
annotations
- with .Values.service.annotations
- toYaml . | nindent 4
- end
spec
type .Values.service.type
ports
- if .Values.service.ports.smtp
port25
targetPort smtp
protocol TCP
name smtp
"NodePort" - if eq .Values.service.type
nodePort25
- end
- end
- if .Values.service.ports.smtpunencrypted
port1125
targetPort smtpunencrypted
protocol TCP
name smtpunencrypted
"NodePort" - if eq .Values.service.unencryptedType
nodePort1125
- end
- end
- if .Values.service.ports.smtps
port465
targetPort smtps
protocol TCP
name smtps
"NodePort" - if eq .Values.service.type
nodePort465
- end
- end
- if .Values.service.ports.smtps
port587
targetPort smtp-starttls
protocol TCP
name smtp-starttls
"NodePort" - if eq .Values.service.type
nodePort587
- end
- end
- if .Values.service.ports.pop3
port110
targetPort pop3
protocol TCP
name pop3
"NodePort" - if eq .Values.service.type
nodePort110
- end
- end
- if .Values.service.ports.pop3s
port995
targetPort pop3s
protocol TCP
name pop3s
"NodePort" - if eq .Values.service.type
nodePort995
- end
- end
- if .Values.service.ports.imap
port143
targetPort imap
protocol TCP
name imap
"NodePort" - if eq .Values.service.type
nodePort143
- end
- end
- if .Values.service.ports.imaps
port993
targetPort imaps
protocol TCP
name imaps
"NodePort" - if eq .Values.service.type
nodePort993
- end
- end
- if .Values.service.ports.imapunencrypted
port1143
targetPort imapunencrypted
protocol TCP
name imapunencrypted
"NodePort" - if eq .Values.service.unencryptedType
nodePort1143
- end
- end
- if .Values.service.ports.sieve
port4190
targetPort sieve
protocol TCP
name sieve
"NodePort" - if eq .Values.service.unencryptedType
nodePort4190
- end
- end
selector
"james.selectorLabels" . | nindent 4 - include
---
apiVersion v1
kind Service
metadata
name include "james.fullname" . -http
labels
"james.labels" . | nindent 4 - include
annotations
- with .Values.service.annotations
- toYaml . | nindent 4
- end
spec
type ClusterIP
ports
port8080
targetPort http-admin
name http-admin
protocol TCP
selector
"james.selectorLabels" . | nindent 4 - include