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

[stable/opencart] Fix chart not being upgradable #7785

Merged
merged 2 commits into from
Sep 19, 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/opencart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: opencart
version: 2.0.4
version: 3.0.0
appVersion: 3.0.2-0
description: A free and open source e-commerce platform for online merchants. It provides
a professional and reliable foundation for a successful online store.
Expand Down
12 changes: 12 additions & 0 deletions stable/opencart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,15 @@ The [Bitnami OpenCart](https://github.com/bitnami/bitnami-docker-opencart) image

Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.

## 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 opencart:

```console
$ kubectl patch deployment opencart-opencart --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/app"}]'
$ kubectl delete statefulset opencart-mariadb --cascade=false
```
4 changes: 4 additions & 0 deletions stable/opencart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
selector:
matchLabels:
app: {{ template "opencart.fullname" . }}
release: "{{ .Release.Name }}"
template:
metadata:
labels:
Expand Down