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

fix: Allow setting custom NodePorts for externalService #383

Merged
merged 2 commits into from
Dec 22, 2024
Merged
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
8 changes: 8 additions & 0 deletions mailu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,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` | NodePort to use for POP3 (defaults to 110/tcp) | `110` |
| `front.externalService.nodePorts.pop3s` | NodePort to use for POP3 (TLS) (defaults to 995/tcp) | `995` |
| `front.externalService.nodePorts.imap` | NodePort to use for IMAP (defaults to 143/tcp) | `143` |
| `front.externalService.nodePorts.imaps` | NodePort to use for IMAP (TLS) (defaults to 993/tcp) | `993` |
| `front.externalService.nodePorts.smtp` | NodePort to use for SMTP (defaults to 25/tcp) | `25` |
| `front.externalService.nodePorts.smtps` | NodePort to use for SMTP (TLS) (defaults to 465/tcp) | `465` |
| `front.externalService.nodePorts.submission` | NodePort to use for Submission (defaults to 587/tcp) | `587` |
| `front.externalService.nodePorts.manageSieve` | NodePort to use for ManageSieve (defaults to 4190/tcp) | `4190` |
| `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
17 changes: 17 additions & 0 deletions mailu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,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 NodePort to use for POP3 (defaults to 110/tcp)
## @param front.externalService.nodePorts.pop3s NodePort to use for POP3 (TLS) (defaults to 995/tcp)
## @param front.externalService.nodePorts.imap NodePort to use for IMAP (defaults to 143/tcp)
## @param front.externalService.nodePorts.imaps NodePort to use for IMAP (TLS) (defaults to 993/tcp)
## @param front.externalService.nodePorts.smtp NodePort to use for SMTP (defaults to 25/tcp)
## @param front.externalService.nodePorts.smtps NodePort to use for SMTP (TLS) (defaults to 465/tcp)
## @param front.externalService.nodePorts.submission NodePort to use for Submission (defaults to 587/tcp)
## @param front.externalService.nodePorts.manageSieve NodePort to use for ManageSieve (defaults to 4190/tcp)
externalService:
enabled: false
type: ClusterIP
Expand All @@ -704,6 +712,15 @@ front:
smtps: true
submission: false
manageSieve: true
nodePorts:
pop3: 110
pop3s: 995
imap: 143
imaps: 993
smtp: 25
smtps: 465
submission: 587
manageSieve: 4190

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