diff --git a/charts/mattermost-team-edition/Chart.yaml b/charts/mattermost-team-edition/Chart.yaml index e8ce4449..9a78b48e 100644 --- a/charts/mattermost-team-edition/Chart.yaml +++ b/charts/mattermost-team-edition/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Mattermost Team Edition server. name: mattermost-team-edition -version: 3.6.2 +version: 3.7.0 appVersion: 5.13.2 keywords: - mattermost diff --git a/charts/mattermost-team-edition/templates/deployment.yaml b/charts/mattermost-team-edition/templates/deployment.yaml index b38ffcc1..2c314bbe 100644 --- a/charts/mattermost-team-edition/templates/deployment.yaml +++ b/charts/mattermost-team-edition/templates/deployment.yaml @@ -73,6 +73,8 @@ spec: subPath: config.json - mountPath: /mattermost/data name: mattermost-data + - mountPath: /mattermost/{{ trimPrefix "./" .Values.configJSON.PluginSettings.Directory }} + name: mattermost-plugins resources: {{- .Values.resources | toYaml | nindent 12 }} volumes: @@ -86,3 +88,14 @@ spec: {{ else }} emptyDir: {} {{ end }} + - name: mattermost-plugins + {{ if .Values.persistence.plugins.enabled }} + persistentVolumeClaim: + {{ if .Values.persistence.plugins.existingClaim }} + claimName: {{.Values.persistence.data.existingClaim }} + {{ else }} + claimName: {{ default (include "mattermost-team-edition.fullname" .) }}-plugins + {{ end }} + {{ else }} + emptyDir: {} + {{ end }} diff --git a/charts/mattermost-team-edition/templates/pvc-plugins.yaml b/charts/mattermost-team-edition/templates/pvc-plugins.yaml new file mode 100644 index 00000000..134eb152 --- /dev/null +++ b/charts/mattermost-team-edition/templates/pvc-plugins.yaml @@ -0,0 +1,28 @@ +{{- if and .Values.persistence.plugins.enabled (not .Values.persistence.plugins.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "mattermost-team-edition.fullname" . }}-plugins + labels: + app.kubernetes.io/name: {{ include "mattermost-team-edition.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "mattermost-team-edition.chart" . }} + annotations: + {{- range $key, $value := .Values.persistence.plugins.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + accessModes: + - {{ .Values.persistence.plugins.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.plugins.size | quote }} +{{- if .Values.persistence.plugins.storageClass }} +{{- if (eq "-" .Values.persistence.plugins.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.plugins.storageClass }}" +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/mattermost-team-edition/values.yaml b/charts/mattermost-team-edition/values.yaml index ea59f10f..be70202f 100644 --- a/charts/mattermost-team-edition/values.yaml +++ b/charts/mattermost-team-edition/values.yaml @@ -30,6 +30,15 @@ persistence: # storageClass: accessMode: ReadWriteOnce # existingClaim: "" + plugins: + enabled: true + size: 1Gi + ## If defined, volume.beta.kubernetes.io/storage-class: + ## Default: volume.alpha.kubernetes.io/storage-class: default + ## + # storageClass: + accessMode: ReadWriteOnce + # existingClaim: "" service: type: ClusterIP