Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added support for NodePort port numbers configuration #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions mailu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ Check that the deployed pods are all running.
| `front.image.tag` | Pod image tag (defaults to mailuVersion if set, otherwise Chart.AppVersion) | `""` |
| `front.image.pullPolicy` | Pod image pull policy | `IfNotPresent` |
| `front.hostPort.enabled` | Expose front mail ports via hostPort | `true` |
| `front.externalService.enabled` | Expose front mail ports via external service (ClusterIP or LoadBalancer) | `false` |
| `front.externalService.type` | Service type (ClusterIP or LoadBalancer) | `ClusterIP` |
| `front.externalService.enabled` | Expose front mail ports via external service (ClusterIP, NodePort, or LoadBalancer) | `false` |
| `front.externalService.type` | Service type (ClusterIP, NodePort, or LoadBalancer) | `ClusterIP` |
| `front.externalService.externalTrafficPolicy` | Service externalTrafficPolicy (Cluster or Local) | `Local` |
| `front.externalService.loadBalancerIP` | Service loadBalancerIP | `""` |
| `front.externalService.annotations` | Service annotations | `{}` |
Expand All @@ -320,6 +320,14 @@ Check that the deployed pods are all running.
| `front.externalService.ports.smtps` | Expose SMTP port (TLS) - 465/tcp | `true` |
| `front.externalService.ports.submission` | Expose Submission port - 587/tcp | `false` |
| `front.externalService.ports.manageSieve` | Expose ManageSieve port - 4190/tcp | `true` |
| `front.externalService.nodePorts.pop3` | POP3 node port (only if `front.externalService.type=NodePort`) | `30110` |
| `front.externalService.nodePorts.pop3s` | POP3 (TLS) node port (only if `front.externalService.type=NodePort`) | `30995` |
| `front.externalService.nodePorts.imap` | IMAP node port (only if `front.externalService.type=NodePort`) | `30143` |
| `front.externalService.nodePorts.imaps` | IMAP (TLS) node port (only if `front.externalService.type=NodePort`) | `30993` |
| `front.externalService.nodePorts.smtp` | SMTP node port (only if `front.externalService.type=NodePort`) | `30025` |
| `front.externalService.nodePorts.smtps` | SMTP (TLS) node port (only if `front.externalService.type=NodePort`) | `30465` |
| `front.externalService.nodePorts.submission` | Submission node port (only if `front.externalService.type=NodePort`) | `30587` |
| `front.externalService.nodePorts.manageSieve` | ManageSieve node port (only if `front.externalService.type=NodePort`) | `30419` |
| `front.kind` | Kind of resource to create for the front (`Deployment` or `DaemonSet`) | `Deployment` |
| `front.replicaCount` | Number of front replicas to deploy (only for `Deployment` kind) | `1` |
| `front.resources.limits` | The resources limits for the container | `{}` |
Expand Down
16 changes: 8 additions & 8 deletions mailu/templates/front/service-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,63 +28,63 @@ spec:
port: 110
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 110
nodePort: {{ .nodePorts.pop3 }}
{{- end }}
{{- end }}
{{- if .ports.pop3s }}
- name: pop3s
port: 995
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 995
nodePort: {{ .nodePorts.pop3s }}
{{- end }}
{{- end }}
{{- if .ports.imap }}
- name: imap
port: 143
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 143
nodePort: {{ .nodePorts.imap }}
{{- end }}
{{- end }}
{{- if .ports.imaps }}
- name: imaps
port: 993
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 993
nodePort: {{ .nodePorts.imaps }}
{{- end }}
{{- end }}
{{- if .ports.smtp }}
- name: smtp
port: 25
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 25
nodePort: {{ .nodePorts.smtp }}
{{- end }}
{{- end }}
{{- if .ports.smtps }}
- name: smtps
port: 465
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 465
nodePort: {{ .nodePorts.smtps }}
{{- end }}
{{- end }}
{{- if .ports.submission }}
- name: smtpd
port: 587
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 587
nodePort: {{ .nodePorts.submission }}
{{- end }}
{{- end }}
{{- if .ports.manageSieve }}
- name: sieve
port: 4190
protocol: TCP
{{ if eq $.Values.front.externalService.type "NodePort" -}}
nodePort: 4190
nodePort: {{ .nodePorts.manageSieve }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
23 changes: 20 additions & 3 deletions mailu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,9 @@ front:
hostPort:
enabled: true

## Expose front mail ports via external service (ClusterIP or LoadBalancer)
## @param front.externalService.enabled Expose front mail ports via external service (ClusterIP or LoadBalancer)
## @param front.externalService.type Service type (ClusterIP or LoadBalancer)
## Expose front mail ports via external service (ClusterIP, NodePort, or LoadBalancer)
## @param front.externalService.enabled Expose front mail ports via external service (ClusterIP, NodePort, or LoadBalancer)
## @param front.externalService.type Service type (ClusterIP, NodePort, or LoadBalancer)
## @param front.externalService.externalTrafficPolicy Service externalTrafficPolicy (Cluster or Local)
## @param front.externalService.loadBalancerIP Service loadBalancerIP
## @param front.externalService.annotations Service annotations
Expand All @@ -675,6 +675,14 @@ front:
## @param front.externalService.ports.smtps Expose SMTP port (TLS) - 465/tcp
## @param front.externalService.ports.submission Expose Submission port - 587/tcp
## @param front.externalService.ports.manageSieve Expose ManageSieve port - 4190/tcp
## @param front.externalService.nodePorts.pop3 POP3 node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.pop3s POP3 (TLS) node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.imap IMAP node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.imaps IMAP (TLS) node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.smtp SMTP node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.smtps SMTP (TLS) node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.submission Submission node port (only if `front.externalService.type=NodePort`)
## @param front.externalService.nodePorts.manageSieve ManageSieve node port (only if `front.externalService.type=NodePort`)
externalService:
enabled: false
type: ClusterIP
Expand All @@ -692,6 +700,15 @@ front:
smtps: true
submission: false
manageSieve: true
nodePorts:
pop3: 30110
pop3s: 30995
imap: 30143
imaps: 30993
smtp: 30025
smtps: 30465
submission: 30587
manageSieve: 30419

## @param front.kind Kind of resource to create for the front (`Deployment` or `DaemonSet`)
kind: Deployment
Expand Down
Loading