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

Merge FunkyPenguin's Changes #89

Merged
merged 25 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
67844aa
Add persistent logs
funkypenguin May 5, 2022
3a16f70
Fix case
funkypenguin May 5, 2022
a7f9588
Revert log changes (#13)
funkypenguin May 5, 2022
fb7ad1e
Refactor env vars
funkypenguin May 6, 2022
dbd40c3
Add optional SSL_CERT env vars
funkypenguin May 6, 2022
f18b2f9
Restore dovecot replication trigger
funkypenguin May 6, 2022
f67e6f1
Bump
funkypenguin May 6, 2022
dcfe49d
Another fix
funkypenguin May 6, 2022
41e58b6
Env vars are tricky
funkypenguin May 6, 2022
d5c35c3
Debug by removing runtimeclassname
funkypenguin May 6, 2022
e5ede5e
Make SSL_TYPE backwards-compatible
funkypenguin May 10, 2022
e592f85
Update logic re SSL_TYPE
funkypenguin May 10, 2022
3b147b6
Looks like we need default env vars!
funkypenguin May 11, 2022
1ed16c3
Fix ssl cert mount
funkypenguin May 11, 2022
2a93475
Update to avoid syntax errors
funkypenguin Jun 14, 2022
b1b89a0
Re-fix indentation
funkypenguin Jan 26, 2023
f60208c
Fix bad string chomp
funkypenguin Jan 26, 2023
b5617df
Increase liveness/readiness check timeout
funkypenguin Jan 26, 2023
c191d25
Make storageClass work
funkypenguin Jan 26, 2023
7ffc658
Another PVC fix
funkypenguin Jan 26, 2023
e945cdf
fix storageClassName
funkypenguin Jan 26, 2023
6034bff
Update Chart version and while at it the appVersion and docker-mailse…
cfis Jan 10, 2024
c9fbe21
Upgrade github actions and test against currently supported Kubernete…
cfis Jan 28, 2024
f3557d5
Don't set an existing secret by default (breaks installation) and rem…
cfisoi Jan 29, 2024
88f9fa1
Set emphermeral storage so kube-score is happy and lint passes
cfisoi Jan 29, 2024
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
20 changes: 10 additions & 10 deletions .github/workflows/on-push-lint-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
workflow_dispatch:

env:
KUBE_SCORE_VERSION: 1.12.0
HELM_VERSION: v3.4.1
KUBE_SCORE_VERSION: 1.17.0
HELM_VERSION: v3.13.2

concurrency:
group: ${{ github.head_ref }}
Expand All @@ -24,12 +24,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v3
with:
version: ${{ env.HELM_VERSION }}

Expand All @@ -49,21 +49,21 @@ jobs:
strategy:
matrix:
# Choose from https://hub.docker.com/r/kindest/node/tags
KubeVersion: [1.24.15,1.25.11,1.26.6,1.27.3,1.28.0]
KubeVersion: [1.27.3, 1.28.0, 1.29.0]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

# python is a requirement for the chart-testing action below (supports yamllint among other tests)
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.11

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.6.0

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -77,7 +77,7 @@ jobs:
run: ct lint --config .ci/ct-config.yaml

- name: Create ${{matrix.KubeVersion}} kind cluster
uses: helm/kind-action@v1.2.0
uses: helm/kind-action@v1.5.0
with:
node_image: kindest/node:v${{matrix.KubeVersion}}
cluster_name: kubernetes-${{matrix.KubeVersion}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-push-master-publish-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -32,7 +32,7 @@ jobs:
helm repo add haprox https://haproxytech.github.io/helm-charts --force-update

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

4 changes: 2 additions & 2 deletions charts/docker-mailserver/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: "12.1.0"
appVersion: "13.2.0"
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
name: docker-mailserver
version: 2.1.1
version: 2.2.2
sources:
- https://github.com/docker-mailserver/docker-mailserver-helm
maintainers:
Expand Down
15 changes: 0 additions & 15 deletions charts/docker-mailserver/templates/certificate.yaml

This file was deleted.

11 changes: 7 additions & 4 deletions charts/docker-mailserver/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ metadata:
name: {{ template "dockermailserver.fullname" . }}-configs
data:
{{/* Use sample data if user is running in demo mode */}}
{{- if .Values.demoMode.enabled -}}
{{- if .Values.demoMode.enabled -}}
### We are in demo mode, so add in some sample data for quick testing
postfix-accounts.cf: |
# A sample user - the password is "password"
[email protected]|{SHA512-CRYPT}$6$l4023rZnQEy/l0Rg$JeNjAAICB43VAX7GTJ9jeE7DR0LeyR5nU.ftq3c42T5E1IZSuRBqwM8erRh6t0CyIT6aYpBIAopzcQHNUvMV00
postfix-virtual.cf: "# Intentionally left empty"
SigningTable: "*@example.com mail._domainkey.example.com"
KeyTable: "mail._domainkey.example.com example.com:mail:/etc/opendkim/keys/example.com/mail.private"
postfix-virtual.cf: |
# Intentionally left empty
SigningTable: |
*@example.com mail._domainkey.example.com
KeyTable: |
mail._domainkey.example.com example.com:mail:/etc/opendkim/keys/example.com/mail.private
TrustedHosts: |
127.0.0.1
localhost
Expand Down
34 changes: 16 additions & 18 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@ spec:
- name: "opendkim-keys"
secret:
secretName: {{ template "dockermailserver.fullname" . }}-secrets
{{ if .Values.pod.dockermailserver.ssl_type }}
{{- if and .Values.pod.dockermailserver.env.SSL_TYPE .Values.ssl.useExisting }}
- name: "ssl-cert"
secret:
{{ if .Values.ssl.useExisting }}
secretName: {{ .Values.ssl.existingName }}
{{- else }}
secretName: {{ template "dockermailserver.fullname" . }}-tls
{{- end }}
{{- end }}
{{ if .Values.additionalVolumes }}
{{- toYaml .Values.additionalVolumes | indent 8 }}
{{- if .Values.additionalVolumes }}
{{ toYaml .Values.additionalVolumes | indent 8 }}
{{- end }}
- name: tmp
emptyDir: {}
Expand All @@ -76,25 +72,27 @@ spec:
securityContext:
{{ toYaml .Values.initContainer.containerSecurityContext | indent 12 }}
containers:

- name: dockermailserver
- name: docker-mailserver
env:
{{- include "dockermailserver.upstream-env-variables" . | nindent 10 }}
{{- range $pkey, $pval := .Values.pod.dockermailserver.env }}
- name: {{ $pkey }}
value: {{ quote $pval }}
{{- end }}
image: {{ .Values.image.name }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if eq .Values.pod.dockermailserver.enable_fail2ban 1.0 }}
securityContext:
{{- if eq .Values.pod.dockermailserver.env.ENABLE_FAIL2BAN 1.0 }}
capabilities:
add:
- "NET_ADMIN"
{{ end }}
securityContext:
{{ toYaml .Values.pod.dockermailserver.containerSecurityContext | indent 12 }}
volumeMounts:
- name: config
mountPath: /tmp/docker-mailserver
{{ if .Values.pod.dockermailserver.ssl_type }}
{{- if and .Values.pod.dockermailserver.env.SSL_TYPE .Values.ssl.useExisting }}
- name: ssl-cert
mountPath: /tmp/ssl
readOnly: true
Expand Down Expand Up @@ -141,8 +139,8 @@ spec:
subPath: 91-override-sieve.conf
mountPath: /etc/dovecot/conf.d/91-override-sieve.conf
readOnly: true
{{ end }}
{{- if .Values.demoMode.enabled }}
{{- end }}
{{- if .Values.demoMode.enabled }}
- name: opendkim-keys
mountPath: "/tmp/docker-mailserver/opendkim/keys/example.com/mail.private"
subPath: "example.com-mail.private"
Expand All @@ -158,7 +156,7 @@ spec:
readOnly: true
{{- end }}
{{- end }}
{{ if .Values.additionalVolumeMounts }}
{{- if .Values.additionalVolumeMounts }}
{{ toYaml .Values.additionalVolumeMounts | indent 12 }}
{{- end }}
livenessProbe:
Expand All @@ -168,7 +166,7 @@ spec:
- -c
- supervisorctl status | grep -E "amavis|clamav|cron|dovecot|mailserver|opendkim|opendmarc|postfix|rsyslog" | grep RUNNING
initialDelaySeconds: 10
timeoutSeconds: 1
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
exec:
Expand All @@ -177,7 +175,7 @@ spec:
- -c
- supervisorctl status | grep -E "mailserver|postfix" | grep RUNNING
initialDelaySeconds: 10
timeoutSeconds: 1
timeoutSeconds: 5
failureThreshold: 3

{{ if .Values.metrics.enabled }}
Expand Down
10 changes: 4 additions & 6 deletions charts/docker-mailserver/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ kind: "PersistentVolumeClaim"
apiVersion: "v1"
metadata:
name: {{ template "dockermailserver.fullname" . }}
annotations:
{{- if .Values.persistence.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: "generic"
{{- end }}
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 2 }}
{{ end }}
spec:
accessModes:
- {{ default "ReadWriteOnce" .Values.persistence.accessMode | quote }}
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
Expand Down
Loading
Loading