[stable/drupal] Add global StorageClass to drupal (#16433)

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>
This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2019-08-20 05:35:45 -07:00
committed by Kubernetes Prow Robot
parent 0639c2d261
commit 39c93f97f2
5 changed files with 24 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: drupal
version: 5.0.0
version: 5.1.0
appVersion: 8.7.5
description: One of the most versatile open source content management systems.
keywords:
+1
View File
@@ -51,6 +51,7 @@ The following table lists the configurable parameters of the Drupal chart and th
| --------------------------------- | ------------------------------------------ | --------------------------------------------------------- |
| `global.imageRegistry` | Global Docker image registry | `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` | Drupal image registry | `docker.io` |
| `image.repository` | Drupal Image name | `bitnami/drupal` |
| `image.tag` | Drupal Image tag | `{TAG_NAME}` |
+20
View File
@@ -118,3 +118,23 @@ imagePullSecrets:
{{- end }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "drupal.storageClass" -}}
{{- $storageClass := "" }}
{{- if .Values.persistence.drupal.storageClass -}}
{{- $storageClass = .Values.persistence.drupal.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
@@ -17,11 +17,5 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.drupal.size | quote }}
{{- if and .Values.persistence.drupal.storageClass (not .Values.persistence.drupal.hostPath) -}}
{{- if (eq "-" .Values.persistence.drupal.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.drupal.storageClass }}"
{{- end }}
{{- end }}
storageClassName: {{ include "drupal.storageClass" . }}
{{- end -}}
+1
View File
@@ -6,6 +6,7 @@
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## Bitnami Drupal image version
## ref: https://hub.docker.com/r/bitnami/drupal/tags/