Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow setting storageclass/annotations/labels for tmpVolumes #104

Merged
merged 4 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/djerfy-1712306928.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@openproject/helm-charts": major
---

- Rename persistance.tmpStorageClassName to openproject.tmpVolumesStorageClassName for consistency with other options
- Allow setting annotations for /tmp and /app/tmp volumes
- Allow setting labels for /tmp and /app/tmp volumes
28 changes: 24 additions & 4 deletions charts/openproject/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,20 @@ securityContext:
# see: https://github.com/kubernetes/kubernetes/issues/110835
ephemeral:
volumeClaimTemplate:
metadata:
creationTimestamp: null
{{- if .Values.openproject.tmpVolumesAnnotations }}
annotations:
{{ .Values.openproject.tmpVolumesAnnotations | toYaml }}
{{- end }}
{{- if .Values.openproject.tmpVolumesLabels }}
labels:
{{ .Values.openproject.tmpVolumesLabels | toYaml }}
{{- end }}
spec:
accessModes: ["ReadWriteOnce"]
{{- if or .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
storageClassName: {{ coalesce .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
{{- if or .Values.openproject.tmpVolumesStorageClassName .Values.persistence.storageClassName }}
storageClassName: {{ coalesce .Values.openproject.tmpVolumesStorageClassName .Values.persistence.storageClassName }}
{{- end }}
resources:
requests:
Expand All @@ -104,10 +114,20 @@ securityContext:
# see: https://github.com/kubernetes/kubernetes/issues/110835
ephemeral:
volumeClaimTemplate:
metadata:
creationTimestamp: null
{{- if .Values.openproject.tmpVolumesAnnotations }}
annotations:
{{ .Values.openproject.tmpVolumesAnnotations | toYaml }}
{{- end }}
{{- if .Values.openproject.tmpVolumesLabels }}
labels:
{{ .Values.openproject.tmpVolumesLabels | toYaml }}
{{- end }}
spec:
accessModes: ["ReadWriteOnce"]
{{- if or .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
storageClassName: {{ coalesce .Values.persistence.tmpStorageClassName .Values.persistence.storageClassName }}
{{- if or .Values.openproject.tmpVolumesStorageClassName .Values.persistence.storageClassName }}
storageClassName: {{ coalesce .Values.openproject.tmpVolumesStorageClassName .Values.persistence.storageClassName }}
{{- end }}
resources:
requests:
Expand Down
18 changes: 14 additions & 4 deletions charts/openproject/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,22 @@ openproject:
#
useTmpVolumes:

## customize the tmp storage mount sizes
## Define the tmp storage sizes
#
tmpVolumesStorage: "5Gi"

## Define the class of the tmp storage
#
tmpVolumesStorageClassName:

## Define custom annotations of tmp storage
#
tmpVolumesAnnotations: {}

## Define custom labels of tmp storage
#
tmpVolumesLabels: {}

## Whether to allocate persistent volume disk for the data directory.
## In case of node failure, the node data directory will still persist.
##
Expand Down Expand Up @@ -390,9 +403,6 @@ 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
Loading