diff --git a/incubator/mariadb-cluster/templates/master-deploy.yaml b/incubator/mariadb-cluster/templates/master-deploy.yaml index 92dc405bb..0fb99b07e 100644 --- a/incubator/mariadb-cluster/templates/master-deploy.yaml +++ b/incubator/mariadb-cluster/templates/master-deploy.yaml @@ -142,9 +142,11 @@ spec: {{ toYaml .Values.metrics.resources | indent 10 }} {{- end }} volumes: + {{- if .Values.master.config }} - name: config configMap: name: {{ template "master.fullname" . }} + {{- end }} - name: data {{- if .Values.master.persistence.enabled }} persistentVolumeClaim: diff --git a/incubator/mariadb-cluster/templates/slave-statefulset.yaml b/incubator/mariadb-cluster/templates/slave-statefulset.yaml index b2e6afa51..e850bc149 100644 --- a/incubator/mariadb-cluster/templates/slave-statefulset.yaml +++ b/incubator/mariadb-cluster/templates/slave-statefulset.yaml @@ -149,14 +149,21 @@ spec: {{ toYaml .Values.metrics.resources | indent 10 }} {{- end }} volumes: + {{- if .Values.slave.config }} - name: config configMap: name: {{ template "slave.fullname" . }} - - volumeClaimTemplates: + {{- end }} {{- if .Values.slave.persistence.enabled }} + volumeClaimTemplates: - metadata: name: data + labels: + app: "{{ template "name" . }}" + chart: {{ template "mariadb.chart" . }} + component: "slave" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" spec: accessModes: {{- range .Values.slave.persistence.accessModes }} @@ -165,6 +172,15 @@ spec: resources: requests: storage: {{ .Values.slave.persistence.size | quote }} - storageClassName: "standard" + {{- if .Values.slave.persistence.storageClass }} + {{- if (eq "-" .Values.slave.persistence.storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: {{ .Values.slave.persistence.storageClass | quote }} + {{- end }} + {{- end }} + {{- else }} + - name: "data" + emptyDir: {} {{- end }} {{- end }} diff --git a/incubator/mariadb-cluster/values-production.yaml b/incubator/mariadb-cluster/values-production.yaml index 0d46f5f7e..2f83d1b0d 100644 --- a/incubator/mariadb-cluster/values-production.yaml +++ b/incubator/mariadb-cluster/values-production.yaml @@ -222,9 +222,11 @@ slave: metrics: enabled: false - image: prom/mysqld-exporter - imageTag: v0.10.0 - imagePullPolicy: IfNotPresent + image: + registry: docker.io + repository: prom/mysqld-exporter + tag: v0.10.0 + pullPolicy: IfNotPresent resources: {} annotations: prometheus.io/scrape: "true" diff --git a/incubator/mariadb-cluster/values.yaml b/incubator/mariadb-cluster/values.yaml index fb84067f4..97cce3f3d 100644 --- a/incubator/mariadb-cluster/values.yaml +++ b/incubator/mariadb-cluster/values.yaml @@ -222,9 +222,11 @@ slave: metrics: enabled: false - image: prom/mysqld-exporter - imageTag: v0.10.0 - imagePullPolicy: IfNotPresent + image: + registry: docker.io + repository: prom/mysqld-exporter + tag: v0.10.0 + pullPolicy: IfNotPresent resources: {} annotations: prometheus.io/scrape: "true"