From fd1f962f4f6fefcf971f61dbc30a8a83b9f7e7af 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 16:35:20 +0200 Subject: [PATCH] [stable/owncloud] Fix chart not being upgradable (#7844) Signed-off-by: Javier J. Salmeron Garcia --- stable/owncloud/Chart.yaml | 2 +- stable/owncloud/README.md | 12 ++++++++++++ stable/owncloud/templates/deployment.yaml | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/stable/owncloud/Chart.yaml b/stable/owncloud/Chart.yaml index e5cb5edcf8..fe23920337 100644 --- a/stable/owncloud/Chart.yaml +++ b/stable/owncloud/Chart.yaml @@ -1,5 +1,5 @@ name: owncloud -version: 2.0.6 +version: 3.0.0 appVersion: 10.0.10 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/stable/owncloud/README.md b/stable/owncloud/README.md index 6ecc06af6b..4fbdbe03b8 100644 --- a/stable/owncloud/README.md +++ b/stable/owncloud/README.md @@ -126,3 +126,15 @@ The [Bitnami ownCloud](https://github.com/bitnami/bitnami-docker-owncloud) image 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 owncloud: + +```console +$ kubectl patch deployment owncloud-owncloud --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' +$ kubectl delete statefulset owncloud-mariadb --cascade=false +``` diff --git a/stable/owncloud/templates/deployment.yaml b/stable/owncloud/templates/deployment.yaml index 8e12f85e23..20d9698c12 100644 --- a/stable/owncloud/templates/deployment.yaml +++ b/stable/owncloud/templates/deployment.yaml @@ -9,6 +9,10 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: + selector: + matchLabels: + app: {{ template "owncloud.fullname" . }} + release: "{{ .Release.Name }}" replicas: 1 template: metadata: