Skip to content

Commit

Permalink
[stable/odoo] Fix chart not being upgradable (helm#7854)
Browse files Browse the repository at this point in the history
Signed-off-by: Javier J. Salmeron Garcia <[email protected]>
  • Loading branch information
javsalgar authored and wgiddens committed Jan 18, 2019
1 parent 94be95b commit 2201d9b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/odoo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: odoo
version: 2.0.8
version: 3.0.0
appVersion: 11.0.20180915
description: A suite of web based open source business apps.
home: https://www.odoo.com/
Expand Down
12 changes: 12 additions & 0 deletions stable/odoo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,15 @@ The [Bitnami Odoo](https://github.com/bitnami/bitnami-docker-odoo) image stores

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 odoo:

```console
$ kubectl patch deployment odoo-odoo --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
$ kubectl patch deployment odoo-postgresql --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
```
4 changes: 4 additions & 0 deletions stable/odoo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ metadata:
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
spec:
selector:
matchLabels:
app: {{ template "odoo.name" . }}
release: "{{ .Release.Name }}"
template:
metadata:
labels:
Expand Down

0 comments on commit 2201d9b

Please sign in to comment.