From a240446a188788bbf4e0bbb186bab856e84e5308 Mon Sep 17 00:00:00 2001 From: Stepan Stipl Date: Thu, 22 Nov 2018 02:53:22 +0000 Subject: [PATCH] Allow statefulSet updates (#8527) * CouchDB - Allow statefulSet updates This fixes CouchDB updates by removing Version part from StatefulSet lables, as Kubernetes don't allow updates to any other fields but 'replicas', 'template', and 'updateStrategy', and therefore updating CouchDB service would be impossible. - metadata.labels - spec.VolumeClaimTemplate.metadata.labels Signed-off-by: Stepan Stipl * CouchDB - bump chart version to 0.3.0 Signed-off-by: Stepan Stipl * CouchDB - Update StatefulSet labels Signed-off-by: Stepan Stipl * Bump major version and describe upgrade process Signed-off-by: Stepan Stipl --- incubator/couchdb/Chart.yaml | 2 +- incubator/couchdb/README.md | 17 +++++++++++++++++ incubator/couchdb/templates/statefulset.yaml | 2 -- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/incubator/couchdb/Chart.yaml b/incubator/couchdb/Chart.yaml index ab4db0a29bc1..3d6d50d66c0b 100644 --- a/incubator/couchdb/Chart.yaml +++ b/incubator/couchdb/Chart.yaml @@ -1,5 +1,5 @@ name: couchdb -version: 0.2.2 +version: 1.0.0 appVersion: 2.2.0 description: A database featuring seamless multi-master sync, that scales from big data to mobile, with an intuitive HTTP/JSON API and designed for diff --git a/incubator/couchdb/README.md b/incubator/couchdb/README.md index 846e738edee5..312f32050d56 100644 --- a/incubator/couchdb/README.md +++ b/incubator/couchdb/README.md @@ -67,6 +67,23 @@ $ helm delete my-release The command removes all the Kubernetes components associated with the chart and deletes the release. +## Upgrading an existing Release to a new major version + +A major chart version change (like v0.2.3 -> v1.0.0) indicates that there is an +incompatible breaking change needing manual actions. + +### 1.0.0 + +This version removes the `chart` and `heritage` labels from the +`volumeClaimTemplates` which is immutable and prevents chart from being upgraded +(see https://github.com/helm/charts/issues/7803 for details). + +In order to upgrade, delete the CouchDB StatefulSet before upgrading: + +```bash +$ kubectl delete statefulsets --cascade=false my-release-couchdb +``` + ## Configuration The following table lists the most commonly configured parameters of the diff --git a/incubator/couchdb/templates/statefulset.yaml b/incubator/couchdb/templates/statefulset.yaml index 35e153363226..16da6d971d31 100644 --- a/incubator/couchdb/templates/statefulset.yaml +++ b/incubator/couchdb/templates/statefulset.yaml @@ -133,9 +133,7 @@ spec: name: database-storage labels: app: {{ template "couchdb.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} - heritage: {{ .Release.Service }} spec: accessModes: {{- range .Values.persistentVolume.accessModes }}