diff --git a/stable/drupal/Chart.yaml b/stable/drupal/Chart.yaml index dbb1f2a9b4..a567868008 100644 --- a/stable/drupal/Chart.yaml +++ b/stable/drupal/Chart.yaml @@ -1,5 +1,5 @@ name: drupal -version: 0.3.10 +version: 0.4.0 description: One of the most versatile open source content management systems. keywords: - drupal diff --git a/stable/drupal/README.md b/stable/drupal/README.md index bae26566d4..c5d0512213 100644 --- a/stable/drupal/README.md +++ b/stable/drupal/README.md @@ -48,17 +48,17 @@ The following tables lists the configurable parameters of the Drupal chart and t | Parameter | Description | Default | | --------------------------------- | ------------------------------------- | --------------------------------------------------------- | | `image` | Drupal image | `bitnami/drupal:{VERSION}` | -| `imagePullPolicy` | Image pull policy | `Always` if `image` tag is `latest`, else `IfNotPresent` | +| `imagePullPolicy` | Image pull policy | `IfNotPresent` | | `drupalUsername` | User of the application | `user` | -| `drupalPassword` | Application password | `bitnami` | +| `drupalPassword` | Application password | _random 10 character long alphanumeric string_ | | `drupalEmail` | Admin email | `user@example.com` | | `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` | | `serviceType` | Kubernetes Service type | `LoadBalancer` | | `persistence.enabled` | Enable persistence using PVC | `true` | -| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `generic` | +| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `nil` (uses alpha storage class annotation) | | `persistence.apache.accessMode` | PVC Access Mode for Apache volume | `ReadWriteOnce` | | `persistence.apache.size` | PVC Storage Request for Apache volume | `1Gi` | -| `persistence.drupal.storageClass` | PVC Storage Class for Drupal volume | `generic` | +| `persistence.drupal.storageClass` | PVC Storage Class for Drupal volume | `nil` (uses alpha storage class annotation) | | `persistence.drupal.accessMode` | PVC Access Mode for Drupal volume | `ReadWriteOnce` | | `persistence.drupal.size` | PVC Storage Request for Drupal volume | `8Gi` | | `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` | diff --git a/stable/drupal/requirements.lock b/stable/drupal/requirements.lock index 9a46c1c826..3daf5a98e7 100644 --- a/stable/drupal/requirements.lock +++ b/stable/drupal/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: mariadb repository: https://kubernetes-charts.storage.googleapis.com/ - version: 0.5.2 -digest: sha256:ae046856c4ffb4d8eafbf3c0f7281dd28b28f32323115e045336674cfe1ccc56 -generated: 2016-11-18T16:08:14.043414269-08:00 + version: 0.5.6 +digest: sha256:1b3aad03b4383d1a24dfbfef6ba1beb45f7ace2baa399c66f5a4d56d0f7bc717 +generated: 2017-01-05T17:18:55.137378629Z diff --git a/stable/drupal/requirements.yaml b/stable/drupal/requirements.yaml index 9590b37793..9303bd388a 100644 --- a/stable/drupal/requirements.yaml +++ b/stable/drupal/requirements.yaml @@ -1,4 +1,4 @@ dependencies: - name: mariadb - version: 0.5.2 + version: 0.5.x repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/stable/drupal/templates/NOTES.txt b/stable/drupal/templates/NOTES.txt index e4e4be76a2..eb8b761a36 100644 --- a/stable/drupal/templates/NOTES.txt +++ b/stable/drupal/templates/NOTES.txt @@ -27,5 +27,5 @@ 2. Login with the following credentials - Username: {{ .Values.drupalUsername }} - Password: {{ .Values.drupalPassword }} + echo Username: {{ .Values.drupalUsername }} + echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.drupal-password}" | base64 --decode) diff --git a/stable/drupal/templates/_helpers.tpl b/stable/drupal/templates/_helpers.tpl index 9f4560e75d..3d76d82dd6 100644 --- a/stable/drupal/templates/_helpers.tpl +++ b/stable/drupal/templates/_helpers.tpl @@ -3,7 +3,7 @@ Expand the name of the chart. */}} {{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -12,7 +12,7 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this */}} {{- define "fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 24 -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -20,17 +20,5 @@ Create a default fully qualified app name. We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "mariadb.fullname" -}} -{{- printf "%s-%s" .Release.Name "mariadb" | trunc 24 -}} -{{- end -}} - -{{- define "toYaml" -}} - {{- range $key, $value := . -}} - {{- $map := kindIs "map" $value -}} - {{- if $map }} -{{ $key }}: - {{- include "toYaml" $value | indent 2 }} - {{- else }} -{{ $key }}: {{ $value }} - {{- end }} - {{- end -}} +{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}} {{- end -}} diff --git a/stable/drupal/templates/apache-pvc.yaml b/stable/drupal/templates/apache-pvc.yaml index 39fd689744..166feb8b9f 100644 --- a/stable/drupal/templates/apache-pvc.yaml +++ b/stable/drupal/templates/apache-pvc.yaml @@ -9,7 +9,11 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" annotations: - volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }} + {{- if .Values.persistence.apache.storageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }} + {{- else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} spec: accessModes: - {{ .Values.persistence.apache.accessMode | quote }} diff --git a/stable/drupal/templates/deployment.yaml b/stable/drupal/templates/deployment.yaml index d6d0bdd45f..4df933232d 100644 --- a/stable/drupal/templates/deployment.yaml +++ b/stable/drupal/templates/deployment.yaml @@ -55,7 +55,7 @@ spec: initialDelaySeconds: 5 timeoutSeconds: 1 resources: - {{ include "toYaml" .Values.resources | indent 10 }} +{{ toYaml .Values.resources | indent 10 }} volumeMounts: - name: drupal-data mountPath: /bitnami/drupal diff --git a/stable/drupal/templates/drupal-pvc.yaml b/stable/drupal/templates/drupal-pvc.yaml index 558facde4a..5d887964f1 100644 --- a/stable/drupal/templates/drupal-pvc.yaml +++ b/stable/drupal/templates/drupal-pvc.yaml @@ -9,7 +9,11 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" annotations: - volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.drupal.storageClass | quote }} + {{- if .Values.persistence.drupal.storageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.drupal.storageClass | quote }} + {{- else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} spec: accessModes: - {{ .Values.persistence.drupal.accessMode | quote }} diff --git a/stable/drupal/templates/secrets.yaml b/stable/drupal/templates/secrets.yaml index 58e9765436..fa0a352c1b 100644 --- a/stable/drupal/templates/secrets.yaml +++ b/stable/drupal/templates/secrets.yaml @@ -9,4 +9,8 @@ metadata: heritage: "{{ .Release.Service }}" type: Opaque data: + {{ if .Values.drupalPassword }} drupal-password: {{ default "" .Values.drupalPassword | b64enc | quote }} + {{ else }} + drupal-password: {{ randAlphaNum 10 | b64enc | quote }} + {{ end }} diff --git a/stable/drupal/values.yaml b/stable/drupal/values.yaml index 86fc628755..63417014d5 100644 --- a/stable/drupal/values.yaml +++ b/stable/drupal/values.yaml @@ -4,10 +4,9 @@ image: bitnami/drupal:8.2.4-r0 ## Specify a imagePullPolicy -## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## -# imagePullPolicy: +imagePullPolicy: IfNotPresent ## User of the application ## ref: https://github.com/bitnami/bitnami-docker-drupal#configuration @@ -15,9 +14,10 @@ image: bitnami/drupal:8.2.4-r0 drupalUsername: user ## Application password +## Defaults to a random 10-character alphanumeric string if not set ## ref: https://github.com/bitnami/bitnami-docker-drupal#configuration ## -drupalPassword: bitnami +# drupalPassword: ## Admin email ## ref: https://github.com/bitnami/bitnami-docker-drupal#configuration @@ -38,7 +38,10 @@ mariadb: ## persistence: enabled: true - storageClass: generic + ## If defined, volume.beta.kubernetes.io/storage-class: + ## Default: volume.alpha.kubernetes.io/storage-class: default + ## + # storageClass: generic accessMode: ReadWriteOnce size: 8Gi @@ -53,11 +56,17 @@ serviceType: LoadBalancer persistence: enabled: true apache: - storageClass: generic + ## If defined, volume.beta.kubernetes.io/storage-class: + ## Default: volume.alpha.kubernetes.io/storage-class: default + ## + # storageClass: generic accessMode: ReadWriteOnce size: 1Gi drupal: - storageClass: generic + ## If defined, volume.beta.kubernetes.io/storage-class: + ## Default: volume.alpha.kubernetes.io/storage-class: default + ## + # storageClass: generic accessMode: ReadWriteOnce size: 8Gi