From 2f4736a05a41ebceb70e8fdd001861eae7e93156 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Nascimento Date: Thu, 26 Dec 2019 13:21:41 -0300 Subject: [PATCH 1/2] Added extraVolumes and extraVolumeMounts --- bitnami/mariadb-galera/Chart.yaml | 2 +- bitnami/mariadb-galera/README.md | 2 + .../mariadb-galera/templates/statefulset.yaml | 6 +++ bitnami/mariadb-galera/values-production.yaml | 47 +++++++++++++++++++ bitnami/mariadb-galera/values.yaml | 47 +++++++++++++++++++ 5 files changed, 103 insertions(+), 1 deletion(-) diff --git a/bitnami/mariadb-galera/Chart.yaml b/bitnami/mariadb-galera/Chart.yaml index 29d2969d4..7454840bc 100644 --- a/bitnami/mariadb-galera/Chart.yaml +++ b/bitnami/mariadb-galera/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mariadb-galera -version: 0.5.6 +version: 0.6.0 appVersion: 10.4.11 description: MariaDB Galera is a multi-master database cluster solution for synchronous replication and high availability. keywords: diff --git a/bitnami/mariadb-galera/README.md b/bitnami/mariadb-galera/README.md index d6f041565..76d8af0e1 100644 --- a/bitnami/mariadb-galera/README.md +++ b/bitnami/mariadb-galera/README.md @@ -130,6 +130,8 @@ The following table lists the configurable parameters of the MariaDB Galera char | `persistence.size` | Persistent Volume Size | `8Gi` | | `extraInitContainers` | Additional init containers (this value is evaluated as a template) | `[]` | | `extraContainers` | Additional containers (this value is evaluated as a template) | `[]` | +| `extraVolumes` | Extra volumes | | +| `extraVolumeMounts` | Mount extra volume(s) | | | `resources` | CPU/Memory resource requests/limits for node | `{}` | | `livenessProbe.enabled` | Turn on and off liveness probe | `true` | | `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `120` | diff --git a/bitnami/mariadb-galera/templates/statefulset.yaml b/bitnami/mariadb-galera/templates/statefulset.yaml index 9f7fdf3f9..353c1ea44 100644 --- a/bitnami/mariadb-galera/templates/statefulset.yaml +++ b/bitnami/mariadb-galera/templates/statefulset.yaml @@ -178,6 +178,9 @@ spec: mountPath: /opt/bitnami/mariadb/conf/my.cnf subPath: my.cnf {{- end }} + {{- if .Values.extraVolumeMounts }} + {{- toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} {{- if .Values.metrics.enabled }} - name: metrics image: {{ template "mariadb-galera.metrics.image" . }} @@ -230,6 +233,9 @@ spec: configMap: name: {{ template "mariadb-galera.initdbScriptsCM" . }} {{- end }} + {{- if .Values.extraVolumes }} + {{- toYaml .Values.extraVolumes | nindent 8 }} + {{- end }} {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }} - name: data persistentVolumeClaim: diff --git a/bitnami/mariadb-galera/values-production.yaml b/bitnami/mariadb-galera/values-production.yaml index e694448bf..db8d6ac1b 100644 --- a/bitnami/mariadb-galera/values-production.yaml +++ b/bitnami/mariadb-galera/values-production.yaml @@ -261,6 +261,12 @@ mariadbConfiguration: |- log-queries-not-using-indexes=1 slow-query-log=1 + ## SSL + ## Use extraVolumes and extraVolumeMounts to mount /certs filesystem + # ssl_ca=/certs/ca.pem + # ssl_cert=/certs/server-cert.pem + # ssl_key=/certs/server-key.pem + [galera] wsrep_on=ON wsrep_provider=/opt/bitnami/mariadb/lib/libgalera_smm.so @@ -276,6 +282,26 @@ mariadbConfiguration: |- [mariadb] plugin_load_add=auth_pam + ## Data-at-Rest Encryption + ## Use extraVolumes and extraVolumeMounts to mount /encryption filesystem + # plugin_load_add=file_key_management + # file_key_management_filename=/encryption/keyfile.enc + # file_key_management_filekey=FILE:/encryption/keyfile.key + # file_key_management_encryption_algorithm=AES_CTR + # encrypt_binlog=ON + # encrypt_tmp_files=ON + + ## InnoDB/XtraDB Encryption + # innodb_encrypt_tables=ON + # innodb_encrypt_temporary_tables=ON + # innodb_encrypt_log=ON + # innodb_encryption_threads=4 + # innodb_encryption_rotate_key_age=1 + + ## Aria Encryption + # aria_encrypt_tables=ON + # encrypt_tmp_disk_tables=ON + ## ConfigMap with MariaDB configuration ## NOTE: This will override mariadbConfiguration ## @@ -372,6 +398,27 @@ extraInitContainers: [] ## extraContainers: [] +## extraVolumes and extraVolumeMounts allows you to mount other volumes +## Example Use Cases: +## mount certificates to enable data-in-transit encryption +## mount keys for data-at-rest encryption using file plugin +# extraVolumes: +# - name: mariadb-certs +# secret: +# defaultMode: 288 +# secretName: mariadb-certs +# - name: mariadb-encryption +# secret: +# defaultMode: 288 +# secretName: mariadb-encryption +# extraVolumeMounts: +# - name: mariadb-certs +# mountPath: /certs +# readOnly: true +# - name: mariadb-encryption +# mountPath: /encryption +# readOnly: true + ## MariaDB Galera containers' resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## diff --git a/bitnami/mariadb-galera/values.yaml b/bitnami/mariadb-galera/values.yaml index 9b00bdc63..d87d38761 100644 --- a/bitnami/mariadb-galera/values.yaml +++ b/bitnami/mariadb-galera/values.yaml @@ -261,6 +261,12 @@ mariadbConfiguration: |- log-queries-not-using-indexes=1 slow-query-log=1 + ## SSL + ## Use extraVolumes and extraVolumeMounts to mount /certs filesystem + # ssl_ca=/certs/ca.pem + # ssl_cert=/certs/server-cert.pem + # ssl_key=/certs/server-key.pem + [galera] wsrep_on=ON wsrep_provider=/opt/bitnami/mariadb/lib/libgalera_smm.so @@ -276,6 +282,26 @@ mariadbConfiguration: |- [mariadb] plugin_load_add=auth_pam + ## Data-at-Rest Encryption + ## Use extraVolumes and extraVolumeMounts to mount /encryption filesystem + # plugin_load_add=file_key_management + # file_key_management_filename=/encryption/keyfile.enc + # file_key_management_filekey=FILE:/encryption/keyfile.key + # file_key_management_encryption_algorithm=AES_CTR + # encrypt_binlog=ON + # encrypt_tmp_files=ON + + ## InnoDB/XtraDB Encryption + # innodb_encrypt_tables=ON + # innodb_encrypt_temporary_tables=ON + # innodb_encrypt_log=ON + # innodb_encryption_threads=4 + # innodb_encryption_rotate_key_age=1 + + ## Aria Encryption + # aria_encrypt_tables=ON + # encrypt_tmp_disk_tables=ON + ## ConfigMap with MariaDB configuration ## NOTE: This will override mariadbConfiguration ## @@ -372,6 +398,27 @@ extraInitContainers: [] ## extraContainers: [] +## extraVolumes and extraVolumeMounts allows you to mount other volumes +## Example Use Cases: +## mount certificates to enable data-in-transit encryption +## mount keys for data-at-rest encryption using file plugin +# extraVolumes: +# - name: mariadb-certs +# secret: +# defaultMode: 288 +# secretName: mariadb-certs +# - name: mariadb-encryption +# secret: +# defaultMode: 288 +# secretName: mariadb-encryption +# extraVolumeMounts: +# - name: mariadb-certs +# mountPath: /certs +# readOnly: true +# - name: mariadb-encryption +# mountPath: /encryption +# readOnly: true + ## MariaDB Galera containers' resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## From 70189973e398e2e3637b47ddf7ffb0df8145280f Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Nascimento Date: Fri, 27 Dec 2019 09:13:58 -0300 Subject: [PATCH 2/2] 'nil' to Default description --- bitnami/mariadb-galera/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitnami/mariadb-galera/README.md b/bitnami/mariadb-galera/README.md index 76d8af0e1..d2218ac34 100644 --- a/bitnami/mariadb-galera/README.md +++ b/bitnami/mariadb-galera/README.md @@ -130,8 +130,8 @@ The following table lists the configurable parameters of the MariaDB Galera char | `persistence.size` | Persistent Volume Size | `8Gi` | | `extraInitContainers` | Additional init containers (this value is evaluated as a template) | `[]` | | `extraContainers` | Additional containers (this value is evaluated as a template) | `[]` | -| `extraVolumes` | Extra volumes | | -| `extraVolumeMounts` | Mount extra volume(s) | | +| `extraVolumes` | Extra volumes | `nil` | +| `extraVolumeMounts` | Mount extra volume(s) | `nil` | | `resources` | CPU/Memory resource requests/limits for node | `{}` | | `livenessProbe.enabled` | Turn on and off liveness probe | `true` | | `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `120` |