[stable/phabricator] Add global StorageClass to phabricator (#16429)

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>
This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2019-08-20 03:49:59 -07:00
committed by Kubernetes Prow Robot
parent 9c57b8f9c2
commit dc2a2677f4
5 changed files with 24 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: phabricator
version: 6.2.2
version: 6.3.0
appVersion: 2019.32.0
description: Collection of open source web applications that help software companies build better software.
keywords:
+1
View File
@@ -51,6 +51,7 @@ The following table lists the configurable parameters of the Phabricator chart a
|----------------------------------------|--------------------------------------------------|----------------------------------------------------------|
| `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` | Phabricator image registry | `docker.io` |
| `image.repository` | Phabricator image name | `bitnami/phabricator` |
| `image.tag` | Phabricator image tag | `{TAG_NAME}` |
+20
View File
@@ -132,3 +132,23 @@ imagePullSecrets:
{{- end }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "phabricator.storageClass" -}}
{{- $storageClass := "" }}
{{- if .Values.persistence.phabricator.storageClass -}}
{{- $storageClass = .Values.persistence.phabricator.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 -}}
@@ -14,11 +14,5 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.phabricator.size | quote }}
{{- if .Values.persistence.phabricator.storageClass }}
{{- if (eq "-" .Values.persistence.phabricator.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.phabricator.storageClass }}"
{{- end }}
{{- end }}
storageClassName: {{ include "phabricator.storageClass" . }}
{{- end -}}
+1
View File
@@ -6,6 +6,7 @@
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## Bitnami Phabricator image version
## ref: https://hub.docker.com/r/bitnami/phabricator/tags/