Skip to content

Commit

Permalink
allow setting the storageClass for /tmp and /app/tmp volumes (#89)
Browse files Browse the repository at this point in the history
* charts/openproject/templates/_helpers.tpl: use .Values.persistence.storageClassName for /tmp and /app/tmp volumes, if it is defined

* charts/openproject/values.yaml: define empty tmpStorageClassName

* Create gorgeous-snakes-drum.md

* Update gorgeous-snakes-drum.md

---------

Co-authored-by: Oliver Günther <[email protected]>
  • Loading branch information
johanneskastl and oliverguenther authored Jul 22, 2024
1 parent cb16b87 commit 6be6b9c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-snakes-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/helm-charts": minor
---

- allow setting `tmpStorageClassName` for /tmp and /app/tmp volumes
6 changes: 6 additions & 0 deletions charts/openproject/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ securityContext:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
{{- if or .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
storageClassName: {{ coalesce .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
{{- end }}
resources:
requests:
storage: {{ .Values.openproject.tmpVolumesStorage }}
Expand All @@ -103,6 +106,9 @@ securityContext:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
{{- if or .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
storageClassName: {{ coalesce .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
{{- end }}
resources:
requests:
storage: {{ .Values.openproject.tmpVolumesStorage }}
Expand Down
3 changes: 3 additions & 0 deletions charts/openproject/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ persistence:
## Define the class of PV.
storageClassName:

## Define the class of PV for the tmpVolumes.
tmpStorageClassName:

## Whether to use an S3-compatible object storage to store OpenProject attachments.
## If this is enabled, files will NOT be stored in the mounted volume configured in `persistence` above.
## The volume will not be used at all, so it `persistence.enabled` should be set to `false` in this case.
Expand Down

0 comments on commit 6be6b9c

Please sign in to comment.