diff --git a/incubator/mysqlha/Chart.yaml b/incubator/mysqlha/Chart.yaml index 085ac55a4d..9a03df8d7a 100644 --- a/incubator/mysqlha/Chart.yaml +++ b/incubator/mysqlha/Chart.yaml @@ -1,5 +1,5 @@ name: mysqlha -version: 0.1.3 +version: 0.2.0 appVersion: 5.7.13 description: MySQL cluster with a single master and zero or more slave replicas keywords: diff --git a/incubator/mysqlha/README.md b/incubator/mysqlha/README.md index 3d4dc876f5..360f2b9a58 100644 --- a/incubator/mysqlha/README.md +++ b/incubator/mysqlha/README.md @@ -8,7 +8,7 @@ This chart bootstraps a single master and multiple slave MySQL deployment on a [ ## Prerequisites -- Kubernetes 1.4+ with Beta APIs enabled +- Kubernetes 1.6+ - PV provisioner support in the underlying infrastructure ## Installing the Chart @@ -47,7 +47,8 @@ The following table lists the configurable parameters of the MySQL chart and the | `persistence.enabled` | Create a volume to store data | true | | `persistence.size` | Size of persistent volume claim | 10Gi | | `persistence.storageClass` | Type of persistent volume claim | `nil` | -| `persistence.accessMode` | ReadWriteOnce or ReadOnly | ReadWriteOnce | +| `persistence.accessModes` | Persistent volume access modes | `[ReadWriteOnce]` | +| `persistence.annotations` | Persistent volume annotations | `{}` | | `resources` | CPU/Memory resource requests/limits | Memory: `128Mi`, CPU: `100m` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/incubator/mysqlha/templates/statefulset.yaml b/incubator/mysqlha/templates/statefulset.yaml index d71937823a..65d5009d5b 100644 --- a/incubator/mysqlha/templates/statefulset.yaml +++ b/incubator/mysqlha/templates/statefulset.yaml @@ -223,22 +223,30 @@ spec: name: {{ template "fullname" . }} - name: scripts emptyDir: {} - {{- if eq .Values.persistence.enabled false }} - - name: data - emptyDir: {} - {{- end}} +{{- if .Values.persistence.enabled }} volumeClaimTemplates: - {{- if .Values.persistence.enabled }} - metadata: name: data annotations: - {{- if .Values.persistence.storageClass }} - volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }} - {{- end }} + {{- range $key, $value := .Values.persistence.annotations }} + {{ $key }}: {{ $value }} + {{- end }} spec: accessModes: - - {{ .Values.persistence.accessMode | quote }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} resources: requests: storage: {{ .Values.persistence.size | quote }} - {{- end }} \ No newline at end of file + {{- if .Values.persistence.storageClass }} + {{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" + {{- end }} + {{- end }} +{{- else }} + - name: data + emptyDir: {} +{{- end }} diff --git a/incubator/mysqlha/values.yaml b/incubator/mysqlha/values.yaml index 6b5b9eee36..64233ca7f5 100644 --- a/incubator/mysqlha/values.yaml +++ b/incubator/mysqlha/values.yaml @@ -34,10 +34,17 @@ mysqlha: ## persistence: enabled: true - ## If defined, volume.beta.kubernetes.io/storage-class: + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, azure-disk on + ## Azure, standard on GKE, AWS & OpenStack) ## - accessMode: ReadWriteOnce + # storageClass: "-" + accessModes: + - ReadWriteOnce size: 10Gi + annotations: {} resources: requests: