Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/mongodb] Fix chart not being upgradable when replicaset is en…
Browse files Browse the repository at this point in the history
…abled. (#10121)

Signed-off-by: juan131 <[email protected]>
  • Loading branch information
juan131 authored and k8s-ci-robot committed Dec 19, 2018
1 parent 5b924a1 commit de58914
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stable/mongodb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mongodb
version: 4.10.1
version: 5.0.0
appVersion: 4.0.3
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
keywords:
Expand Down
11 changes: 11 additions & 0 deletions stable/mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,14 @@ The allowed extensions are `.sh`, and `.js`.
The [Bitnami MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) image stores the MongoDB data and configurations at the `/bitnami/mongodb` path of the container.

The chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning.

## Upgrading

### To 5.0.0

When enabling replicaset configuration, backwards compatibility is not guaranteed unless you modify the labels used on the chart's statefulsets.
Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is `my-release`:

```consoloe
$ kubectl delete statefulset my-release-mongodb-arbiter my-release-mongodb-primary my-release-mongodb-secondary --cascade=false
```
1 change: 0 additions & 1 deletion stable/mongodb/templates/statefulset-arbiter-rs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
matchLabels:
app: {{ template "mongodb.name" . }}
release: {{ .Release.Name }}
chart: {{ template "mongodb.chart" . }}
component: arbiter
serviceName: {{ template "mongodb.fullname" . }}-headless
replicas: {{ .Values.replicaSet.replicas.arbiter }}
Expand Down
1 change: 0 additions & 1 deletion stable/mongodb/templates/statefulset-primary-rs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ spec:
selector:
matchLabels:
app: {{ template "mongodb.name" . }}
chart: {{ template "mongodb.chart" . }}
release: {{ .Release.Name }}
component: primary
template:
Expand Down
1 change: 0 additions & 1 deletion stable/mongodb/templates/statefulset-secondary-rs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ spec:
matchLabels:
app: {{ template "mongodb.name" . }}
release: {{ .Release.Name }}
chart: {{ template "mongodb.chart" . }}
component: secondary
podManagementPolicy: "Parallel"
serviceName: {{ template "mongodb.fullname" . }}-headless
Expand Down

0 comments on commit de58914

Please sign in to comment.