Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
feat!: move to a relay only chart
Browse files Browse the repository at this point in the history
  • Loading branch information
morremeyer committed Feb 5, 2022
1 parent c5d0f9f commit ea73120
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 26 deletions.
4 changes: 2 additions & 2 deletions charts/postfix-sendonly/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: postfix-sendonly
description: Sendonly mail services for your cluster
description: Sendonly relay mail services for your cluster
type: application
version: 1.0.2
version: 2.0.0
16 changes: 9 additions & 7 deletions charts/postfix-sendonly/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# postfix-sendonly

Sendonly mail services for your cluster
Sendonly relay mail services for your cluster

## Creating a DKIM key
## Setup

To create the needed DKIM key, follow the instructions in [„Generating a DKIM key“](https://git.mor.re/docker-images/postfix-sendonly#generating-a-dkim-key).
You need to provide a valid login for your provider. Currently, only submission on port 465 is supported.

You need to deploy this key into the cluster in a secret, specify its name in `.Values.existingSecret`.
The DKIM private key has to be stored in the key `key`.
You need to deploy this user credentials into the cluster in a secret, specify its name in `.Values.existingSecret`.

The user name has to be stored in `user`, the password in `password`.

## Values

Expand All @@ -18,8 +19,7 @@ The DKIM private key has to be stored in the key `key`.
| autoscaling.maxReplicas | int | `5` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| domain | string | `nil` | |
| existingSecret | string | `"postfix-sendonly-dkim"` | |
| existingSecret | string | `"postfix-sendonly"` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"registry.git.mor.re/docker-images/postfix-sendonly"` | |
Expand All @@ -29,6 +29,8 @@ The DKIM private key has to be stored in the key `key`.
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext.fsGroup | int | `101` | |
| relay.host | string | `"smtp.mailbox.org"` | |
| relay.port | int | `465` | |
| replicaCount | int | `2` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand Down
9 changes: 5 additions & 4 deletions charts/postfix-sendonly/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

{{ template "chart.description" . }}

## Creating a DKIM key
## Setup

To create the needed DKIM key, follow the instructions in [„Generating a DKIM key“](https://git.mor.re/docker-images/postfix-sendonly#generating-a-dkim-key).
You need to provide a valid login for your provider. Currently, only submission on port 465 is supported.

You need to deploy this key into the cluster in a secret, specify its name in `.Values.existingSecret`.
The DKIM private key has to be stored in the key `key`.
You need to deploy this user credentials into the cluster in a secret, specify its name in `.Values.existingSecret`.

The user name has to be stored in `user`, the password in `password`.

{{ template "chart.sourcesSection" . }}

Expand Down
25 changes: 14 additions & 11 deletions charts/postfix-sendonly/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: DOMAIN
value: {{ required "You must specify .Values.domain" .Values.domain }}
- name: RELAY_HOST
value: {{ .Values.relay.host }}
- name: RELAY_PORT
value: {{ .Values.relay.port | quote }}
- name: USER
valueFrom:
secretKeyRef:
name: {{ .Values.existingSecret }}
key: user
- name: PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.existingSecret }}
key: password
ports:
- name: smtp
containerPort: 25
Expand All @@ -47,19 +59,10 @@ spec:
tcpSocket:
port: smtp
periodSeconds: 60
volumeMounts:
- name: dkim-key
mountPath: /etc/opendkim/domainkeys/mail.private
subPath: key
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: dkim-key
secret:
secretName: {{ .Values.existingSecret }}
defaultMode: 0400
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
7 changes: 5 additions & 2 deletions charts/postfix-sendonly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ image:
pullPolicy: IfNotPresent
tag: "2022.02.05"

domain: ~
existingSecret: postfix-sendonly-dkim
relay:
host: smtp.mailbox.org
port: 465

existingSecret: postfix-sendonly

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit ea73120

Please sign in to comment.