Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/mariadb] Fix chart not being upgradable #7852

Merged
merged 1 commit into from
Sep 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/mariadb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mariadb
version: 4.4.2
version: 5.0.0
appVersion: 10.1.36
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:
Expand Down
11 changes: 11 additions & 0 deletions stable/mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,14 @@ The allowed extensions are `.sh`, `.sql` and `.sql.gz`.
The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` 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 5.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 5.0.0. The following example assumes that the release name is mariadb:

```console
$ kubectl delete statefulset opencart-mariadb --cascade=false
```
7 changes: 6 additions & 1 deletion stable/mariadb/templates/master-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ metadata:
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
release: "{{ .Release.Name }}"
component: "master"
app: {{ template "mariadb.name" . }}
serviceName: "{{ template "master.fullname" . }}"
replicas: 1
updateStrategy:
Expand Down Expand Up @@ -208,4 +213,4 @@ spec:
{{- else }}
- name: "data"
emptyDir: {}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions stable/mariadb/templates/slave-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ metadata:
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
release: "{{ .Release.Name }}"
component: "slave"
app: {{ template "mariadb.name" . }}
serviceName: "{{ template "slave.fullname" . }}"
replicas: {{ .Values.slave.replicas }}
updateStrategy:
Expand Down