diff --git a/Chart.yaml b/Chart.yaml index ee5e843..ca2c527 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,7 +3,7 @@ name: stalwart-mail description: Helm Chart for Stalwart Mail Server - Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP) icon: https://stalw.art/home/apple-touch-icon.png type: application -version: 0.0.3 +version: 0.0.5 # renovate: image=docker.io/stalwartlabs/mail-server appVersion: '0.8.1' maintainers: diff --git a/README.md b/README.md index 01c56cf..a81f90f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # stalwart-mail -![Version: 0.0.3](https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.1](https://img.shields.io/badge/AppVersion-0.8.1-informational?style=flat-square) +![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.1](https://img.shields.io/badge/AppVersion-0.8.1-informational?style=flat-square) Helm Chart for Stalwart Mail Server - Secure & Modern All-in-One Mail Server (IMAP, JMAP, SMTP) @@ -18,10 +18,11 @@ Helm Chart for Stalwart Mail Server - Secure & Modern All-in-One Mail Server (IM | image.repository | string | `"stalwartlabs/mail-server"` | | | image.tag | string | `""` | | | persistence.accessMode | string | `"ReadWriteOnce"` | | -| persistence.enabled | bool | `true` | | +| persistence.enabled | bool | `false` | | +| persistence.existingClaim | string | `""` | | | persistence.mountPath | string | `"/opt/stalwart-mail"` | | | persistence.size | string | `"10Gi"` | | -| persistence.storageClass | string | `"standard"` | | +| persistence.storageClass | string | `""` | | | replicaCount | int | `1` | | | service.ports.http | int | `8080` | | | service.ports.https | int | `443` | | diff --git a/templates/deployment.yaml b/templates/deployment.yaml index fb6f655..e00d8bd 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -1,23 +1,20 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "stalwart-mail.fullname" . }} - labels: - {{- include "stalwart-mail.labels" . | nindent 4 }} + name: { { include "stalwart-mail.fullname" . } } + labels: { { - include "stalwart-mail.labels" . | nindent 4 } } spec: - replicas: {{ .Values.replicaCount }} + replicas: { { .Values.replicaCount } } selector: - matchLabels: - {{- include "stalwart-mail.selectorLabels" . | nindent 6 }} + matchLabels: { { - include "stalwart-mail.selectorLabels" . | nindent 6 } } template: metadata: - labels: - {{- include "stalwart-mail.selectorLabels" . | nindent 8 }} + labels: { { - include "stalwart-mail.selectorLabels" . | nindent 8 } } spec: containers: - name: stalwart-mail - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}' + imagePullPolicy: { { .Values.image.pullPolicy } } ports: - containerPort: 8080 - containerPort: 443 @@ -29,8 +26,8 @@ spec: - containerPort: 4190 volumeMounts: - name: stalwart-volume - mountPath: {{ .Values.persistence.mountPath }} + mountPath: { { .Values.persistence.mountPath } } volumes: - name: stalwart-volume persistentVolumeClaim: - claimName: {{ include "stalwart-mail.fullname" . }} + claimName: { { .Values.persistence.existingClaim | default (include "stalwart-mail.fullname" .) } } diff --git a/templates/pvc.yaml b/templates/pvc.yaml new file mode 100644 index 0000000..d24e78f --- /dev/null +++ b/templates/pvc.yaml @@ -0,0 +1,22 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "stalwart-mail.fullname" . }} + labels: + {{- include "stalwart-mail.labels" . | nindent 4 }} +spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- if .Values.persistence.storageClass }} + {{- if not .Values.persistence.storageClass }} + storageClassName: "" + {{- else }} + storageClassName: {{ .Values.persistence.storageClass | quote }} + {{- end }} + {{- end }} +{{- end }} + diff --git a/values.yaml b/values.yaml index 7ed550c..c1d6d80 100644 --- a/values.yaml +++ b/values.yaml @@ -15,9 +15,18 @@ service: imaps: 993 sieve: 4190 +## Persist configuration to a persistent volume persistence: - enabled: true - storageClass: 'standard' + # persistence.enabled - Should disk persistence be enabled + enabled: false + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + existingClaim: '' + storageClass: '' accessMode: ReadWriteOnce size: 10Gi mountPath: /opt/stalwart-mail