diff --git a/README.md b/README.md index 0ffba67..afadcba 100644 --- a/README.md +++ b/README.md @@ -639,7 +639,9 @@ Chart configuration is as follows: | `nodeSelector` | `{}` | Standard Kubernetes stuff | | `tolerations` | `[]` | Standard Kubernetes stuff | | `affinity` | `{}` | Standard Kubernetes stuff | -| `certs.create` | `{}` | Auto generate TLS certificates for Postfix | +| `certs.create` | `false` | Auto generate TLS certificates for Postfix | +| `certs.existing` | `false` | Use existing TLS certificates for Postfix | +| `certs.existingSecret` | `""` | Existing secret containing the TLS certificates for Postfix | | `extraVolumes` | `[]` | Append any extra volumes to the pod | | `extraVolumeMounts` | `[]` | Append any extra volume mounts to the postfix container | | `extraInitContainers` | `[]` | Execute any extra init containers on startup | diff --git a/helm/mail/templates/_helpers.tpl b/helm/mail/templates/_helpers.tpl index 1eef90a..8ec6fdb 100644 --- a/helm/mail/templates/_helpers.tpl +++ b/helm/mail/templates/_helpers.tpl @@ -84,6 +84,6 @@ Return the secret containing HTTPS/TLS certificates {{- if $secretName -}} {{- printf "%s" (tpl $secretName .) -}} {{- else -}} - {{- printf "smtp-relay-mail-certs" -}} + {{- printf "%s-certs" (include "mail.fullname" .) -}} {{- end -}} {{- end -}} diff --git a/helm/test_16_test_existing_certs.yml b/helm/test_16_test_existing_certs.yml new file mode 100644 index 0000000..844fd8b --- /dev/null +++ b/helm/test_16_test_existing_certs.yml @@ -0,0 +1,3 @@ +certs: + existing: true + existingSecret: "example-tls" \ No newline at end of file