diff --git a/mailu/README.md b/mailu/README.md index 98b9e553..8c6088fb 100644 --- a/mailu/README.md +++ b/mailu/README.md @@ -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 | `{}` | @@ -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 | `{}` | diff --git a/mailu/templates/front/service-external.yaml b/mailu/templates/front/service-external.yaml index d868b73e..50a1afae 100644 --- a/mailu/templates/front/service-external.yaml +++ b/mailu/templates/front/service-external.yaml @@ -28,7 +28,7 @@ spec: port: 110 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 110 + nodePort: {{ .nodePorts.pop3 }} {{- end }} {{- end }} {{- if .ports.pop3s }} @@ -36,7 +36,7 @@ spec: port: 995 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 995 + nodePort: {{ .nodePorts.pop3s }} {{- end }} {{- end }} {{- if .ports.imap }} @@ -44,7 +44,7 @@ spec: port: 143 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 143 + nodePort: {{ .nodePorts.imap }} {{- end }} {{- end }} {{- if .ports.imaps }} @@ -52,7 +52,7 @@ spec: port: 993 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 993 + nodePort: {{ .nodePorts.imaps }} {{- end }} {{- end }} {{- if .ports.smtp }} @@ -60,7 +60,7 @@ spec: port: 25 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 25 + nodePort: {{ .nodePorts.smtp }} {{- end }} {{- end }} {{- if .ports.smtps }} @@ -68,7 +68,7 @@ spec: port: 465 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 465 + nodePort: {{ .nodePorts.smtps }} {{- end }} {{- end }} {{- if .ports.submission }} @@ -76,7 +76,7 @@ spec: port: 587 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 587 + nodePort: {{ .nodePorts.submission }} {{- end }} {{- end }} {{- if .ports.manageSieve }} @@ -84,7 +84,7 @@ spec: port: 4190 protocol: TCP {{ if eq $.Values.front.externalService.type "NodePort" -}} - nodePort: 4190 + nodePort: {{ .nodePorts.manageSieve }} {{- end }} {{- end }} {{- end }} diff --git a/mailu/values.yaml b/mailu/values.yaml index 6337b6a2..d1ec5dec 100644 --- a/mailu/values.yaml +++ b/mailu/values.yaml @@ -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 @@ -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 @@ -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