Skip to content

Commit

Permalink
[stable/opencart] Fix chart not being upgradable (helm#7785)
Browse files Browse the repository at this point in the history
* [stable/opencart] Fix chart not being upgradable

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>

* Update chart and readme

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>
Signed-off-by: jenkin-x <jicowan@hotmail.com>
  • Loading branch information
javsalgar authored and jicowan committed Oct 2, 2018
1 parent b4833f1 commit 526040d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
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

0 comments on commit 526040d

Please sign in to comment.