Drupal updates (0.4.0) (#368)

* drupal: add alpha and beta storageclass annotation support

* drupal: use random password if not specified

* drupal: update MariaDB dep

* drupal: explicitly set imagePullPolicy

* drupal: increase resource name truncation and trim '-' suffix

* drupal: use built-in toYaml helper
This commit is contained in:
Adnan Abdulhussein
2017-01-09 20:38:11 -08:00
committed by Lachlan Evenson
parent 49ab0e912e
commit 2da00e9487
11 changed files with 44 additions and 35 deletions
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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` |
+3 -3
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
dependencies:
- name: mariadb
version: 0.5.2
version: 0.5.x
repository: https://kubernetes-charts.storage.googleapis.com/
+2 -2
View File
@@ -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)
+3 -15
View File
@@ -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 -}}
+5 -1
View File
@@ -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 }}
+1 -1
View File
@@ -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
+5 -1
View File
@@ -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 }}
+4
View File
@@ -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 }}
+15 -6
View File
@@ -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: <storageClass>
## 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: <storageClass>
## 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: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass: generic
accessMode: ReadWriteOnce
size: 8Gi