diff --git a/bitnami/mysql/Chart.yaml b/bitnami/mysql/Chart.yaml index 42b1de47b..27fdd6a19 100644 --- a/bitnami/mysql/Chart.yaml +++ b/bitnami/mysql/Chart.yaml @@ -1,5 +1,5 @@ name: mysql -version: 2.1.2 +version: 3.0.0 appVersion: 5.7.23 description: Chart to create a Highly available MySQL cluster keywords: diff --git a/bitnami/mysql/README.md b/bitnami/mysql/README.md index 98c9109f3..0f30a052b 100644 --- a/bitnami/mysql/README.md +++ b/bitnami/mysql/README.md @@ -141,3 +141,15 @@ The allowed extensions are `.sh`, `.sql` and `.sql.gz`. The [Bitnami MySQL](https://github.com/bitnami/bitnami-docker-mysql) image stores the MySQL data and configurations at the `/bitnami/mysql` path of the container. The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning by default. An existing PersistentVolumeClaim can be defined. + +## Upgrading + +### To 3.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 3.0.0. The following example assumes that the release name is mysql: + +```console +$ kubectl delete statefulset mysql-master --cascade=false +$ kubectl delete statefulset mysql-slave --cascade=false +``` diff --git a/bitnami/mysql/templates/master-statefulset.yaml b/bitnami/mysql/templates/master-statefulset.yaml index b1ea6fe1b..dcfd2d481 100644 --- a/bitnami/mysql/templates/master-statefulset.yaml +++ b/bitnami/mysql/templates/master-statefulset.yaml @@ -9,6 +9,11 @@ metadata: release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} spec: + selector: + matchLabels: + app: {{ template "name" . }} + release: "{{ .Release.Name }}" + component: "master" serviceName: "{{ template "master.fullname" . }}" replicas: 1 updateStrategy: diff --git a/bitnami/mysql/templates/slave-statefulset.yaml b/bitnami/mysql/templates/slave-statefulset.yaml index 5ca95a3a3..b734fd850 100644 --- a/bitnami/mysql/templates/slave-statefulset.yaml +++ b/bitnami/mysql/templates/slave-statefulset.yaml @@ -10,6 +10,11 @@ metadata: release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} spec: + selector: + matchLabels: + app: {{ template "name" . }} + release: "{{ .Release.Name }}" + component: "slave" serviceName: "{{ template "slave.fullname" . }}" replicas: {{ .Values.slave.replicas }} updateStrategy: