Skip to content

Commit

Permalink
Add runtime/priorityClassName, update labels, clean up unused tests (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
funkypenguin authored May 6, 2022
1 parent df990da commit 3525ebb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 22 deletions.
10 changes: 7 additions & 3 deletions charts/docker-mailserver/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v2
appVersion: "10.5.0"
appVersion: "11.0.0"
description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker.
name: docker-mailserver
version: 0.4.0
version: 1.0.0
sources:
- https://github.com/funkypenguin/helm-docker-mailserver
- https://github.com/docker-mailserver/docker-mailserver-helm
maintainers:
- name: funkypenguin
email: [email protected]
Expand All @@ -17,6 +17,10 @@ keywords:
home: https://github.com/funkypenguin/helm-docker-mailserver
icon: https://avatars.githubusercontent.com/u/76868633?s=400&v=4

annotations:
artifacthub.io/changes: |
- Breaking : Standardized app labels to app.kubernetes.io/name for Istio workload/Cilium compatibility
dependencies:
- name: "kubernetes-ingress"
version: "1.21.1"
Expand Down
5 changes: 2 additions & 3 deletions charts/docker-mailserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ The following table lists the configurable parameters of the docker-mailserver c
| `image.tag` | The image tag to use (You may prefer "latest" over "v6.1.0", for example) | `release-v6.1.0` |
| `demoMode.enabled` | Start the container with a demo "[email protected]" user (password is "password") | `true` |
| `haproxy.enabled` | Support HAProxy PROXY protocol on SMTP, IMAP(S), and POP3(S) connections. Provides real source IP instead of load balancer IP | `true` |
| `poorMansK8sLb.enabled` | Whether to deploy containers to call webhook for [poor-mans-k8s-lb](https://www.funkypenguin.co.nz/project/a-simple-free-load-balancer-for-your-kubernetes-cluster/) | `false` |
| `poorMansK8sLb.webhookUrl` | The webhook to use if [poor-mans-k8s-lb](https://www.funkypenguin.co.nz/project/a-simple-free-load-balancer-for-your-kubernetes-cluster/) is enabled via `poorMansK8sLb.enabled` | None |
| `poorMansK8sLb.webhookSecret` | The secret to use if [poor-mans-k8s-lb](https://www.funkypenguin.co.nz/project/a-simple-free-load-balancer-for-your-kubernetes-cluster/) is enabled via `poorMansK8sLb.enabled` | None |
| `haproxy.trustedNetworks` | The IPs (*in space-separated CIDR format*) from which to trust inbound HAProxy-enabled connections | `"10.0.0.0/8 192.168.0.0/16 172.16.0.0/16"` |
| `spfTestsDisabled` | Disable all SPF-related spam checks (*if source IP of inbound connections is a problem, and you're not using haproxy*) | `false` |
| `domains` | List of domains to be served | `[]` |
Expand Down Expand Up @@ -242,6 +239,8 @@ The following table lists the configurable parameters of the docker-mailserver c
| `ssl.issuer.kind` | Whether the issuer is namespaced (`Issuer`) on cluster-wide (`ClusterIssuer`) | `ClusterIssuer` |
| `ssl.dnsname` | DNS domain used for DNS01 validation | `example.com` |
| `ssl.dns01provider` | The cert-manager DNS01 provider (*more details [coming](https://github.com/funkypenguin/docker-mailserver/issues/6)*) | `cloudflare` |
| `runtimeClassName` | Optionally, set the pod's [runtimeClass](https://kubernetes.io/docs/concepts/containers/runtime-class/) | `""`
| `priorityClassName` | Optionally, set the pod's [priorityClass](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) | `""`

#### docker-mailserver Configuration

Expand Down
37 changes: 21 additions & 16 deletions charts/docker-mailserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,36 @@ spec:
{{ end }}
spec:
runtimeClassName: {{ .Values.runtimeClassName }}
priorityClassName: {{ .Values.priorityClassName }}
serviceAccountName: {{ template "dockermailserver.serviceAccountName" . }}
securityContext:
{{ toYaml .Values.securityContext | indent 8 }}
volumes:
- name: "data"
persistentVolumeClaim:
claimName: {{ template "dockermailserver.pvcName" . }}
- name: "config"
emptyDir: {}
- name: "configmap"
configMap:
name: {{ template "dockermailserver.fullname" . }}-configs
- name: "opendkim-keys"
secret:
secretName: {{ template "dockermailserver.fullname" . }}-secrets
- name: "data"
persistentVolumeClaim:
claimName: {{ template "dockermailserver.pvcName" . }}
- name: "config"
emptyDir: {}
- name: "configmap"
configMap:
name: {{ template "dockermailserver.fullname" . }}-configs
- name: "opendkim-keys"
secret:
secretName: {{ template "dockermailserver.fullname" . }}-secrets
{{ if .Values.pod.dockermailserver.ssl_type }}
- name: "ssl-cert"
secret:
- name: "ssl-cert"
secret:
{{ if .Values.ssl.useExisting }}
secretName: {{ .Values.ssl.existingName }}
secretName: {{ .Values.ssl.existingName }}
{{- else }}
secretName: {{ template "dockermailserver.fullname" . }}-tls
secretName: {{ template "dockermailserver.fullname" . }}-tls
{{- end }}
{{- end }}
{{ if .Values.additionalVolumes }}
{{- toYaml .Values.additionalVolumes | indent 9 }}
{{- end }}
- name: tmp
emptyDir: {}
initContainers:
- name: prep-config
image: {{ .Values.initContainer.image.name }}:{{ .Values.initContainer.image.tag }}
Expand Down Expand Up @@ -95,9 +98,11 @@ spec:
mountPath: /tmp/ssl
readOnly: true
{{- end }}
- name: tmp
mountPath: /var/tmp
- name: data
mountPath: /var/mail
subPath: mail
subPath: mail
- name: data
mountPath: /var/mail-state
subPath: mail-state
Expand Down
3 changes: 3 additions & 0 deletions charts/docker-mailserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ initContainer:
## Optionally specify a runtimeClassName for the deployment
runtimeClassName:

## Optionally specify a priorityClassName for the deployment
priorityClassName:

serviceAccount:
create: "true"

Expand Down

0 comments on commit 3525ebb

Please sign in to comment.