diff --git a/stable/redmine/Chart.yaml b/stable/redmine/Chart.yaml index 5b8f2f5b97..9a86aff7fc 100644 --- a/stable/redmine/Chart.yaml +++ b/stable/redmine/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: redmine -version: 12.0.1 +version: 12.1.0 appVersion: 4.0.4 description: A flexible project management web application. keywords: diff --git a/stable/redmine/README.md b/stable/redmine/README.md index 37974a5de4..86838e0fdb 100644 --- a/stable/redmine/README.md +++ b/stable/redmine/README.md @@ -59,6 +59,7 @@ The following table lists the configurable parameters of the Redmine chart and t | ----------------------------------- | ------------------------------------------ | ------------------------------------------------------- | | `global.imageRegistry` | Global Docker image registr y | `nil` | | `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | | `image.registry` | Redmine image registry | `docker.io` | | `image.repository` | Redmine image name | `bitnami/redmine` | | `image.tag` | Redmine image tag | `{TAG_NAME}` | diff --git a/stable/redmine/templates/_helpers.tpl b/stable/redmine/templates/_helpers.tpl index eea79fc458..edf36801cf 100644 --- a/stable/redmine/templates/_helpers.tpl +++ b/stable/redmine/templates/_helpers.tpl @@ -97,3 +97,23 @@ imagePullSecrets: {{- end }} {{- end -}} {{- end -}} + +{{/* +Return the proper Storage Class +*/}} +{{- define "redmine.storageClass" -}} +{{- $storageClass := "" }} +{{- if .Values.persistence.storageClass -}} + {{- $storageClass = .Values.persistence.storageClass -}} +{{- end -}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- $storageClass = .Values.global.storageClass -}} + {{- end -}} +{{- end -}} +{{- if (eq "-" $storageClass) -}} + {{- printf "\"\"" -}} +{{- else }} + {{- printf "%s" $storageClass -}} +{{- end -}} +{{- end -}} diff --git a/stable/redmine/templates/pvc.yaml b/stable/redmine/templates/pvc.yaml index 2dd5cf0830..41839cf021 100644 --- a/stable/redmine/templates/pvc.yaml +++ b/stable/redmine/templates/pvc.yaml @@ -14,11 +14,5 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} + storageClassName: {{ include "redmine.storageClass" . }} {{- end }} diff --git a/stable/redmine/values.yaml b/stable/redmine/values.yaml index 304d4928c9..918c687cef 100644 --- a/stable/redmine/values.yaml +++ b/stable/redmine/values.yaml @@ -6,6 +6,7 @@ # imageRegistry: myRegistryName # imagePullSecrets: # - myRegistryKeySecretName +# storageClass: myStorageClass ## Bitnami Redmine image version ## ref: https://hub.docker.com/r/bitnami/redmine/tags/