From 069195a1256cff0b28e22788c455d6f6381fc9fc Mon Sep 17 00:00:00 2001 From: jaazmyn <44527318+jaazmyn@users.noreply.github.com> Date: Sat, 29 May 2021 17:09:21 +0200 Subject: [PATCH] Add option to use a specific nodePort (#70) * Add option to use a specific nodePort * Update README on option to specify a nodePort --- README.md | 1 + helm/mail/templates/service.yaml | 1 + helm/mail/values.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index cc2934d..98c93e5 100644 --- a/README.md +++ b/README.md @@ -459,6 +459,7 @@ Chart configuration is as follows: | `service.port` | `587` | SMTP submission port | | `service.labels` | `{}` | Additional service labels | | `service.annotations` | `{}` | Additional service annotations | +| `service.nodePort` | *empty* | Use a specific `nodePort` | | `resources` | `{}` | [Pod resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | | `autoscaling.enabled` | `false` | Set to `true` to enable [Horisontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | | `autoscaling.minReplicas` | `1` | Minimum number of replicas | diff --git a/helm/mail/templates/service.yaml b/helm/mail/templates/service.yaml index 7bff750..6e40391 100644 --- a/helm/mail/templates/service.yaml +++ b/helm/mail/templates/service.yaml @@ -18,5 +18,6 @@ spec: targetPort: smtp protocol: TCP name: smtp + {{ if eq .Values.service.type "NodePort" }}nodePort: {{ .Values.service.nodePort }}{{ end }} selector: {{- $selectorLabels | nindent 4 }} diff --git a/helm/mail/values.yaml b/helm/mail/values.yaml index d120288..daf6981 100644 --- a/helm/mail/values.yaml +++ b/helm/mail/values.yaml @@ -19,6 +19,7 @@ service: port: 587 labels: {} annotations: {} + # nodePort: resources: {} # We usually recommend not to specify default resources and to leave this as a conscious