[stable/mariadb] Allow using existingClaim as 'data' directory (#10378)

* [stable/mariadb] Allow using existingClaim as 'data' directory

Signed-off-by: juan131 <juan@bitnami.com>

* Bump patch version

Signed-off-by: juan131 <juan@bitnami.com>

* Fix template error

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
Juan Ariza Toledano
2019-01-03 07:45:32 -08:00
committed by Kubernetes Prow Robot
parent e02324a2ba
commit e60fc85307
5 changed files with 18 additions and 23 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: mariadb
version: 5.3.0
version: 5.3.1
appVersion: 10.1.37
description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
keywords:
+2 -2
View File
@@ -77,9 +77,9 @@ The following table lists the configurable parameters of the MariaDB chart and t
| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` |
| `master.antiAffinity` | Master pod anti-affinity policy | `soft` |
| `master.tolerations` | List of node taints to tolerate (master) | `[]` |
| `master.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` |
| `master.persistence.enabled` | Enable persistence using PVC | `true` |
| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` |
| `master.persistence.mountPath` | Configure existing `PersistentVolumeClaim` mount path | `""` |
| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` |
| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` |
| `master.persistence.storageClass` | Persistent Volume Storage Class | `` |
| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
@@ -142,20 +142,16 @@ spec:
{{ toYaml .Values.master.resources | indent 10 }}
volumeMounts:
- name: data
mountPath: /bitnami/mariadb
mountPath: {{ .Values.master.persistence.mountPath }}
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }}
- name: custom-init-scripts
mountPath: /docker-entrypoint-initdb.d
{{- end }}
{{- if .Values.master.config }}
{{- if .Values.master.config }}
- name: config
mountPath: /opt/bitnami/mariadb/conf/my.cnf
subPath: my.cnf
{{- if .Values.master.persistence.existingClaim }}
- name: {{ .Values.master.persistence.existingClaim }}
mountPath: {{ .Values.master.persistence.mountPath }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.metrics.enabled }}
- name: metrics
image: {{ template "metrics.image" . }}
@@ -186,11 +182,6 @@ spec:
{{ toYaml .Values.metrics.resources | indent 10 }}
{{- end }}
volumes:
{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }}
- name: {{ .Values.master.persistence.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.master.persistence.existingClaim }}
{{ end }}
{{- if .Values.master.config }}
- name: config
configMap:
@@ -201,7 +192,14 @@ spec:
configMap:
name: {{ template "mariadb.initdbScriptsCM" . }}
{{- end }}
{{- if .Values.master.persistence.enabled }}
{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.master.persistence.existingClaim }}
{{- else if not .Values.master.persistence.enabled }}
- name: data
emptyDir: {}
{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: data
@@ -225,7 +223,4 @@ spec:
storageClassName: {{ .Values.master.persistence.storageClass | quote }}
{{- end }}
{{- end }}
{{- else }}
- name: "data"
emptyDir: {}
{{- end }}
+2 -2
View File
@@ -138,7 +138,7 @@ master:
enabled: true
# Enable persistence using an existing PVC
# existingClaim:
# mountPath:
mountPath: /bitnami/mariadb
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
@@ -149,7 +149,7 @@ master:
# storageClass: "-"
## Persistent Volume Claim annotations
##
annotations:
annotations: {}
## Persistent Volume Access Mode
##
accessModes:
+2 -2
View File
@@ -138,7 +138,7 @@ master:
enabled: true
# Enable persistence using an existing PVC
# existingClaim:
# mountPath:
mountPath: /bitnami/mariadb
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
@@ -149,7 +149,7 @@ master:
# storageClass: "-"
## Persistent Volume Claim annotations
##
annotations:
annotations: {}
## Persistent Volume Access Mode
##
accessModes: