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

[stable/wordpress] Fix chart not being upgradable #7831

Merged
merged 2 commits 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/wordpress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wordpress
version: 2.1.10
version: 3.0.0
appVersion: 4.9.8
description: Web publishing platform for building blogs and websites.
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
Expand Down
12 changes: 12 additions & 0 deletions stable/wordpress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,15 @@ kubectl create secret tls wordpress.local-tls --key /path/to/key.key --cert /pat

Please see [this example](https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tls)
for more information.

## 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 `wordpress`:

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