0d592d55db3a8d12fae87880beb83c7e40f90dd7
[it/otf.git] / otf-helm / otf / charts / databases / mongodb / README.md
1 # MongoDB
2
3 [MongoDB](https://www.mongodb.com/) is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster.
4
5 ## This Helm chart is deprecated
6
7 Given the [`stable` deprecation timeline](https://github.com/helm/charts#deprecation-timeline), the Bitnami maintained MongoDB Helm chart is now located at [bitnami/charts](https://github.com/bitnami/charts/).
8
9 The Bitnami repository is already included in the Hubs and we will continue providing the same cadence of updates, support, etc that we've been keeping here these years. Installation instructions are very similar, just adding the _bitnami_ repo and using it during the installation (`bitnami/<chart>` instead of `stable/<chart>`)
10
11 ```bash
12 $ helm repo add bitnami https://charts.bitnami.com/bitnami
13 $ helm install my-release bitnami/<chart>           # Helm 3
14 $ helm install --name my-release bitnami/<chart>    # Helm 2
15 ```
16
17 To update an exisiting _stable_ deployment with a chart hosted in the bitnami repository you can execute
18
19 ```bash
20 $ helm repo add bitnami https://charts.bitnami.com/bitnami
21 $ helm upgrade my-release bitnami/<chart>
22 ```
23
24 Issues and PRs related to the chart itself will be redirected to `bitnami/charts` GitHub repository. In the same way, we'll be happy to answer questions related to this migration process in [this issue](https://github.com/helm/charts/issues/20969) created as a common place for discussion.
25
26 ## TL;DR;
27
28 ```bash
29 $ helm install my-release stable/mongodb
30 ```
31
32 ## Introduction
33
34 This chart bootstraps a [MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
35
36 Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/).
37
38 ## Prerequisites
39
40 - Kubernetes 1.12+
41 - Helm 2.11+ or Helm 3.0-beta3+
42 - PV provisioner support in the underlying infrastructure
43 - ReadWriteMany volumes for deployment scaling
44
45 ## Installing the Chart
46
47 To install the chart with the release name `my-release`:
48
49 ```bash
50 $ helm install my-release stable/mongodb
51 ```
52
53 The command deploys MongoDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
54
55 > **Tip**: List all releases using `helm list`
56
57 ## Uninstalling the Chart
58
59 To uninstall/delete the `my-release` deployment:
60
61 ```bash
62 $ helm delete my-release
63 ```
64
65 The command removes all the Kubernetes components associated with the chart and deletes the release.
66
67 ## Parameters
68
69 The following table lists the configurable parameters of the MongoDB chart and their default values.
70
71 | Parameter                                          | Description                                                                                                                                               | Default                                                  |
72 |----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
73 | `global.imageRegistry`                             | Global Docker image registry                                                                                                                              | `nil`                                                    |
74 | `global.imagePullSecrets`                          | Global Docker registry secret names as an array                                                                                                           | `[]` (does not add image pull secrets to deployed pods)  |
75 | `global.storageClass`                              | Global storage class for dynamic provisioning                                                                                                             | `nil`                                                    |
76 | `image.registry`                                   | MongoDB image registry                                                                                                                                    | `docker.io`                                              |
77 | `image.repository`                                 | MongoDB Image name                                                                                                                                        | `bitnami/mongodb`                                        |
78 | `image.tag`                                        | MongoDB Image tag                                                                                                                                         | `{TAG_NAME}`                                             |
79 | `image.pullPolicy`                                 | Image pull policy                                                                                                                                         | `IfNotPresent`                                           |
80 | `image.pullSecrets`                                | Specify docker-registry secret names as an array                                                                                                          | `[]` (does not add image pull secrets to deployed pods)  |
81 | `image.debug`                                      | Specify if debug logs should be enabled                                                                                                                   | `false`                                                  |
82 | `nameOverride`                                     | String to partially override mongodb.fullname template with a string (will prepend the release name)                                                      | `nil`                                                    |
83 | `fullnameOverride`                                 | String to fully override mongodb.fullname template with a string                                                                                          | `nil`                                                    |
84 | `volumePermissions.enabled`                        | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false`                                                  |
85 | `volumePermissions.image.registry`                 | Init container volume-permissions image registry                                                                                                          | `docker.io`                                              |
86 | `volumePermissions.image.repository`               | Init container volume-permissions image name                                                                                                              | `bitnami/minideb`                                        |
87 | `volumePermissions.image.tag`                      | Init container volume-permissions image tag                                                                                                               | `buster`                                                 |
88 | `volumePermissions.image.pullPolicy`               | Init container volume-permissions image pull policy                                                                                                       | `Always`                                                 |
89 | `volumePermissions.resources`                      | Init container resource requests/limit                                                                                                                    | `nil`                                                    |
90 | `clusterDomain`                                    | Default Kubernetes cluster domain                                                                                                                         | `cluster.local`                                          |
91 | `usePassword`                                      | Enable password authentication                                                                                                                            | `true`                                                   |
92 | `existingSecret`                                   | Existing secret with MongoDB credentials                                                                                                                  | `nil`                                                    |
93 | `mongodbRootPassword`                              | MongoDB admin password                                                                                                                                    | `random alphanumeric string (10)`                        |
94 | `mongodbUsername`                                  | MongoDB custom user (mandatory if `mongodbDatabase` is set)                                                                                               | `nil`                                                    |
95 | `mongodbPassword`                                  | MongoDB custom user password                                                                                                                              | `random alphanumeric string (10)`                        |
96 | `mongodbDatabase`                                  | Database to create                                                                                                                                        | `nil`                                                    |
97 | `mongodbEnableIPv6`                                | Switch to enable/disable IPv6 on MongoDB                                                                                                                  | `false`                                                  |
98 | `mongodbDirectoryPerDB`                            | Switch to enable/disable DirectoryPerDB on MongoDB                                                                                                        | `false`                                                  |
99 | `mongodbSystemLogVerbosity`                        | MongoDB system log verbosity level                                                                                                                        | `0`                                                      |
100 | `mongodbDisableSystemLog`                          | Whether to disable MongoDB system log or not                                                                                                              | `false`                                                  |
101 | `mongodbExtraFlags`                                | MongoDB additional command line flags                                                                                                                     | `[]`                                                     |
102 | `service.name`                                     | Kubernetes service name                                                                                                                                   | `nil`                                                    |
103 | `service.annotations`                              | Kubernetes service annotations, evaluated as a template                                                                                                   | `{}`                                                     |
104 | `service.type`                                     | Kubernetes Service type                                                                                                                                   | `ClusterIP`                                              |
105 | `service.clusterIP`                                | Static clusterIP or None for headless services                                                                                                            | `nil`                                                    |
106 | `service.port`                                     | MongoDB service port                                                                                                                                      | `27017`                                                  |
107 | `service.nodePort`                                 | Port to bind to for NodePort service type                                                                                                                 | `nil`                                                    |
108 | `service.loadBalancerIP`                           | Static IP Address to use for LoadBalancer service type                                                                                                    | `nil`                                                    |
109 | `service.externalIPs`                              | External IP list to use with ClusterIP service type                                                                                                       | `[]`                                                     |
110 | `service.loadBalancerSourceRanges`                 | List of IP ranges allowed access to load balancer (if supported)                                                                                          | `[]` (does not add IP range restrictions to the service) |
111 | `replicaSet.enabled`                               | Switch to enable/disable replica set configuration                                                                                                        | `false`                                                  |
112 | `replicaSet.name`                                  | Name of the replica set                                                                                                                                   | `rs0`                                                    |
113 | `replicaSet.useHostnames`                          | Enable DNS hostnames in the replica set config                                                                                                            | `true`                                                   |
114 | `replicaSet.key`                                   | Key used for authentication in the replica set                                                                                                            | `random alphanumeric string (10)`                        |
115 | `replicaSet.replicas.secondary`                    | Number of secondary nodes in the replica set                                                                                                              | `1`                                                      |
116 | `replicaSet.replicas.arbiter`                      | Number of arbiter nodes in the replica set                                                                                                                | `1`                                                      |
117 | `replicaSet.pdb.enabled`                           | Switch to enable/disable Pod Disruption Budget                                                                                                            | `true`                                                   |
118 | `replicaSet.pdb.minAvailable.secondary`            | PDB (min available) for the MongoDB Secondary nodes                                                                                                       | `1`                                                      |
119 | `replicaSet.pdb.minAvailable.arbiter`              | PDB (min available) for the MongoDB Arbiter nodes                                                                                                         | `1`                                                      |
120 | `replicaSet.pdb.maxUnavailable.secondary`          | PDB (max unavailable) for the MongoDB Secondary nodes                                                                                                     | `nil`                                                    |
121 | `replicaSet.pdb.maxUnavailable.arbiter`            | PDB (max unavailable) for the MongoDB Arbiter nodes                                                                                                       | `nil`                                                    |
122 | `annotations`                                      | Annotations to be added to the deployment or statefulsets                                                                                                 | `{}`                                                     |
123 | `labels`                                           | Additional labels for the deployment or statefulsets                                                                                                      | `{}`                                                     |
124 | `podAnnotations`                                   | Annotations to be added to pods                                                                                                                           | `{}`                                                     |
125 | `podLabels`                                        | Additional labels for the pod(s).                                                                                                                         | `{}`                                                     |
126 | `resources`                                        | Pod resources                                                                                                                                             | `{}`                                                     |
127 | `resourcesArbiter`                                 | Pod resources for arbiter when replica set is enabled                                                                                                     | `{}`                                                     |
128 | `priorityClassName`                                | Pod priority class name                                                                                                                                   | ``                                                       |
129 | `extraEnvVars`                                     | Array containing extra env vars to be added to all pods in the cluster (evaluated as a template)                                                          | `nil`                                                    |
130 | `nodeSelector`                                     | Node labels for pod assignment                                                                                                                            | `{}`                                                     |
131 | `affinity`                                         | Affinity for pod assignment                                                                                                                               | `{}`                                                     |
132 | `affinityArbiter`                                  | Affinity for arbiter pod assignment                                                                                                                       | `{}`                                                     |
133 | `tolerations`                                      | Toleration labels for pod assignment                                                                                                                      | `{}`                                                     |
134 | `updateStrategy`                                   | Statefulsets update strategy policy                                                                                                                       | `RollingUpdate`                                          |
135 | `securityContext.enabled`                          | Enable security context                                                                                                                                   | `true`                                                   |
136 | `securityContext.fsGroup`                          | Group ID for the container                                                                                                                                | `1001`                                                   |
137 | `securityContext.runAsUser`                        | User ID for the container                                                                                                                                 | `1001`                                                   |
138 | `schedulerName`                                    | Name of the k8s scheduler (other than default)                                                                                                            | `nil`                                                    |
139 | `sidecars`                                         | Add additional containers to pod                                                                                                                          | `[]`                                                     |
140 | `extraVolumes`                                     | Add additional volumes to deployment                                                                                                                      | `[]`                                                     |
141 | `extraVolumeMounts`                                | Add additional volumes mounts to pod                                                                                                                      | `[]`                                                     |
142 | `sidecarsArbiter`                                  | Add additional containers to arbiter pod                                                                                                                  | `[]`                                                     |
143 | `extraVolumesArbiter`                              | Add additional volumes to arbiter deployment                                                                                                              | `[]`                                                     |
144 | `extraVolumeMountsArbiter`                         | Add additional volumes mounts to arbiter pod                                                                                                              | `[]`                                                     |
145 | `persistence.enabled`                              | Use a PVC to persist data                                                                                                                                 | `true`                                                   |
146 | `persistence.mountPath`                            | Path to mount the volume at                                                                                                                               | `/bitnami/mongodb`                                       |
147 | `persistence.subPath`                              | Subdirectory of the volume to mount at                                                                                                                    | `""`                                                     |
148 | `persistence.storageClass`                         | Storage class of backing PVC                                                                                                                              | `nil` (uses alpha storage class annotation)              |
149 | `persistence.accessModes`                          | Use volume as ReadOnly or ReadWrite                                                                                                                       | `[ReadWriteOnce]`                                        |
150 | `persistence.size`                                 | Size of data volume                                                                                                                                       | `8Gi`                                                    |
151 | `persistence.annotations`                          | Persistent Volume annotations                                                                                                                             | `{}`                                                     |
152 | `persistence.existingClaim`                        | Name of an existing PVC to use (avoids creating one if this is given)                                                                                     | `nil`                                                    |
153 | `useStatefulSet`                                   | Set to true to use StatefulSet instead of Deployment even when replicaSet.enalbed=false                                                                   | `nil`                                                    |
154 | `extraInitContainers`                              | Additional init containers as a string to be passed to the `tpl` function                                                                                 | `{}`                                                     |
155 | `livenessProbe.enabled`                            | Enable/disable the Liveness probe                                                                                                                         | `true`                                                   |
156 | `livenessProbe.initialDelaySeconds`                | Delay before liveness probe is initiated                                                                                                                  | `30`                                                     |
157 | `livenessProbe.periodSeconds`                      | How often to perform the probe                                                                                                                            | `10`                                                     |
158 | `livenessProbe.timeoutSeconds`                     | When the probe times out                                                                                                                                  | `5`                                                      |
159 | `livenessProbe.successThreshold`                   | Minimum consecutive successes for the probe to be considered successful after having failed.                                                              | `1`                                                      |
160 | `livenessProbe.failureThreshold`                   | Minimum consecutive failures for the probe to be considered failed after having succeeded.                                                                | `6`                                                      |
161 | `readinessProbe.enabled`                           | Enable/disable the Readiness probe                                                                                                                        | `true`                                                   |
162 | `readinessProbe.initialDelaySeconds`               | Delay before readiness probe is initiated                                                                                                                 | `5`                                                      |
163 | `readinessProbe.periodSeconds`                     | How often to perform the probe                                                                                                                            | `10`                                                     |
164 | `readinessProbe.timeoutSeconds`                    | When the probe times out                                                                                                                                  | `5`                                                      |
165 | `readinessProbe.failureThreshold`                  | Minimum consecutive failures for the probe to be considered failed after having succeeded.                                                                | `6`                                                      |
166 | `readinessProbe.successThreshold`                  | Minimum consecutive successes for the probe to be considered successful after having failed.                                                              | `1`                                                      |
167 | `initConfigMap.name`                               | Custom config map with init scripts                                                                                                                       | `nil`                                                    |
168 | `configmap`                                        | MongoDB configuration file to be used                                                                                                                     | `nil`                                                    |
169 | `ingress.enabled`                                  | Enable ingress controller resource                                                                                                                        | `false`                                                  |
170 | `ingress.certManager`                              | Add annotations for cert-manager                                                                                                                          | `false`                                                  |
171 | `ingress.annotations`                              | Ingress annotations                                                                                                                                       | `[]`                                                     |
172 | `ingress.hosts[0].name`                            | Hostname to your MongoDB installation                                                                                                                     | `mongodb.local`                                          |
173 | `ingress.hosts[0].path`                            | Path within the url structure                                                                                                                             | `/`                                                      |
174 | `ingress.tls[0].hosts[0]`                          | TLS hosts                                                                                                                                                 | `mongodb.local`                                          |
175 | `ingress.tls[0].secretName`                        | TLS Secret (certificates)                                                                                                                                 | `mongodb.local-tls`                                      |
176 | `ingress.secrets[0].name`                          | TLS Secret Name                                                                                                                                           | `nil`                                                    |
177 | `ingress.secrets[0].certificate`                   | TLS Secret Certificate                                                                                                                                    | `nil`                                                    |
178 | `ingress.secrets[0].key`                           | TLS Secret Key                                                                                                                                            | `nil`                                                    |
179 | `metrics.enabled`                                  | Start a side-car prometheus exporter                                                                                                                      | `false`                                                  |
180 | `metrics.image.registry`                           | MongoDB exporter image registry                                                                                                                           | `docker.io`                                              |
181 | `metrics.image.repository`                         | MongoDB exporter image name                                                                                                                               | `bitnami/mongodb-exporter`                               |
182 | `metrics.image.tag`                                | MongoDB exporter image tag                                                                                                                                | `{TAG_NAME}`                                             |
183 | `metrics.image.pullPolicy`                         | Image pull policy                                                                                                                                         | `Always`                                                 |
184 | `metrics.image.pullSecrets`                        | Specify docker-registry secret names as an array                                                                                                          | `[]` (does not add image pull secrets to deployed pods)  |
185 | `metrics.podAnnotations.prometheus.io/scrape`      | Additional annotations for Metrics exporter pod                                                                                                           | `true`                                                   |
186 | `metrics.podAnnotations.prometheus.io/port`        | Additional annotations for Metrics exporter pod                                                                                                           | `"9216"`                                                 |
187 | `metrics.extraArgs`                                | String with extra arguments for the MongoDB Exporter                                                                                                      | ``                                                       |
188 | `metrics.resources`                                | Exporter resource requests/limit                                                                                                                          | `{}`                                                     |
189 | `metrics.serviceMonitor.enabled`                   | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator                                                                              | `false`                                                  |
190 | `metrics.serviceMonitor.namespace`                 | Optional namespace which Prometheus is running in                                                                                                         | `nil`                                                    |
191 | `metrics.serviceMonitor.additionalLabels`          | Used to pass Labels that are required by the Installed Prometheus Operator                                                                                | `{}`                                                     |
192 | `metrics.serviceMonitor.relabellings`              | Specify Metric Relabellings to add to the scrape endpoint                                                                                                 | `nil`                                                    |
193 | `metrics.serviceMonitor.alerting.rules`            | Define individual alerting rules as required                                                                                                              | `{}`                                                     |
194 | `metrics.serviceMonitor.alerting.additionalLabels` | Used to pass Labels that are required by the Installed Prometheus Operator                                                                                | `{}`                                                     |
195 | `metrics.livenessProbe.enabled`                    | Enable/disable the Liveness Check of Prometheus metrics exporter                                                                                          | `false`                                                  |
196 | `metrics.livenessProbe.initialDelaySeconds`        | Initial Delay for Liveness Check of Prometheus metrics exporter                                                                                           | `15`                                                     |
197 | `metrics.livenessProbe.periodSeconds`              | How often to perform Liveness Check of Prometheus metrics exporter                                                                                        | `5`                                                      |
198 | `metrics.livenessProbe.timeoutSeconds`             | Timeout for Liveness Check of Prometheus metrics exporter                                                                                                 | `5`                                                      |
199 | `metrics.livenessProbe.failureThreshold`           | Failure Threshold for Liveness Check of Prometheus metrics exporter                                                                                       | `3`                                                      |
200 | `metrics.livenessProbe.successThreshold`           | Success Threshold for Liveness Check of Prometheus metrics exporter                                                                                       | `1`                                                      |
201 | `metrics.readinessProbe.enabled`                   | Enable/disable the Readiness Check of Prometheus metrics exporter                                                                                         | `false`                                                  |
202 | `metrics.readinessProbe.initialDelaySeconds`       | Initial Delay for Readiness Check of Prometheus metrics exporter                                                                                          | `5`                                                      |
203 | `metrics.readinessProbe.periodSeconds`             | How often to perform Readiness Check of Prometheus metrics exporter                                                                                       | `5`                                                      |
204 | `metrics.readinessProbe.timeoutSeconds`            | Timeout for Readiness Check of Prometheus metrics exporter                                                                                                | `1`                                                      |
205 | `metrics.readinessProbe.failureThreshold`          | Failure Threshold for Readiness Check of Prometheus metrics exporter                                                                                      | `3`                                                      |
206 | `metrics.readinessProbe.successThreshold`          | Success Threshold for Readiness Check of Prometheus metrics exporter                                                                                      | `1`                                                      |
207
208
209 Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
210
211 ```bash
212 $ helm install my-release \
213   --set mongodbRootPassword=secretpassword,mongodbUsername=my-user,mongodbPassword=my-password,mongodbDatabase=my-database \
214     stable/mongodb
215 ```
216
217 The above command sets the MongoDB `root` account password to `secretpassword`. Additionally, it creates a standard database user named `my-user`, with the password `my-password`, who has access to a database named `my-database`.
218
219 Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
220
221 ```bash
222 $ helm install my-release -f values.yaml stable/mongodb
223 ```
224
225 > **Tip**: You can use the default [values.yaml](values.yaml)
226
227 ## Configuration and installation details
228
229 ### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
230
231 It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
232
233 Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
234
235 ### Production configuration and horizontal scaling
236
237 This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one.
238
239 - Switch to enable/disable replica set configuration:
240 ```diff
241 - replicaSet.enabled: false
242 + replicaSet.enabled: true
243 ```
244
245 - Start a side-car prometheus exporter:
246 ```diff
247 - metrics.enabled: false
248 + metrics.enabled: true
249 ```
250
251 - Enable/disable the Liveness Check of Prometheus metrics exporter:
252 ```diff
253 - metrics.livenessProbe.enabled: false
254 + metrics.livenessProbe.enabled: true
255 ```
256
257 - Enable/disable the Readiness Check of Prometheus metrics exporter:
258 ```diff
259 - metrics.readinessProbe.enabled: false
260 + metrics.readinessProbe.enabled: true
261 ```
262
263 To horizontally scale this chart, you can use the `--replicas` flag to modify the number of secondary nodes in your MongoDB replica set.
264
265 ### Replication
266
267 You can start the MongoDB chart in replica set mode with the following parameter: `replicaSet.enabled=true`
268
269 Some characteristics of this chart are:
270
271 - Each of the participants in the replication has a fixed stateful set so you always know where to find the primary, secondary or arbiter nodes.
272 - The number of secondary and arbiter nodes can be scaled out independently.
273 - Easy to move an application from using a standalone MongoDB server to use a replica set.
274
275 ### Initialize a fresh instance
276
277 The [Bitnami MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap.
278 Also you can create a custom config map and give it via `initConfigMap`(check options for more details).
279
280 The allowed extensions are `.sh`, and `.js`.
281
282 ## Persistence
283
284 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.
285
286 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.
287
288 ### Adjust permissions of persistent volume mountpoint
289
290 As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.
291
292 By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions.
293 As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
294
295 You can enable this initContainer by setting `volumePermissions.enabled` to `true`.
296
297 ## Upgrading
298
299 ### To 7.0.0
300 From this version, the way of setting the ingress rules has changed. Instead of using `ingress.paths` and `ingress.hosts` as separate objects, you should now define the rules as objects inside the `ingress.hosts` value, for example:
301
302 ```yaml
303 ingress:
304   hosts:
305   - name: mongodb.local
306     path: /
307 ```
308
309 ### To 6.0.0
310
311 From this version, `mongodbEnableIPv6` is set to `false` by default in order to work properly in most k8s clusters, if you want to use IPv6 support, you need to set this variable to `true` by adding `--set mongodbEnableIPv6=true` to your `helm` command.
312 You can find more information in the [`bitnami/mongodb` image README](https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md).
313
314 ### To 5.0.0
315
316 When enabling replicaset configuration, backwards compatibility is not guaranteed unless you modify the labels used on the chart's statefulsets.
317 Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is `my-release`:
318
319 ```console
320 $ kubectl delete statefulset my-release-mongodb-arbiter my-release-mongodb-primary my-release-mongodb-secondary --cascade=false
321 ```
322
323 ## Configure Ingress
324 MongoDB can exposed externally using an Ingress controller. To do so, it's necessary to:
325
326 - Install the MongoDB chart setting the parameter `ingress.enabled=true`.
327 - Create a ConfigMap to map the external port to use and the internal service/port where to redirect the requests (see https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/exposing-tcp-udp-services.md for more information).
328
329 For instance, if you installed the MongoDB chart in the `default` namespace, you can install the [stable/nginx-ingress chart](https://github.com/helm/charts/tree/master/stable/nginx-ingress) setting the "tcp" parameter in the **values.yaml** used to install the chart as shown below:
330
331 ```yaml
332 ...
333
334 tcp:
335   27017: "default/mongodb:27017"
336 ```