feat: add pvc
This commit is contained in:
parent
ed29037cb0
commit
d42034c55f
@ -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:
|
||||
|
@ -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` | |
|
||||
|
@ -2,21 +2,18 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: { { include "stalwart-mail.fullname" . } }
|
||||
labels:
|
||||
{{- include "stalwart-mail.labels" . | nindent 4 }}
|
||||
labels: { { - include "stalwart-mail.labels" . | nindent 4 } }
|
||||
spec:
|
||||
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 }}"
|
||||
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||
imagePullPolicy: { { .Values.image.pullPolicy } }
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
@ -33,4 +30,4 @@ spec:
|
||||
volumes:
|
||||
- name: stalwart-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "stalwart-mail.fullname" . }}
|
||||
claimName: { { .Values.persistence.existingClaim | default (include "stalwart-mail.fullname" .) } }
|
||||
|
22
templates/pvc.yaml
Normal file
22
templates/pvc.yaml
Normal file
@ -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 }}
|
||||
|
13
values.yaml
13
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: <storageClass>
|
||||
## 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
|
||||
|
Loading…
Reference in New Issue
Block a user