Skip to content

Commit

Permalink
Allow statefulSet updates (helm#8527)
Browse files Browse the repository at this point in the history
* 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 <stepan@stipl.net>

* CouchDB - bump chart version to 0.3.0

Signed-off-by: Stepan Stipl <stepan@stipl.net>

* CouchDB - Update StatefulSet labels

Signed-off-by: Stepan Stipl <stepan@stipl.net>

* Bump major version and describe upgrade process

Signed-off-by: Stepan Stipl <stepan@stipl.net>
  • Loading branch information
stepanstipl authored and wgiddens committed Jan 18, 2019
1 parent cf0a292 commit 5126186
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion incubator/couchdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 17 additions & 0 deletions incubator/couchdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions incubator/couchdb/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 5126186

Please sign in to comment.