Skip to content

Commit

Permalink
use var volume for storage dir too (#197)
Browse files Browse the repository at this point in the history
Signed-off-by: André Bauer <[email protected]>
  • Loading branch information
monotek authored Jul 18, 2023
1 parent 3f7da1e commit fcd9150
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
12 changes: 6 additions & 6 deletions zammad/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: zammad
version: 9.0.4
appVersion: 6.0.0-32
version: 9.0.5
appVersion: 6.0.0-66
description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails.
home: https://zammad.org
icon: https://raw.githubusercontent.com/zammad/zammad-documentation/main/images/zammad_logo_600x520.png
Expand All @@ -16,17 +16,17 @@ maintainers:
dependencies:
- name: elasticsearch
repository: https://charts.bitnami.com/bitnami
version: 19.10.2
version: 19.10.3
condition: zammadConfig.elasticsearch.enabled
- name: memcached
version: 6.5.2
version: 6.5.4
repository: https://charts.bitnami.com/bitnami
condition: zammadConfig.memcached.enabled
- name: postgresql
version: 12.5.7
version: 12.6.4
repository: https://charts.bitnami.com/bitnami
condition: zammadConfig.postgresql.enabled
- name: redis
version: 17.11.5
version: 17.11.7
repository: https://charts.bitnami.com/bitnami
condition: zammadConfig.redis.enabled
6 changes: 4 additions & 2 deletions zammad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ Open your browser on <http://localhost:8080>

### From chart version 8.x to 9.0.0

- Zammads PVC changed to only hold contents of /opt/zammad/var instead of the whole Zammad content
- A new PVC `zammad-var` is created for this (the old zammad PVC is kept in case you need data from there)
- Zammads PVC changed to only hold contents of /opt/zammad/var & /opt/zammad/storage instead of the whole Zammad content
- A new PVC `zammad-var` is created for this
- the old zammad PVC is kept in case you need data from there (for example if you used filesystem storage)
- you need to copy the contents of /opt/zammad/storage to the new volume manually or restore them from a backup
- to update Zammad you have to delete the Zammad StatefulSet first, as the immutable volume config is changed
- `kubectl delete sts zammad`
- `helm upgrade zammad zammad/zammad`
Expand Down
12 changes: 10 additions & 2 deletions zammad/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ spec:
mountPath: /tmp
- name: {{ include "zammad.fullname" . }}-tmp
mountPath: /var/log/nginx
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/storage
- name: {{ .Chart.Name }}-railsserver
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down Expand Up @@ -302,6 +304,8 @@ spec:
volumeMounts:
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/var
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/storage
- name: {{ .Chart.Name }}-scheduler
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down Expand Up @@ -343,6 +347,8 @@ spec:
volumeMounts:
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/var
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/storage
- name: {{ .Chart.Name }}-websocket
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down Expand Up @@ -399,6 +405,8 @@ spec:
volumeMounts:
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/var
- name: {{ template "zammad.fullname" . }}-var
mountPath: /opt/zammad/storage
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand All @@ -414,11 +422,11 @@ spec:
- name: {{ include "zammad.fullname" . }}-tmp
{{- toYaml .Values.zammadConfig.tmpDirVolume | nindent 10 }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: {{ template "zammad.fullname" . }}
- name: {{ template "zammad.fullname" . }}-var
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "zammad.fullname" .) }}
{{- else if not .Values.persistence.enabled }}
- name: {{ template "zammad.fullname" . }}
- name: {{ template "zammad.fullname" . }}-var
emptyDir:
sizeLimit: {{ .Values.persistence.size | quote }}
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
Expand Down
2 changes: 1 addition & 1 deletion zammad/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ zammadConfig:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
readOnlyRootFilesystem: false
privileged: false
volumePermissions:
resources: {}
Expand Down

0 comments on commit fcd9150

Please sign in to comment.