From b1c4184b8018be1a0ca219819a1cb0e51f91ad9c Mon Sep 17 00:00:00 2001 From: "Javier J. Salmeron Garcia" Date: Wed, 19 Sep 2018 12:34:04 +0200 Subject: [PATCH 1/2] [stable/magento] Fix chart not being upgradable Signed-off-by: Javier J. Salmeron Garcia --- stable/magento/Chart.yaml | 2 +- stable/magento/README.md | 11 +++++++++++ stable/magento/templates/deployment.yaml | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/stable/magento/Chart.yaml b/stable/magento/Chart.yaml index fe985a72b708..93a5033058ff 100644 --- a/stable/magento/Chart.yaml +++ b/stable/magento/Chart.yaml @@ -1,5 +1,5 @@ name: magento -version: 2.0.5 +version: 3.0.0 appVersion: 2.2.5 description: A feature-rich flexible e-commerce solution. It includes transaction options, multi-store functionality, loyalty programs, product categorization and shopper filtering, promotion rules, and more. keywords: diff --git a/stable/magento/README.md b/stable/magento/README.md index 0b225172cfd3..73561680be5d 100644 --- a/stable/magento/README.md +++ b/stable/magento/README.md @@ -122,3 +122,14 @@ The [Bitnami Magento](https://github.com/bitnami/bitnami-docker-magento) image s 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 magento: + +```console +$ kubectl patch deployment magento-magento --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/app"}]' +$ kubectl delete statefulset magento-mariadb --cascade=false diff --git a/stable/magento/templates/deployment.yaml b/stable/magento/templates/deployment.yaml index 22db427a9d16..c1b83f81fb05 100644 --- a/stable/magento/templates/deployment.yaml +++ b/stable/magento/templates/deployment.yaml @@ -9,6 +9,10 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: + selector: + matchLabels: + app: {{ template "magento.fullname" . }} + release: "{{ .Release.Name }}" template: metadata: labels: From 62b145e2212271cb22fe67097666b1cc34e0ecdc Mon Sep 17 00:00:00 2001 From: "Javier J. Salmeron Garcia" Date: Wed, 19 Sep 2018 12:53:22 +0200 Subject: [PATCH 2/2] Change readme Signed-off-by: Javier J. Salmeron Garcia --- stable/magento/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/magento/README.md b/stable/magento/README.md index 73561680be5d..fdf199dfdff9 100644 --- a/stable/magento/README.md +++ b/stable/magento/README.md @@ -131,5 +131,5 @@ Backwards compatibility is not guaranteed unless you modify the labels used on t Use the workaround below to upgrade from versions previous to 3.0.0. The following example assumes that the release name is magento: ```console -$ kubectl patch deployment magento-magento --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/app"}]' +$ kubectl patch deployment magento-magento --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' $ kubectl delete statefulset magento-mariadb --cascade=false