[stable/redmine] Add global StorageClass to redmine (#16411)

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>
This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2019-08-20 05:05:34 -07:00
committed by Kubernetes Prow Robot
parent 8f6192fdb7
commit cbd7038f7a
5 changed files with 24 additions and 8 deletions
+1 -1
View File
@@ -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:
+1
View File
@@ -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}` |
+20
View File
@@ -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 -}}
+1 -7
View File
@@ -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 }}
+1
View File
@@ -6,6 +6,7 @@
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## Bitnami Redmine image version
## ref: https://hub.docker.com/r/bitnami/redmine/tags/