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

Commit c2090c4

Browse files
javsalgark8s-ci-robot
authored andcommitted
[stable/wordpress] Fix chart not being upgradable (#7831)
* [stable/wordpress] Fix chart not being upgradable Signed-off-by: Javier J. Salmeron Garcia <[email protected]> * improve markdown highlighting Signed-off-by: Sameer Naik <[email protected]>
1 parent fffb437 commit c2090c4

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

stable/wordpress/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wordpress
2-
version: 2.1.10
2+
version: 3.0.0
33
appVersion: 4.9.8
44
description: Web publishing platform for building blogs and websites.
55
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png

stable/wordpress/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,15 @@ kubectl create secret tls wordpress.local-tls --key /path/to/key.key --cert /pat
230230
231231
Please see [this example](https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx/examples/tls)
232232
for more information.
233+
234+
## Upgrading
235+
236+
### To 3.0.0
237+
238+
Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
239+
Use the workaround below to upgrade from versions previous to `3.0.0`. The following example assumes that the release name is `wordpress`:
240+
241+
```console
242+
$ kubectl patch deployment wordpress-wordpress --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
243+
$ kubectl delete statefulset wordpress-mariadb --cascade=false
244+
```

stable/wordpress/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ metadata:
88
release: "{{ .Release.Name }}"
99
heritage: "{{ .Release.Service }}"
1010
spec:
11+
selector:
12+
matchLabels:
13+
app: {{ template "fullname" . }}
14+
release: "{{ .Release.Name }}"
1115
replicas: {{ .Values.replicaCount }}
1216
template:
1317
metadata:

0 commit comments

Comments
 (0)