Skip to content

Commit

Permalink
Add persistence flag for all services
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltachaos committed Sep 1, 2024
1 parent 5d43510 commit f5dd3ea
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 5 deletions.
5 changes: 5 additions & 0 deletions mailu/templates/admin/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion mailu/templates/admin/pvc.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 5 additions & 0 deletions mailu/templates/dovecot/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mailu/templates/dovecot/pvc.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions mailu/templates/fetchmail/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions mailu/templates/postfix/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mailu/templates/postfix/pvc.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 5 additions & 0 deletions mailu/templates/rspamd/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mailu/templates/rspamd/pvc.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 5 additions & 0 deletions mailu/templates/webdav/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions mailu/templates/webmail/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion mailu/templates/webmail/pvc.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
14 changes: 14 additions & 0 deletions mailu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit f5dd3ea

Please sign in to comment.