diff --git a/mailu/templates/admin/deployment.yaml b/mailu/templates/admin/deployment.yaml index 9c44c6bf..74ee26a5 100644 --- a/mailu/templates/admin/deployment.yaml +++ b/mailu/templates/admin/deployment.yaml @@ -133,9 +133,14 @@ spec: {{- toYaml .Values.admin.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.admin.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.admin.claimName" . }} + {{- end }} {{- if .Values.admin.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.admin.extraVolumes "context" $) | nindent 8 }} {{- end }} diff --git a/mailu/templates/admin/pvc.yaml b/mailu/templates/admin/pvc.yaml index 99840226..72d39665 100644 --- a/mailu/templates/admin/pvc.yaml +++ b/mailu/templates/admin/pvc.yaml @@ -1,5 +1,5 @@ --- -{{- if not .Values.persistence.single_pvc }} +{{- if and (.Values.admin.persistence.enabled) (not .Values.persistence.single_pvc) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/mailu/templates/dovecot/deployment.yaml b/mailu/templates/dovecot/deployment.yaml index 48479726..a99e82f5 100644 --- a/mailu/templates/dovecot/deployment.yaml +++ b/mailu/templates/dovecot/deployment.yaml @@ -150,9 +150,14 @@ spec: {{- toYaml .Values.dovecot.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.dovecot.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.dovecot.claimName" . }} + {{- end }} {{- if .Values.dovecot.overrides }} - name: overrides configMap: diff --git a/mailu/templates/dovecot/pvc.yaml b/mailu/templates/dovecot/pvc.yaml index e3663f1e..e8f0416a 100644 --- a/mailu/templates/dovecot/pvc.yaml +++ b/mailu/templates/dovecot/pvc.yaml @@ -1,5 +1,5 @@ --- -{{- if .Values.dovecot.enabled }} +{{- if and (.Values.dovecot.persistence.enabled) (.Values.dovecot.enabled) }} {{- if not .Values.persistence.single_pvc }} kind: PersistentVolumeClaim apiVersion: v1 diff --git a/mailu/templates/fetchmail/deployment.yaml b/mailu/templates/fetchmail/deployment.yaml index 0038b67c..38049b78 100644 --- a/mailu/templates/fetchmail/deployment.yaml +++ b/mailu/templates/fetchmail/deployment.yaml @@ -138,9 +138,14 @@ spec: {{- toYaml .Values.fetchmail.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.fetchmail.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.fetchmail.claimName" . }} + {{- end }} {{- if .Values.fetchmail.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.fetchmail.extraVolumes "context" $) | nindent 8 }} {{- end }} diff --git a/mailu/templates/postfix/deployment.yaml b/mailu/templates/postfix/deployment.yaml index 34f1b1cf..e63ee647 100644 --- a/mailu/templates/postfix/deployment.yaml +++ b/mailu/templates/postfix/deployment.yaml @@ -143,9 +143,14 @@ spec: {{- toYaml .Values.postfix.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.postfix.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.postfix.claimName" . }} + {{- end }} {{- if .Values.postfix.overrides }} - name: overrides configMap: diff --git a/mailu/templates/postfix/pvc.yaml b/mailu/templates/postfix/pvc.yaml index 1d02e0a6..c35495ef 100644 --- a/mailu/templates/postfix/pvc.yaml +++ b/mailu/templates/postfix/pvc.yaml @@ -1,5 +1,5 @@ --- -{{- if not .Values.persistence.single_pvc }} +{{- if and (.Values.postfix.persistence.enabled) (not .Values.persistence.single_pvc) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/mailu/templates/rspamd/deployment.yaml b/mailu/templates/rspamd/deployment.yaml index 1c2ffaf9..064b8413 100644 --- a/mailu/templates/rspamd/deployment.yaml +++ b/mailu/templates/rspamd/deployment.yaml @@ -136,9 +136,14 @@ spec: {{- toYaml .Values.rspamd.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.rspamd.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.rspamd.claimName" . }} + {{- end }} {{- if .Values.rspamd.overrides }} - name: overrides configMap: diff --git a/mailu/templates/rspamd/pvc.yaml b/mailu/templates/rspamd/pvc.yaml index 32e82dac..9fadabc0 100644 --- a/mailu/templates/rspamd/pvc.yaml +++ b/mailu/templates/rspamd/pvc.yaml @@ -1,5 +1,5 @@ --- -{{- if and (not .Values.persistence.single_pvc) .Values.rspamd.enabled }} +{{- if and (.Values.rspamd.persistence.enabled) (not .Values.persistence.single_pvc) .Values.rspamd.enabled }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/mailu/templates/webdav/deployment.yaml b/mailu/templates/webdav/deployment.yaml index 2ab9cc67..4eccd7a0 100644 --- a/mailu/templates/webdav/deployment.yaml +++ b/mailu/templates/webdav/deployment.yaml @@ -131,9 +131,14 @@ spec: {{- toYaml .Values.webdav.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.webmail.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.webdav.claimName" . }} + {{- end }} {{- if .Values.webdav.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.webdav.extraVolumes "context" $) | nindent 8 }} {{- end }} diff --git a/mailu/templates/webmail/deployment.yaml b/mailu/templates/webmail/deployment.yaml index 1b02c26d..c27cf3fb 100644 --- a/mailu/templates/webmail/deployment.yaml +++ b/mailu/templates/webmail/deployment.yaml @@ -140,9 +140,14 @@ spec: {{- toYaml .Values.webmail.extraContainers | nindent 8 }} {{- end }} volumes: + {{- if not .Values.webmail.persistence.enabled }} + - name: data + emptyDir: {} + {{- else }} - name: data persistentVolumeClaim: claimName: {{ include "mailu.webmail.claimName" . }} + {{- end }} {{- if .Values.webmail.extraVolumes }} {{- include "common.tplvalues.render" (dict "value" .Values.webmail.extraVolumes "context" $) | nindent 8 }} {{- end }} diff --git a/mailu/templates/webmail/pvc.yaml b/mailu/templates/webmail/pvc.yaml index bed6414b..94b906e1 100644 --- a/mailu/templates/webmail/pvc.yaml +++ b/mailu/templates/webmail/pvc.yaml @@ -1,5 +1,5 @@ --- -{{- if and (.Values.webmail.enabled) (not .Values.persistence.single_pvc) }} +{{- if and (.Values.webmail.enabled) (.Values.webmail.persistence.enabled) (not .Values.persistence.single_pvc) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/mailu/values.yaml b/mailu/values.yaml index 91f44f07..2f4c5196 100644 --- a/mailu/values.yaml +++ b/mailu/values.yaml @@ -904,12 +904,14 @@ admin: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param admin.persistence.enabled Enable persistence using PVC ## @param admin.persistence.size Pod pvc size ## @param admin.persistence.storageClass Pod pvc storage class ## @param admin.persistence.accessModes Pod pvc access modes ## @param admin.persistence.claimNameOverride Pod pvc name override ## @param admin.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 20Gi storageClass: "" accessModes: [ReadWriteOnce] @@ -1143,12 +1145,14 @@ postfix: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param postfix.persistence.enabled Enable persistence using PVC ## @param postfix.persistence.size Pod pvc size ## @param postfix.persistence.storageClass Pod pvc storage class ## @param postfix.persistence.accessModes Pod pvc access modes ## @param postfix.persistence.claimNameOverride Pod pvc name override ## @param postfix.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 20Gi storageClass: "" accessModes: [ReadWriteOnce] @@ -1351,12 +1355,14 @@ dovecot: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param dovecot.persistence.enabled Enable persistence using PVC ## @param dovecot.persistence.size Pod pvc size ## @param dovecot.persistence.storageClass Pod pvc storage class ## @param dovecot.persistence.accessModes Pod pvc access modes ## @param dovecot.persistence.claimNameOverride Pod pvc name override ## @param dovecot.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 20Gi storageClass: "" accessModes: [ReadWriteOnce] @@ -1581,12 +1587,14 @@ rspamd: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param rspamd.persistence.enabled Enable persistence using PVC ## @param rspamd.persistence.size Pod pvc size ## @param rspamd.persistence.storageClass Pod pvc storage class ## @param rspamd.persistence.accessModes Pod pvc access modes ## @param rspamd.persistence.claimNameOverride Pod pvc name override ## @param rspamd.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 1Gi storageClass: "" accessModes: [ReadWriteOnce] @@ -2030,12 +2038,14 @@ webmail: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param webmail.persistence.enabled Enable persistence using PVC ## @param webmail.persistence.size Pod pvc size ## @param webmail.persistence.storageClass Pod pvc storage class ## @param webmail.persistence.accessModes Pod pvc access modes ## @param webmail.persistence.claimNameOverride Pod pvc name override ## @param webmail.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 20Gi storageClass: "" accessModes: [ReadWriteOnce] @@ -2230,12 +2240,14 @@ webdav: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param webdav.persistence.enabled Enable persistence using PVC ## @param webdav.persistence.size Pod pvc size ## @param webdav.persistence.storageClass Pod pvc storage class ## @param webdav.persistence.accessModes Pod pvc access modes ## @param webdav.persistence.claimNameOverride Pod pvc name override ## @param webdav.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 20Gi storageClass: "" accessModes: [ReadWriteOnce] @@ -2433,12 +2445,14 @@ fetchmail: pullPolicy: IfNotPresent ## Pod persistence (if not using single_pvc) + ## @param fetchmail.persistence.enabled Enable persistence using PVC ## @param fetchmail.persistence.size Pod pvc size ## @param fetchmail.persistence.storageClass Pod pvc storage class ## @param fetchmail.persistence.accessModes Pod pvc access modes ## @param fetchmail.persistence.claimNameOverride Pod pvc name override ## @param fetchmail.persistence.annotations Pod pvc annotations persistence: + enabled: true size: 20Gi storageClass: "" accessModes: [ReadWriteOnce]