From 2d3be4e547007dee68ede4afccf4bea1dc895291 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 5 Jan 2021 06:38:52 -0500 Subject: [PATCH] [bitnami/wordpress] support custom datasource for PVC (#4879) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add dataSource customization * Bump version * Fix typo * Update bitnami/wordpress/README.md Co-authored-by: Miguel Ángel Cabrera Miñagorri Co-authored-by: chris13524 Co-authored-by: Miguel Ángel Cabrera Miñagorri --- bitnami/wordpress/Chart.yaml | 2 +- bitnami/wordpress/README.md | 1 + bitnami/wordpress/templates/pvc.yaml | 3 +++ bitnami/wordpress/values-production.yaml | 2 ++ bitnami/wordpress/values.yaml | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bitnami/wordpress/Chart.yaml b/bitnami/wordpress/Chart.yaml index dcb8c8564..12cb6bcdf 100755 --- a/bitnami/wordpress/Chart.yaml +++ b/bitnami/wordpress/Chart.yaml @@ -31,4 +31,4 @@ name: wordpress sources: - https://github.com/bitnami/bitnami-docker-wordpress - http://www.wordpress.com/ -version: 10.2.1 +version: 10.3.0 diff --git a/bitnami/wordpress/README.md b/bitnami/wordpress/README.md index acae64c0b..81c7d33a0 100644 --- a/bitnami/wordpress/README.md +++ b/bitnami/wordpress/README.md @@ -180,6 +180,7 @@ The following table lists the configurable parameters of the WordPress chart and | `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) | | `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | | `persistence.size` | PVC Storage Request | `10Gi` | +| `persistence.dataSource` | PVC data source | `{}` | ### Database parameters diff --git a/bitnami/wordpress/templates/pvc.yaml b/bitnami/wordpress/templates/pvc.yaml index b9d9d5312..ff104533e 100644 --- a/bitnami/wordpress/templates/pvc.yaml +++ b/bitnami/wordpress/templates/pvc.yaml @@ -17,4 +17,7 @@ spec: requests: storage: {{ .Values.persistence.size | quote }} {{- include "wordpress.storageClass" . | nindent 2 }} + {{- if .Values.persistence.dataSource }} + dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.dataSource "context" $) | nindent 4 }} + {{- end }} {{- end }} diff --git a/bitnami/wordpress/values-production.yaml b/bitnami/wordpress/values-production.yaml index aac3817b5..30e25f2a6 100644 --- a/bitnami/wordpress/values-production.yaml +++ b/bitnami/wordpress/values-production.yaml @@ -519,6 +519,8 @@ persistence: # existingClaim: your-claim accessMode: ReadWriteMany size: 10Gi + ## Custom dataSource + dataSource: {} ## Wordpress Pod Disruption Budget configuration ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ diff --git a/bitnami/wordpress/values.yaml b/bitnami/wordpress/values.yaml index 97b3cbd42..2e4ed431e 100644 --- a/bitnami/wordpress/values.yaml +++ b/bitnami/wordpress/values.yaml @@ -519,6 +519,8 @@ persistence: # existingClaim: your-claim accessMode: ReadWriteOnce size: 10Gi + ## Custom dataSource + dataSource: {} ## Wordpress Pod Disruption Budget configuration ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/