From c2090c49d0d5e625bc3a99c00f3607ad31cccd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n-Garc=C3=ADa?= Date: Thu, 20 Sep 2018 06:55:44 +0200 Subject: [PATCH] [stable/wordpress] Fix chart not being upgradable (#7831) * [stable/wordpress] Fix chart not being upgradable Signed-off-by: Javier J. Salmeron Garcia * improve markdown highlighting Signed-off-by: Sameer Naik --- stable/wordpress/Chart.yaml | 2 +- stable/wordpress/README.md | 12 ++++++++++++ stable/wordpress/templates/deployment.yaml | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/stable/wordpress/Chart.yaml b/stable/wordpress/Chart.yaml index 58b6f74491..417d7b5074 100644 --- a/stable/wordpress/Chart.yaml +++ b/stable/wordpress/Chart.yaml @@ -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 diff --git a/stable/wordpress/README.md b/stable/wordpress/README.md index 02e33890bf..f3dd313018 100644 --- a/stable/wordpress/README.md +++ b/stable/wordpress/README.md @@ -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 +``` diff --git a/stable/wordpress/templates/deployment.yaml b/stable/wordpress/templates/deployment.yaml index f22927b6e9..5fe0066508 100644 --- a/stable/wordpress/templates/deployment.yaml +++ b/stable/wordpress/templates/deployment.yaml @@ -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: