blob: 3a5eeb89b9b341e63f9fccdf52702524aa09d75f [file] [log] [blame] [view]
gio07eb1082024-10-25 14:35:56 +04001<!--- app-name: MongoDB&reg; -->
2
3# MongoDB(R) packaged by Bitnami
4
5MongoDB(R) is a relational open source NoSQL database. Easy to use, it stores data in JSON-like documents. Automated scalability and high-performance. Ideal for developing cloud native applications.
6
7[Overview of MongoDB&reg;](http://www.mongodb.org)
8
9Disclaimer: The respective trademarks mentioned in the offering are owned by the respective companies. We do not provide a commercial license for any of these products. This listing has an open-source license. MongoDB(R) is run and maintained by MongoDB, which is a completely separate project from Bitnami.
10
11## TL;DR
12
13```console
14helm install my-release oci://registry-1.docker.io/bitnamicharts/mongodb
15```
16
17Looking to use MongoDBreg; in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
18
19## Introduction
20
21This chart bootstraps a [MongoDB(&reg;)](https://github.com/bitnami/containers/tree/main/bitnami/mongodb) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
22
23Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters.
24
25## Architecture
26
27This chart allows installing MongoDB(&reg;) using two different architecture setups: `standalone` or `replicaset`. Use the `architecture` parameter to choose the one to use:
28
29```console
30architecture="standalone"
31architecture="replicaset"
32```
33
34### Standalone architecture
35
36The *standalone* architecture installs a deployment (or StatefulSet) with one MongoDB&reg; server (it cannot be scaled):
37
38```text
39 ----------------
40 | MongoDB&reg; |
41 | svc |
42 ----------------
43 |
44 v
45 ------------
46 |MongoDB&reg;|
47 | Server |
48 | Pod |
49 -----------
50```
51
52### Replicaset architecture
53
54The chart also supports the *replicaset* architecture with and without a MongoDB(&reg;) Arbiter:
55
56When the MongoDB(&reg;) Arbiter is enabled, the chart installs two StatefulSets: A StatefulSet with N MongoDB(&reg;) servers (organised with one primary and N-1 secondary nodes), and a StatefulSet with one MongoDB(&reg;) arbiter node (it cannot be scaled).
57
58```text
59 ---------------- ---------------- ---------------- -------------
60 | MongoDB&reg; 0 | | MongoDB&reg; 1 | | MongoDB&reg; N | | Arbiter |
61 | external svc | | external svc | | external svc | | svc |
62 ---------------- ---------------- ---------------- -------------
63 | | | |
64 v v v v
65 ---------------- ---------------- ---------------- --------------
66 | MongoDB&reg; 0 | | MongoDB&reg; 1 | | MongoDB&reg; N | | MongoDB&reg; |
67 | Server | | Server | | Server | | Arbiter |
68 | Pod | | Pod | | Pod | | Pod |
69 ---------------- ---------------- ---------------- --------------
70 primary secondary secondary
71```
72
73The PSA model is useful when the third Availability Zone cannot hold a full MongoDB(&reg;) instance. The MongoDB(&reg;) Arbiter as decision maker is lightweight and can run alongside other workloads.
74
75> NOTE: An update takes your MongoDB(&reg;) replicaset offline if the Arbiter is enabled and the number of MongoDB(&reg;) replicas is two. Helm applies updates to the StatefulSets for the MongoDB(&reg;) instance and the Arbiter at the same time so you lose two out of three quorum votes.
76
77Without the Arbiter, the chart deploys a single statefulset with N MongoDB(&reg;) servers (organised with one primary and N-1 secondary nodes).
78
79```text
80 ---------------- ---------------- ----------------
81 | MongoDB&reg; 0 | | MongoDB&reg; 1 | | MongoDB&reg; N |
82 | external svc | | external svc | | external svc |
83 ---------------- ---------------- ----------------
84 | | |
85 v v v
86 ---------------- ---------------- ----------------
87 | MongoDB&reg; 0 | | MongoDB&reg; 1 | | MongoDB&reg; N |
88 | Server | | Server | | Server |
89 | Pod | | Pod | | Pod |
90 ---------------- ---------------- ----------------
91 primary secondary secondary
92```
93
94There are no services load balancing requests between MongoDB(&reg;) nodes; instead, each node has an associated service to access them individually.
95
96> NOTE: Although the first replica is initially assigned the primary role, any of the secondary nodes can become the primary if it is down, or during upgrades. Do not make any assumption about what replica has the primary role. Instead, configure your MongoDB(&reg;) client with the list of MongoDB(&reg;) hostnames so it can dynamically choose the node to send requests.
97
98## Prerequisites
99
100- Kubernetes 1.23+
101- Helm 3.8.0+
102- PV provisioner support in the underlying infrastructure
103
104## Installing the Chart
105
106To install the chart with the release name `my-release`:
107
108```console
109helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb
110```
111
112> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
113
114The command deploys MongoDB(&reg;) on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
115
116> **Tip**: List all releases using `helm list`
117
118## Configuration and installation details
119
120### Resource requests and limits
121
122Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
123
124To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcePreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
125
126### [Rolling vs Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html)
127
128It 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.
129
130Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
131
132### Customize a new MongoDB instance
133
134The [Bitnami MongoDB(&reg;) image](https://github.com/bitnami/containers/tree/main/bitnami/mongodb) supports the use of custom scripts to initialize a fresh instance. In order to execute the scripts, two options are available:
135
136- Specify them using the `initdbScripts` parameter as dict.
137- Define an external Kubernetes ConfigMap with all the initialization scripts by setting the `initdbScriptsConfigMap` parameter. Note that this will override the previous option.
138
139The allowed script extensions are `.sh` and `.js`.
140
141### Replicaset: Access MongoDB(&reg;) nodes from outside the cluster
142
143In order to access MongoDB(&reg;) nodes from outside the cluster when using a replicaset architecture, a specific service per MongoDB(&reg;) pod will be created. There are two ways of configuring external access:
144
145- Using LoadBalancer services
146- Using NodePort services.
147
148#### Use LoadBalancer services
149
150Three alternatives are available to use *LoadBalancer* services:
151
152- Use random load balancer IP addresses using an *initContainer* that waits for the IP addresses to be ready and discovers them automatically. An example deployment configuration is shown below:
153
154 ```yaml
155 architecture: replicaset
156 replicaCount: 2
157 externalAccess:
158 enabled: true
159 service:
160 type: LoadBalancer
161 autoDiscovery:
162 enabled: true
163 serviceAccount:
164 create: true
165 automountServiceAccountToken: true
166 rbac:
167 create: true
168 ```
169
170 > NOTE: This option requires creating RBAC rules on clusters where RBAC policies are enabled.
171
172- Manually specify the load balancer IP addresses. An example deployment configuration is shown below, with the placeholder EXTERNAL-IP-ADDRESS-X used in place of the load balancer IP addresses:
173
174 ```yaml
175 architecture: replicaset
176 replicaCount: 2
177 externalAccess:
178 enabled: true
179 service:
180 type: LoadBalancer
181 loadBalancerIPs:
182 - 'EXTERNAL-IP-ADDRESS-1'
183 - 'EXTERNAL-IP-ADDRESS-2'
184 ```
185
186 > NOTE: This option requires knowing the load balancer IP addresses, so that each MongoDB&reg; node's advertised hostname is configured with it.
187
188- Specify `externalAccess.service.publicNames`. These names must be resolvable by the MongoDB&reg; containers. To ensure that, if this value is set, an initContainer is added to wait for the ip addresses associated to those names. We can combine this feature with `external-dns`, setting the required annotations to configure the load balancer names:
189
190 ```yaml
191 architecture: replicaset
192 replicaCount: 2
193 externalAccess:
194 enabled: true
195 service:
196 type: LoadBalancer
197 publicNames:
198 - 'mongodb-0.example.com'
199 - 'mongodb-1.example.com'
200 annotationsList:
201 - external-dns.alpha.kubernetes.io/hostname: mongodb-0.example.com
202 - external-dns.alpha.kubernetes.io/hostname: mongodb-1.example.com
203 ```
204
205 > NOTE: If register new DNS records for those names is not an option, the release can be upgraded setting `hostAliases` with the public IPs assigned to the external services.
206
207#### Use NodePort services
208
209Manually specify the node ports to use. An example deployment configuration is shown below, with the placeholder NODE-PORT-X used in place of the node ports:
210
211```text
212architecture=replicaset
213replicaCount=2
214externalAccess.enabled=true
215externalAccess.service.type=NodePort
216externalAccess.service.nodePorts[0]='NODE-PORT-1'
217externalAccess.service.nodePorts[1]='NODE-PORT-2'
218```
219
220> NOTE: This option requires knowing the node ports that will be exposed, so each MongoDB&reg; node's advertised hostname is configured with it.
221
222The pod will try to get the external IP address of the node using the command `curl -s https://ipinfo.io/IP-ADDRESS` unless the `externalAccess.service.domain` parameter is set.
223
224### Bootstrapping with an External Cluster
225
226This chart is equipped with the ability to bring online a set of Pods that connect to an existing MongoDB(&reg;) deployment that lies outside of Kubernetes. This effectively creates a hybrid MongoDB(&reg;) Deployment where both Pods in Kubernetes and Instances such as Virtual Machines can partake in a single MongoDB(&reg;) Deployment. This is helpful in situations where one may be migrating MongoDB(&reg;) from Virtual Machines into Kubernetes, for example. To take advantage of this, use the following as an example configuration:
227
228```yaml
229externalAccess:
230 externalMaster:
231 enabled: true
232 host: external-mongodb-0.internal
233```
234
235:warning: To bootstrap MongoDB(&reg;) with an external master that lies outside of Kubernetes, be sure to set up external access using any of the suggested methods in this chart to have connectivity between the MongoDB(&reg;) members. :warning:
236
237### Add extra environment variables
238
239To add extra environment variables (useful for advanced operations like custom init scripts), use the `extraEnvVars` property.
240
241```yaml
242extraEnvVars:
243 - name: LOG_LEVEL
244 value: error
245```
246
247Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` properties.
248
249### Use Sidecars and Init Containers
250
251If additional containers are needed in the same pod (such as additional metrics or logging exporters), they can be defined using the `sidecars` config parameter.
252
253```yaml
254sidecars:
255- name: your-image-name
256 image: your-image
257 imagePullPolicy: Always
258 ports:
259 - name: portname
260 containerPort: 1234
261```
262
263If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter (where available), as shown in the example below:
264
265```yaml
266service:
267 extraPorts:
268 - name: extraPort
269 port: 11311
270 targetPort: 11311
271```
272
273> NOTE: This Helm chart already includes sidecar containers for the Prometheus exporters (where applicable). These can be activated by adding the `--enable-metrics=true` parameter at deployment time. The `sidecars` parameter should therefore only be used for any extra sidecar containers.
274
275If additional init containers are needed in the same pod, they can be defined using the `initContainers` parameter. Here is an example:
276
277```yaml
278initContainers:
279 - name: your-image-name
280 image: your-image
281 imagePullPolicy: Always
282 ports:
283 - name: portname
284 containerPort: 1234
285```
286
287Learn more about [sidecar containers](https://kubernetes.io/docs/concepts/workloads/pods/) and [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
288
289### Backup and restore MongoDB(R) deployments
290
291Two different approaches are available to back up and restore Bitnami MongoDB&reg; Helm chart deployments on Kubernetes:
292
293- Back up the data from the source deployment and restore it in a new deployment using MongoDB&reg; built-in backup/restore tools.
294- Back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool.
295
296#### Method 1: Backup and restore data using MongoDB&reg; built-in tools
297
298This method involves the following steps:
299
300- Use the *mongodump* tool to create a snapshot of the data in the source cluster.
301- Create a new MongoDB&reg; Cluster deployment and forward the MongoDB&reg; Cluster service port for the new deployment.
302- Restore the data using the *mongorestore* tool to import the backup to the new cluster.
303
304> NOTE: Under this approach, it is important to create the new deployment on the destination cluster using the same credentials as the original deployment on the source cluster.
305
306#### Method 2: Back up and restore persistent data volumes
307
308This method involves copying the persistent data volumes for the MongoDB&reg; nodes and reusing them in a new deployment with [Velero](https://velero.io/), an open source Kubernetes backup/restore tool. This method is only suitable when:
309
310- The Kubernetes provider is [supported by Velero](https://velero.io/docs/latest/supported-providers/).
311- Both clusters are on the same Kubernetes provider, as this is a requirement of [Velero's native support for migrating persistent volumes](https://velero.io/docs/latest/migration-case/).
312- The restored deployment on the destination cluster will have the same name, namespace, topology and credentials as the original deployment on the source cluster.
313
314This method involves the following steps:
315
316- Install Velero on the source and destination clusters.
317- Use Velero to back up the PersistentVolumes (PVs) used by the deployment on the source cluster.
318- Use Velero to restore the backed-up PVs on the destination cluster.
319- Create a new deployment on the destination cluster with the same chart, deployment name, credentials and other parameters as the original. This new deployment will use the restored PVs and hence the original data.
320
321Refer to our detailed [tutorial on backing up and restoring MongoDB&reg; chart deployments on Kubernetes](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-backup-restore-data-mongodb-kubernetes-index.html), which covers both these approaches, for more information.
322
323### Use custom Prometheus rules
324
325Custom Prometheus rules can be defined for the Prometheus Operator by using the `prometheusRule` parameter. A basic configuration example is shown below:
326
327```text
328 metrics:
329 enabled: true
330 prometheusRule:
331 enabled: true
332 rules:
333 - name: rule1
334 rules:
335 - alert: HighRequestLatency
336 expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
337 for: 10m
338 labels:
339 severity: page
340 annotations:
341 summary: High request latency
342```
343
344### Enable SSL/TLS
345
346This chart supports enabling SSL/TLS between nodes in the cluster, as well as between MongoDB(&reg;) clients and nodes, by setting the `MONGODB_EXTRA_FLAGS` and `MONGODB_CLIENT_EXTRA_FLAGS` container environment variables, together with the correct `MONGODB_ADVERTISED_HOSTNAME`. To enable full TLS encryption, set the `tls.enabled` parameter to `true`.
347
348#### Generate the self-signed certificates via pre-install Helm hooks
349
350The `secrets-ca.yaml` file utilizes the Helm "pre-install" hook to ensure that the certificates will only be generated on chart install.
351
352The `genCA()` function will create a new self-signed x509 certificate authority. The `genSignedCert()` function creates an object with the certificate and key, which are base64-encoded and used in a YAML-like object. The `genSignedCert()` function is passed the CN, an empty IP list (the nil part), the validity and the CA created previously.
353
354A Kubernetes Secret is used to hold the signed certificate created above, and the `initContainer` sets up the rest. Using Helm's hook annotations ensures that the certificates will only be generated on chart install. This will prevent overriding the certificates if the chart is upgraded.
355
356#### Use your own CA
357
358To use your own CA, set `tls.caCert` and `tls.caKey` with appropriate base64 encoded data. The `secrets-ca.yaml` file will utilize this data to create the Secret.
359
360> NOTE: Currently, only RSA private keys are supported.
361
362#### Use your own certificates
363
364To use your own certificates, set `tls.standalone.existingSecret`, `tls.replicaset.existingSecrets`, `tls.hidden.existingSecrets` and/or `tls.arbiter.existingSecret` secrets according to your needs. All of them must be references to `kubernetes.io/tls` secrets and the certificates must be created using the same CA. The CA can be added directly to each secret using the `ca.crt` key:
365
366```shell
367kubectl create secret tls "mongodb-0-cert" --cert="mongodb-0.crt" --key="mongodb-0.key"
368kubectl patch secret "mongodb-0-cert" -p="{\"data\":{\"ca.crt\": \"$(cat ca.crt | base64 -w0 )\"}}"
369```
370
371Or adding it to the "endpoint certificate" and setting the value `tls.pemChainIncluded`. If we reuse the example above, the `mongodb-0.crt` file should include CA cert and we shouldn't need to patch the secret to add the `ca.crt` set key.
372
373> NOTE: Certificates should be signed for the fully qualified domain names. If `externalAccess.service.publicNames`is set, those names should be used in the certificates set in `tls.replicaset.existingSecrets`.
374
375#### Access the cluster
376
377To access the cluster, enable the init container which generates the MongoDB(&reg;) server/client PEM key needed to access the cluster. Please be sure to include the `$my_hostname` section with your actual hostname, and the alternative hostnames section should contain the hostnames that should be allowed access to the MongoDB(&reg;) replicaset. Additionally, if external access is enabled, the load balancer IP addresses are added to the alternative names list.
378
379> NOTE: You will be generating self-signed certificates for the MongoDB(&reg;) deployment. The init container generates a new MongoDB(&reg;) private key which will be used to create a Certificate Authority (CA) and the public certificate for the CA. The Certificate Signing Request will be created as well and signed using the private key of the CA previously created. Finally, the PEM bundle will be created using the private key and public certificate. This process will be repeated for each node in the cluster.
380
381#### Start the cluster
382
383After the certificates have been generated and made available to the containers at the correct mount points, the MongoDB(&reg;) server will be started with TLS enabled. The options for the TLS mode will be one of `disabled`, `allowTLS`, `preferTLS`, or `requireTLS`. This value can be changed via the `MONGODB_EXTRA_FLAGS` field using the `tlsMode` parameter. The client should now be able to connect to the TLS-enabled cluster with the provided certificates.
384
385### Set Pod affinity
386
387This chart allows you to set your custom affinity using the `XXX.affinity` parameter(s). Find more information about Pod affinity in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
388
389As an alternative, you can use the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `XXX.podAffinityPreset`, `XXX.podAntiAffinityPreset`, or `XXX.nodeAffinityPreset` parameters.
390
391## Persistence
392
393The [Bitnami MongoDB(&reg;)](https://github.com/bitnami/containers/tree/main/bitnami/mongodb) image stores the MongoDB(&reg;) data and configurations at the `/bitnami/mongodb` path of the container.
394
395The chart mounts a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning.
396
397If you encounter errors when working with persistent volumes, refer to our [troubleshooting guide for persistent volumes](https://docs.bitnami.com/kubernetes/faq/troubleshooting/troubleshooting-persistence-volumes/).
398
399## Parameters
400
401### Global parameters
402
403| Name | Description | Value |
404| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
405| `global.imageRegistry` | Global Docker image registry | `""` |
406| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
407| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
408| `global.storageClass` | DEPRECATED: use global.defaultStorageClass instead | `""` |
409| `global.namespaceOverride` | Override the namespace for resource deployed by the chart, but can itself be overridden by the local namespaceOverride | `""` |
410| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
411
412### Common parameters
413
414| Name | Description | Value |
415| ------------------------- | --------------------------------------------------------------------------------------------------------- | --------------- |
416| `nameOverride` | String to partially override mongodb.fullname template (will maintain the release name) | `""` |
417| `fullnameOverride` | String to fully override mongodb.fullname template | `""` |
418| `namespaceOverride` | String to fully override common.names.namespace | `""` |
419| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` |
420| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
421| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
422| `commonLabels` | Add labels to all the deployed resources (sub-charts are not considered). Evaluated as a template | `{}` |
423| `commonAnnotations` | Common annotations to add to all Mongo resources (sub-charts are not considered). Evaluated as a template | `{}` |
424| `topologyKey` | Override common lib default topology key. If empty - "kubernetes.io/hostname" is used | `""` |
425| `serviceBindings.enabled` | Create secret for service binding (Experimental) | `false` |
426| `enableServiceLinks` | Whether information about services should be injected into pod's environment variable | `true` |
427| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
428| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
429| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
430
431### MongoDB(&reg;) parameters
432
433| Name | Description | Value |
434| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
435| `image.registry` | MongoDB(&reg;) image registry | `REGISTRY_NAME` |
436| `image.repository` | MongoDB(&reg;) image registry | `REPOSITORY_NAME/mongodb` |
437| `image.digest` | MongoDB(&reg;) image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
438| `image.pullPolicy` | MongoDB(&reg;) image pull policy | `IfNotPresent` |
439| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
440| `image.debug` | Set to true if you would like to see extra information on logs | `false` |
441| `schedulerName` | Name of the scheduler (other than default) to dispatch pods | `""` |
442| `architecture` | MongoDB(&reg;) architecture (`standalone` or `replicaset`) | `standalone` |
443| `useStatefulSet` | Set to true to use a StatefulSet instead of a Deployment (only when `architecture=standalone`) | `false` |
444| `auth.enabled` | Enable authentication | `true` |
445| `auth.rootUser` | MongoDB(&reg;) root user | `root` |
446| `auth.rootPassword` | MongoDB(&reg;) root password | `""` |
447| `auth.usernames` | List of custom users to be created during the initialization | `[]` |
448| `auth.passwords` | List of passwords for the custom users set at `auth.usernames` | `[]` |
449| `auth.databases` | List of custom databases to be created during the initialization | `[]` |
450| `auth.username` | DEPRECATED: use `auth.usernames` instead | `""` |
451| `auth.password` | DEPRECATED: use `auth.passwords` instead | `""` |
452| `auth.database` | DEPRECATED: use `auth.databases` instead | `""` |
453| `auth.replicaSetKey` | Key used for authentication in the replicaset (only when `architecture=replicaset`) | `""` |
454| `auth.existingSecret` | Existing secret with MongoDB(&reg;) credentials (keys: `mongodb-passwords`, `mongodb-root-password`, `mongodb-metrics-password`, `mongodb-replica-set-key`) | `""` |
455| `tls.enabled` | Enable MongoDB(&reg;) TLS support between nodes in the cluster as well as between mongo clients and nodes | `false` |
456| `tls.mTLS.enabled` | IF TLS support is enabled, require clients to provide certificates | `true` |
457| `tls.autoGenerated` | Generate a custom CA and self-signed certificates | `true` |
458| `tls.existingSecret` | Existing secret with TLS certificates (keys: `mongodb-ca-cert`, `mongodb-ca-key`) | `""` |
459| `tls.caCert` | Custom CA certificated (base64 encoded) | `""` |
460| `tls.caKey` | CA certificate private key (base64 encoded) | `""` |
461| `tls.pemChainIncluded` | Flag to denote that the Certificate Authority (CA) certificates are bundled with the endpoint cert. | `false` |
462| `tls.standalone.existingSecret` | Existing secret with TLS certificates (`tls.key`, `tls.crt`, `ca.crt`) or (`tls.key`, `tls.crt`) with tls.pemChainIncluded set as enabled. | `""` |
463| `tls.replicaset.existingSecrets` | Array of existing secrets with TLS certificates (`tls.key`, `tls.crt`, `ca.crt`) or (`tls.key`, `tls.crt`) with tls.pemChainIncluded set as enabled. | `[]` |
464| `tls.hidden.existingSecrets` | Array of existing secrets with TLS certificates (`tls.key`, `tls.crt`, `ca.crt`) or (`tls.key`, `tls.crt`) with tls.pemChainIncluded set as enabled. | `[]` |
465| `tls.arbiter.existingSecret` | Existing secret with TLS certificates (`tls.key`, `tls.crt`, `ca.crt`) or (`tls.key`, `tls.crt`) with tls.pemChainIncluded set as enabled. | `""` |
466| `tls.image.registry` | Init container TLS certs setup image registry | `REGISTRY_NAME` |
467| `tls.image.repository` | Init container TLS certs setup image repository | `REPOSITORY_NAME/nginx` |
468| `tls.image.digest` | Init container TLS certs setup image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
469| `tls.image.pullPolicy` | Init container TLS certs setup image pull policy | `IfNotPresent` |
470| `tls.image.pullSecrets` | Init container TLS certs specify docker-registry secret names as an array | `[]` |
471| `tls.extraDnsNames` | Add extra dns names to the CA, can solve x509 auth issue for pod clients | `[]` |
472| `tls.mode` | Allows to set the tls mode which should be used when tls is enabled (options: `allowTLS`, `preferTLS`, `requireTLS`) | `requireTLS` |
473| `tls.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if tls.resources is set (tls.resources is recommended for production). | `nano` |
474| `tls.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
475| `tls.securityContext` | Init container generate-tls-cert Security context | `{}` |
476| `automountServiceAccountToken` | Mount Service Account token in pod | `false` |
477| `hostAliases` | Add deployment host aliases | `[]` |
478| `replicaSetName` | Name of the replica set (only when `architecture=replicaset`) | `rs0` |
479| `replicaSetHostnames` | Enable DNS hostnames in the replicaset config (only when `architecture=replicaset`) | `true` |
480| `enableIPv6` | Switch to enable/disable IPv6 on MongoDB(&reg;) | `false` |
481| `directoryPerDB` | Switch to enable/disable DirectoryPerDB on MongoDB(&reg;) | `false` |
482| `systemLogVerbosity` | MongoDB(&reg;) system log verbosity level | `0` |
483| `disableSystemLog` | Switch to enable/disable MongoDB(&reg;) system log | `false` |
484| `disableJavascript` | Switch to enable/disable MongoDB(&reg;) server-side JavaScript execution | `false` |
485| `enableJournal` | Switch to enable/disable MongoDB(&reg;) Journaling | `true` |
486| `configuration` | MongoDB(&reg;) configuration file to be used for Primary and Secondary nodes | `""` |
487
488### replicaSetConfigurationSettings settings applied during runtime (not via configuration file)
489
490| Name | Description | Value |
491| ----------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------- |
492| `replicaSetConfigurationSettings.enabled` | Enable MongoDB(&reg;) Switch to enable/disable configuring MongoDB(&reg;) run time rs.conf settings | `false` |
493| `replicaSetConfigurationSettings.configuration` | run-time rs.conf settings | `{}` |
494| `existingConfigmap` | Name of existing ConfigMap with MongoDB(&reg;) configuration for Primary and Secondary nodes | `""` |
495| `initdbScripts` | Dictionary of initdb scripts | `{}` |
496| `initdbScriptsConfigMap` | Existing ConfigMap with custom initdb scripts | `""` |
497| `command` | Override default container command (useful when using custom images) | `[]` |
498| `args` | Override default container args (useful when using custom images) | `[]` |
499| `extraFlags` | MongoDB(&reg;) additional command line flags | `[]` |
500| `extraEnvVars` | Extra environment variables to add to MongoDB(&reg;) pods | `[]` |
501| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` |
502| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars (in case of sensitive data) | `""` |
503
504### MongoDB(&reg;) statefulset parameters
505
506| Name | Description | Value |
507| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
508| `annotations` | Additional labels to be added to the MongoDB(&reg;) statefulset. Evaluated as a template | `{}` |
509| `labels` | Annotations to be added to the MongoDB(&reg;) statefulset. Evaluated as a template | `{}` |
510| `replicaCount` | Number of MongoDB(&reg;) nodes | `2` |
511| `updateStrategy.type` | Strategy to use to replace existing MongoDB(&reg;) pods. When architecture=standalone and useStatefulSet=false, | `RollingUpdate` |
512| `podManagementPolicy` | Pod management policy for MongoDB(&reg;) | `OrderedReady` |
513| `podAffinityPreset` | MongoDB(&reg;) Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
514| `podAntiAffinityPreset` | MongoDB(&reg;) Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
515| `nodeAffinityPreset.type` | MongoDB(&reg;) Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
516| `nodeAffinityPreset.key` | MongoDB(&reg;) Node label key to match Ignored if `affinity` is set. | `""` |
517| `nodeAffinityPreset.values` | MongoDB(&reg;) Node label values to match. Ignored if `affinity` is set. | `[]` |
518| `affinity` | MongoDB(&reg;) Affinity for pod assignment | `{}` |
519| `nodeSelector` | MongoDB(&reg;) Node labels for pod assignment | `{}` |
520| `tolerations` | MongoDB(&reg;) Tolerations for pod assignment | `[]` |
521| `topologySpreadConstraints` | MongoDB(&reg;) Spread Constraints for Pods | `[]` |
522| `lifecycleHooks` | LifecycleHook for the MongoDB(&reg;) container(s) to automate configuration before or after startup | `{}` |
523| `terminationGracePeriodSeconds` | MongoDB(&reg;) Termination Grace Period | `""` |
524| `podLabels` | MongoDB(&reg;) pod labels | `{}` |
525| `podAnnotations` | MongoDB(&reg;) Pod annotations | `{}` |
526| `priorityClassName` | Name of the existing priority class to be used by MongoDB(&reg;) pod(s) | `""` |
527| `runtimeClassName` | Name of the runtime class to be used by MongoDB(&reg;) pod(s) | `""` |
528| `podSecurityContext.enabled` | Enable MongoDB(&reg;) pod(s)' Security Context | `true` |
529| `podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
530| `podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
531| `podSecurityContext.fsGroup` | Group ID for the volumes of the MongoDB(&reg;) pod(s) | `1001` |
532| `podSecurityContext.sysctls` | sysctl settings of the MongoDB(&reg;) pod(s)' | `[]` |
533| `containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
534| `containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
535| `containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
536| `containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
537| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
538| `containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
539| `containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
540| `containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
541| `containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
542| `containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
543| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `small` |
544| `resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
545| `containerPorts.mongodb` | MongoDB(&reg;) container port | `27017` |
546| `livenessProbe.enabled` | Enable livenessProbe | `true` |
547| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
548| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `20` |
549| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `10` |
550| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
551| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
552| `readinessProbe.enabled` | Enable readinessProbe | `true` |
553| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
554| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
555| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
556| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
557| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
558| `startupProbe.enabled` | Enable startupProbe | `false` |
559| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
560| `startupProbe.periodSeconds` | Period seconds for startupProbe | `20` |
561| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `10` |
562| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` |
563| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
564| `customLivenessProbe` | Override default liveness probe for MongoDB(&reg;) containers | `{}` |
565| `customReadinessProbe` | Override default readiness probe for MongoDB(&reg;) containers | `{}` |
566| `customStartupProbe` | Override default startup probe for MongoDB(&reg;) containers | `{}` |
567| `initContainers` | Add additional init containers for the hidden node pod(s) | `[]` |
568| `sidecars` | Add additional sidecar containers for the MongoDB(&reg;) pod(s) | `[]` |
569| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the MongoDB(&reg;) container(s) | `[]` |
570| `extraVolumes` | Optionally specify extra list of additional volumes to the MongoDB(&reg;) statefulset | `[]` |
571| `pdb.create` | Enable/disable a Pod Disruption Budget creation for MongoDB(&reg;) pod(s) | `true` |
572| `pdb.minAvailable` | Minimum number/percentage of MongoDB(&reg;) pods that must still be available after the eviction | `""` |
573| `pdb.maxUnavailable` | Maximum number/percentage of MongoDB(&reg;) pods that may be made unavailable after the eviction. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty. | `""` |
574
575### Traffic exposure parameters
576
577| Name | Description | Value |
578| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
579| `service.nameOverride` | MongoDB(&reg;) service name | `""` |
580| `service.type` | Kubernetes Service type (only for standalone architecture) | `ClusterIP` |
581| `service.portName` | MongoDB(&reg;) service port name (only for standalone architecture) | `mongodb` |
582| `service.ports.mongodb` | MongoDB(&reg;) service port. | `27017` |
583| `service.nodePorts.mongodb` | Port to bind to for NodePort and LoadBalancer service types (only for standalone architecture) | `""` |
584| `service.clusterIP` | MongoDB(&reg;) service cluster IP (only for standalone architecture) | `""` |
585| `service.externalIPs` | Specify the externalIP value ClusterIP service type (only for standalone architecture) | `[]` |
586| `service.loadBalancerIP` | loadBalancerIP for MongoDB(&reg;) Service (only for standalone architecture) | `""` |
587| `service.loadBalancerClass` | loadBalancerClass for MongoDB(&reg;) Service (only for standalone architecture) | `""` |
588| `service.loadBalancerSourceRanges` | Address(es) that are allowed when service is LoadBalancer (only for standalone architecture) | `[]` |
589| `service.allocateLoadBalancerNodePorts` | Wheter to allocate node ports when service type is LoadBalancer | `true` |
590| `service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
591| `service.annotations` | Provide any additional annotations that may be required | `{}` |
592| `service.externalTrafficPolicy` | service external traffic policy (only for standalone architecture) | `Local` |
593| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
594| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
595| `service.headless.annotations` | Annotations for the headless service. | `{}` |
596| `externalAccess.enabled` | Enable Kubernetes external cluster access to MongoDB(&reg;) nodes (only for replicaset architecture) | `false` |
597| `externalAccess.autoDiscovery.enabled` | Enable using an init container to auto-detect external IPs by querying the K8s API | `false` |
598| `externalAccess.autoDiscovery.image.registry` | Init container auto-discovery image registry | `REGISTRY_NAME` |
599| `externalAccess.autoDiscovery.image.repository` | Init container auto-discovery image repository | `REPOSITORY_NAME/kubectl` |
600| `externalAccess.autoDiscovery.image.digest` | Init container auto-discovery image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
601| `externalAccess.autoDiscovery.image.pullPolicy` | Init container auto-discovery image pull policy | `IfNotPresent` |
602| `externalAccess.autoDiscovery.image.pullSecrets` | Init container auto-discovery image pull secrets | `[]` |
603| `externalAccess.autoDiscovery.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if externalAccess.autoDiscovery.resources is set (externalAccess.autoDiscovery.resources is recommended for production). | `nano` |
604| `externalAccess.autoDiscovery.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
605| `externalAccess.dnsCheck.image.registry` | Init container dns-check image registry | `REGISTRY_NAME` |
606| `externalAccess.dnsCheck.image.repository` | Init container dns-check image repository | `REPOSITORY_NAME/kubectl` |
607| `externalAccess.dnsCheck.image.digest` | Init container dns-check image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
608| `externalAccess.dnsCheck.image.pullPolicy` | Init container dns-check image pull policy | `IfNotPresent` |
609| `externalAccess.dnsCheck.image.pullSecrets` | Init container dns-check image pull secrets | `[]` |
610| `externalAccess.dnsCheck.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if externalAccess.autoDiscovery.resources is set (externalAccess.autoDiscovery.resources is recommended for production). | `nano` |
611| `externalAccess.dnsCheck.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
612| `externalAccess.externalMaster.enabled` | Use external master for bootstrapping | `false` |
613| `externalAccess.externalMaster.host` | External master host to bootstrap from | `""` |
614| `externalAccess.externalMaster.port` | Port for MongoDB(&reg;) service external master host | `27017` |
615| `externalAccess.service.type` | Kubernetes Service type for external access. Allowed values: NodePort, LoadBalancer or ClusterIP | `LoadBalancer` |
616| `externalAccess.service.portName` | MongoDB(&reg;) port name used for external access when service type is LoadBalancer | `mongodb` |
617| `externalAccess.service.ports.mongodb` | MongoDB(&reg;) port used for external access when service type is LoadBalancer | `27017` |
618| `externalAccess.service.loadBalancerIPs` | Array of load balancer IPs for MongoDB(&reg;) nodes | `[]` |
619| `externalAccess.service.publicNames` | Array of public names. The size should be equal to the number of replicas. | `[]` |
620| `externalAccess.service.loadBalancerClass` | loadBalancerClass when service type is LoadBalancer | `""` |
621| `externalAccess.service.loadBalancerSourceRanges` | Address(es) that are allowed when service is LoadBalancer | `[]` |
622| `externalAccess.service.allocateLoadBalancerNodePorts` | Whether to allocate node ports when service type is LoadBalancer | `true` |
623| `externalAccess.service.externalTrafficPolicy` | MongoDB(&reg;) service external traffic policy | `Local` |
624| `externalAccess.service.nodePorts` | Array of node ports used to configure MongoDB(&reg;) advertised hostname when service type is NodePort | `[]` |
625| `externalAccess.service.domain` | Domain or external IP used to configure MongoDB(&reg;) advertised hostname when service type is NodePort | `""` |
626| `externalAccess.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
627| `externalAccess.service.annotations` | Service annotations for external access. These annotations are common for all services created. | `{}` |
628| `externalAccess.service.annotationsList` | Service annotations for eache external service. This value contains a list allowing different annotations per each external service. | `[]` |
629| `externalAccess.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
630| `externalAccess.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
631| `externalAccess.hidden.enabled` | Enable Kubernetes external cluster access to MongoDB(&reg;) hidden nodes | `false` |
632| `externalAccess.hidden.service.type` | Kubernetes Service type for external access. Allowed values: NodePort or LoadBalancer | `LoadBalancer` |
633| `externalAccess.hidden.service.portName` | MongoDB(&reg;) port name used for external access when service type is LoadBalancer | `mongodb` |
634| `externalAccess.hidden.service.ports.mongodb` | MongoDB(&reg;) port used for external access when service type is LoadBalancer | `27017` |
635| `externalAccess.hidden.service.loadBalancerIPs` | Array of load balancer IPs for MongoDB(&reg;) nodes | `[]` |
636| `externalAccess.hidden.service.loadBalancerClass` | loadBalancerClass when service type is LoadBalancer | `""` |
637| `externalAccess.hidden.service.loadBalancerSourceRanges` | Address(es) that are allowed when service is LoadBalancer | `[]` |
638| `externalAccess.hidden.service.allocateLoadBalancerNodePorts` | Wheter to allocate node ports when service type is LoadBalancer | `true` |
639| `externalAccess.hidden.service.externalTrafficPolicy` | MongoDB(&reg;) service external traffic policy | `Local` |
640| `externalAccess.hidden.service.nodePorts` | Array of node ports used to configure MongoDB(&reg;) advertised hostname when service type is NodePort. Length must be the same as replicaCount | `[]` |
641| `externalAccess.hidden.service.domain` | Domain or external IP used to configure MongoDB(&reg;) advertised hostname when service type is NodePort | `""` |
642| `externalAccess.hidden.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
643| `externalAccess.hidden.service.annotations` | Service annotations for external access | `{}` |
644| `externalAccess.hidden.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
645| `externalAccess.hidden.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
646
647### Network policy parameters
648
649| Name | Description | Value |
650| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
651| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
652| `networkPolicy.allowExternal` | Don't require server label for connections | `true` |
653| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
654| `networkPolicy.addExternalClientAccess` | Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true. | `true` |
655| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
656| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
657| `networkPolicy.ingressPodMatchLabels` | Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
658| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
659| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true. | `{}` |
660| `persistence.enabled` | Enable MongoDB(&reg;) data persistence using PVC | `true` |
661| `persistence.name` | Name of the PVC and mounted volume | `datadir` |
662| `persistence.medium` | Provide a medium for `emptyDir` volumes. | `""` |
663| `persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` (only when `architecture=standalone`) | `""` |
664| `persistence.resourcePolicy` | Setting it to "keep" to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted | `""` |
665| `persistence.storageClass` | PVC Storage Class for MongoDB(&reg;) data volume | `""` |
666| `persistence.accessModes` | PV Access Mode | `["ReadWriteOnce"]` |
667| `persistence.size` | PVC Storage Request for MongoDB(&reg;) data volume | `8Gi` |
668| `persistence.annotations` | PVC annotations | `{}` |
669| `persistence.labels` | PVC labels | `{}` |
670| `persistence.mountPath` | Path to mount the volume at | `/bitnami/mongodb` |
671| `persistence.subPath` | Subdirectory of the volume to mount at | `""` |
672| `persistence.volumeClaimTemplates.selector` | A label query over volumes to consider for binding (e.g. when using local volumes) | `{}` |
673| `persistence.volumeClaimTemplates.requests` | Custom PVC requests attributes | `{}` |
674| `persistence.volumeClaimTemplates.dataSource` | Add dataSource to the VolumeClaimTemplate | `{}` |
675| `persistentVolumeClaimRetentionPolicy.enabled` | Enable Persistent volume retention policy for MongoDB(&reg;) Statefulset | `false` |
676| `persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` |
677| `persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` |
678
679### Backup parameters
680
681| Name | Description | Value |
682| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
683| `backup.enabled` | Enable the logical dump of the database "regularly" | `false` |
684| `backup.cronjob.schedule` | Set the cronjob parameter schedule | `@daily` |
685| `backup.cronjob.concurrencyPolicy` | Set the cronjob parameter concurrencyPolicy | `Allow` |
686| `backup.cronjob.failedJobsHistoryLimit` | Set the cronjob parameter failedJobsHistoryLimit | `1` |
687| `backup.cronjob.successfulJobsHistoryLimit` | Set the cronjob parameter successfulJobsHistoryLimit | `3` |
688| `backup.cronjob.startingDeadlineSeconds` | Set the cronjob parameter startingDeadlineSeconds | `""` |
689| `backup.cronjob.ttlSecondsAfterFinished` | Set the cronjob parameter ttlSecondsAfterFinished | `""` |
690| `backup.cronjob.restartPolicy` | Set the cronjob parameter restartPolicy | `OnFailure` |
691| `backup.cronjob.backoffLimit` | Set the cronjob parameter backoffLimit | `6` |
692| `backup.cronjob.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
693| `backup.cronjob.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
694| `backup.cronjob.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
695| `backup.cronjob.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
696| `backup.cronjob.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
697| `backup.cronjob.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
698| `backup.cronjob.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
699| `backup.cronjob.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
700| `backup.cronjob.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
701| `backup.cronjob.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
702| `backup.cronjob.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `none` |
703| `backup.cronjob.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
704| `backup.cronjob.command` | Set backup container's command to run | `[]` |
705| `backup.cronjob.labels` | Set the cronjob labels | `{}` |
706| `backup.cronjob.annotations` | Set the cronjob annotations | `{}` |
707| `backup.cronjob.storage.existingClaim` | Provide an existing `PersistentVolumeClaim` (only when `architecture=standalone`) | `""` |
708| `backup.cronjob.storage.resourcePolicy` | Setting it to "keep" to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted | `""` |
709| `backup.cronjob.storage.storageClass` | PVC Storage Class for the backup data volume | `""` |
710| `backup.cronjob.storage.accessModes` | PV Access Mode | `["ReadWriteOnce"]` |
711| `backup.cronjob.storage.size` | PVC Storage Request for the backup data volume | `8Gi` |
712| `backup.cronjob.storage.annotations` | PVC annotations | `{}` |
713| `backup.cronjob.storage.mountPath` | Path to mount the volume at | `/backup/mongodb` |
714| `backup.cronjob.storage.subPath` | Subdirectory of the volume to mount at | `""` |
715| `backup.cronjob.storage.volumeClaimTemplates.selector` | A label query over volumes to consider for binding (e.g. when using local volumes) | `{}` |
716
717### RBAC parameters
718
719| Name | Description | Value |
720| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
721| `serviceAccount.create` | Enable creation of ServiceAccount for MongoDB(&reg;) pods | `true` |
722| `serviceAccount.name` | Name of the created serviceAccount | `""` |
723| `serviceAccount.annotations` | Additional Service Account annotations | `{}` |
724| `serviceAccount.automountServiceAccountToken` | Allows auto mount of ServiceAccountToken on the serviceAccount created | `false` |
725| `rbac.create` | Whether to create & use RBAC resources or not | `false` |
726| `rbac.rules` | Custom rules to create following the role specification | `[]` |
727| `podSecurityPolicy.create` | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | `false` |
728| `podSecurityPolicy.allowPrivilegeEscalation` | Enable privilege escalation | `false` |
729| `podSecurityPolicy.privileged` | Allow privileged | `false` |
730| `podSecurityPolicy.spec` | Specify the full spec to use for Pod Security Policy | `{}` |
731
732### Volume Permissions parameters
733
734| Name | Description | Value |
735| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
736| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false` |
737| `volumePermissions.image.registry` | Init container volume-permissions image registry | `REGISTRY_NAME` |
738| `volumePermissions.image.repository` | Init container volume-permissions image repository | `REPOSITORY_NAME/os-shell` |
739| `volumePermissions.image.digest` | Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
740| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` |
741| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
742| `volumePermissions.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). | `nano` |
743| `volumePermissions.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
744| `volumePermissions.securityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
745| `volumePermissions.securityContext.runAsUser` | User ID for the volumePermissions container | `0` |
746
747### Arbiter parameters
748
749| Name | Description | Value |
750| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
751| `arbiter.enabled` | Enable deploying the arbiter | `true` |
752| `arbiter.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
753| `arbiter.hostAliases` | Add deployment host aliases | `[]` |
754| `arbiter.configuration` | Arbiter configuration file to be used | `""` |
755| `arbiter.existingConfigmap` | Name of existing ConfigMap with Arbiter configuration | `""` |
756| `arbiter.command` | Override default container command (useful when using custom images) | `[]` |
757| `arbiter.args` | Override default container args (useful when using custom images) | `[]` |
758| `arbiter.extraFlags` | Arbiter additional command line flags | `[]` |
759| `arbiter.extraEnvVars` | Extra environment variables to add to Arbiter pods | `[]` |
760| `arbiter.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` |
761| `arbiter.extraEnvVarsSecret` | Name of existing Secret containing extra env vars (in case of sensitive data) | `""` |
762| `arbiter.annotations` | Additional labels to be added to the Arbiter statefulset | `{}` |
763| `arbiter.labels` | Annotations to be added to the Arbiter statefulset | `{}` |
764| `arbiter.topologySpreadConstraints` | MongoDB(&reg;) Spread Constraints for arbiter Pods | `[]` |
765| `arbiter.lifecycleHooks` | LifecycleHook for the Arbiter container to automate configuration before or after startup | `{}` |
766| `arbiter.terminationGracePeriodSeconds` | Arbiter Termination Grace Period | `""` |
767| `arbiter.updateStrategy.type` | Strategy that will be employed to update Pods in the StatefulSet | `RollingUpdate` |
768| `arbiter.podManagementPolicy` | Pod management policy for MongoDB(&reg;) | `OrderedReady` |
769| `arbiter.schedulerName` | Name of the scheduler (other than default) to dispatch pods | `""` |
770| `arbiter.podAffinityPreset` | Arbiter Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
771| `arbiter.podAntiAffinityPreset` | Arbiter Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
772| `arbiter.nodeAffinityPreset.type` | Arbiter Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
773| `arbiter.nodeAffinityPreset.key` | Arbiter Node label key to match Ignored if `affinity` is set. | `""` |
774| `arbiter.nodeAffinityPreset.values` | Arbiter Node label values to match. Ignored if `affinity` is set. | `[]` |
775| `arbiter.affinity` | Arbiter Affinity for pod assignment | `{}` |
776| `arbiter.nodeSelector` | Arbiter Node labels for pod assignment | `{}` |
777| `arbiter.tolerations` | Arbiter Tolerations for pod assignment | `[]` |
778| `arbiter.podLabels` | Arbiter pod labels | `{}` |
779| `arbiter.podAnnotations` | Arbiter Pod annotations | `{}` |
780| `arbiter.priorityClassName` | Name of the existing priority class to be used by Arbiter pod(s) | `""` |
781| `arbiter.runtimeClassName` | Name of the runtime class to be used by Arbiter pod(s) | `""` |
782| `arbiter.podSecurityContext.enabled` | Enable Arbiter pod(s)' Security Context | `true` |
783| `arbiter.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
784| `arbiter.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
785| `arbiter.podSecurityContext.fsGroup` | Group ID for the volumes of the Arbiter pod(s) | `1001` |
786| `arbiter.podSecurityContext.sysctls` | sysctl settings of the Arbiter pod(s)' | `[]` |
787| `arbiter.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
788| `arbiter.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
789| `arbiter.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
790| `arbiter.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
791| `arbiter.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
792| `arbiter.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
793| `arbiter.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
794| `arbiter.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
795| `arbiter.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
796| `arbiter.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
797| `arbiter.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if arbiter.resources is set (arbiter.resources is recommended for production). | `small` |
798| `arbiter.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
799| `arbiter.containerPorts.mongodb` | MongoDB(&reg;) arbiter container port | `27017` |
800| `arbiter.livenessProbe.enabled` | Enable livenessProbe | `true` |
801| `arbiter.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
802| `arbiter.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `20` |
803| `arbiter.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `10` |
804| `arbiter.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
805| `arbiter.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
806| `arbiter.readinessProbe.enabled` | Enable readinessProbe | `true` |
807| `arbiter.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
808| `arbiter.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `20` |
809| `arbiter.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `10` |
810| `arbiter.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
811| `arbiter.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
812| `arbiter.startupProbe.enabled` | Enable startupProbe | `false` |
813| `arbiter.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
814| `arbiter.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
815| `arbiter.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
816| `arbiter.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` |
817| `arbiter.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
818| `arbiter.customLivenessProbe` | Override default liveness probe for Arbiter containers | `{}` |
819| `arbiter.customReadinessProbe` | Override default readiness probe for Arbiter containers | `{}` |
820| `arbiter.customStartupProbe` | Override default startup probe for Arbiter containers | `{}` |
821| `arbiter.initContainers` | Add additional init containers for the Arbiter pod(s) | `[]` |
822| `arbiter.sidecars` | Add additional sidecar containers for the Arbiter pod(s) | `[]` |
823| `arbiter.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Arbiter container(s) | `[]` |
824| `arbiter.extraVolumes` | Optionally specify extra list of additional volumes to the Arbiter statefulset | `[]` |
825| `arbiter.pdb.create` | Enable/disable a Pod Disruption Budget creation for Arbiter pod(s) | `true` |
826| `arbiter.pdb.minAvailable` | Minimum number/percentage of Arbiter pods that should remain scheduled | `""` |
827| `arbiter.pdb.maxUnavailable` | Maximum number/percentage of Arbiter pods that may be made unavailable. Defaults to `1` if both `arbiter.pdb.minAvailable` and `arbiter.pdb.maxUnavailable` are empty. | `""` |
828| `arbiter.service.nameOverride` | The arbiter service name | `""` |
829| `arbiter.service.ports.mongodb` | MongoDB(&reg;) service port | `27017` |
830| `arbiter.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
831| `arbiter.service.annotations` | Provide any additional annotations that may be required | `{}` |
832| `arbiter.service.headless.annotations` | Annotations for the headless service. | `{}` |
833
834### Hidden Node parameters
835
836| Name | Description | Value |
837| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
838| `hidden.enabled` | Enable deploying the hidden nodes | `false` |
839| `hidden.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
840| `hidden.hostAliases` | Add deployment host aliases | `[]` |
841| `hidden.configuration` | Hidden node configuration file to be used | `""` |
842| `hidden.existingConfigmap` | Name of existing ConfigMap with Hidden node configuration | `""` |
843| `hidden.command` | Override default container command (useful when using custom images) | `[]` |
844| `hidden.args` | Override default container args (useful when using custom images) | `[]` |
845| `hidden.extraFlags` | Hidden node additional command line flags | `[]` |
846| `hidden.extraEnvVars` | Extra environment variables to add to Hidden node pods | `[]` |
847| `hidden.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` |
848| `hidden.extraEnvVarsSecret` | Name of existing Secret containing extra env vars (in case of sensitive data) | `""` |
849| `hidden.annotations` | Additional labels to be added to thehidden node statefulset | `{}` |
850| `hidden.labels` | Annotations to be added to the hidden node statefulset | `{}` |
851| `hidden.topologySpreadConstraints` | MongoDB(&reg;) Spread Constraints for hidden Pods | `[]` |
852| `hidden.lifecycleHooks` | LifecycleHook for the Hidden container to automate configuration before or after startup | `{}` |
853| `hidden.replicaCount` | Number of hidden nodes (only when `architecture=replicaset`) | `1` |
854| `hidden.terminationGracePeriodSeconds` | Hidden Termination Grace Period | `""` |
855| `hidden.updateStrategy.type` | Strategy that will be employed to update Pods in the StatefulSet | `RollingUpdate` |
856| `hidden.podManagementPolicy` | Pod management policy for hidden node | `OrderedReady` |
857| `hidden.schedulerName` | Name of the scheduler (other than default) to dispatch pods | `""` |
858| `hidden.podAffinityPreset` | Hidden node Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
859| `hidden.podAntiAffinityPreset` | Hidden node Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
860| `hidden.nodeAffinityPreset.type` | Hidden Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
861| `hidden.nodeAffinityPreset.key` | Hidden Node label key to match Ignored if `affinity` is set. | `""` |
862| `hidden.nodeAffinityPreset.values` | Hidden Node label values to match. Ignored if `affinity` is set. | `[]` |
863| `hidden.affinity` | Hidden node Affinity for pod assignment | `{}` |
864| `hidden.nodeSelector` | Hidden node Node labels for pod assignment | `{}` |
865| `hidden.tolerations` | Hidden node Tolerations for pod assignment | `[]` |
866| `hidden.podLabels` | Hidden node pod labels | `{}` |
867| `hidden.podAnnotations` | Hidden node Pod annotations | `{}` |
868| `hidden.priorityClassName` | Name of the existing priority class to be used by hidden node pod(s) | `""` |
869| `hidden.runtimeClassName` | Name of the runtime class to be used by hidden node pod(s) | `""` |
870| `hidden.podSecurityContext.enabled` | Enable Hidden pod(s)' Security Context | `true` |
871| `hidden.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
872| `hidden.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
873| `hidden.podSecurityContext.fsGroup` | Group ID for the volumes of the Hidden pod(s) | `1001` |
874| `hidden.podSecurityContext.sysctls` | sysctl settings of the Hidden pod(s)' | `[]` |
875| `hidden.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
876| `hidden.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
877| `hidden.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
878| `hidden.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
879| `hidden.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
880| `hidden.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
881| `hidden.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
882| `hidden.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
883| `hidden.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
884| `hidden.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
885| `hidden.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if hidden.resources is set (hidden.resources is recommended for production). | `micro` |
886| `hidden.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
887| `hidden.containerPorts.mongodb` | MongoDB(&reg;) hidden container port | `27017` |
888| `hidden.livenessProbe.enabled` | Enable livenessProbe | `true` |
889| `hidden.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
890| `hidden.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `20` |
891| `hidden.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `10` |
892| `hidden.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
893| `hidden.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
894| `hidden.readinessProbe.enabled` | Enable readinessProbe | `true` |
895| `hidden.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
896| `hidden.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `20` |
897| `hidden.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `10` |
898| `hidden.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
899| `hidden.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
900| `hidden.startupProbe.enabled` | Enable startupProbe | `false` |
901| `hidden.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
902| `hidden.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
903| `hidden.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
904| `hidden.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` |
905| `hidden.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
906| `hidden.customLivenessProbe` | Override default liveness probe for hidden node containers | `{}` |
907| `hidden.customReadinessProbe` | Override default readiness probe for hidden node containers | `{}` |
908| `hidden.customStartupProbe` | Override default startup probe for MongoDB(&reg;) containers | `{}` |
909| `hidden.initContainers` | Add init containers to the MongoDB(&reg;) Hidden pods. | `[]` |
910| `hidden.sidecars` | Add additional sidecar containers for the hidden node pod(s) | `[]` |
911| `hidden.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the hidden node container(s) | `[]` |
912| `hidden.extraVolumes` | Optionally specify extra list of additional volumes to the hidden node statefulset | `[]` |
913| `hidden.pdb.create` | Enable/disable a Pod Disruption Budget creation for hidden node pod(s) | `true` |
914| `hidden.pdb.minAvailable` | Minimum number/percentage of hidden node pods that should remain scheduled | `""` |
915| `hidden.pdb.maxUnavailable` | Maximum number/percentage of hidden node pods that may be made unavailable. Defaults to `1` if both `hidden.pdb.minAvailable` and `hidden.pdb.maxUnavailable` are empty. | `""` |
916| `hidden.persistence.enabled` | Enable hidden node data persistence using PVC | `true` |
917| `hidden.persistence.medium` | Provide a medium for `emptyDir` volumes. | `""` |
918| `hidden.persistence.storageClass` | PVC Storage Class for hidden node data volume | `""` |
919| `hidden.persistence.accessModes` | PV Access Mode | `["ReadWriteOnce"]` |
920| `hidden.persistence.size` | PVC Storage Request for hidden node data volume | `8Gi` |
921| `hidden.persistence.annotations` | PVC annotations | `{}` |
922| `hidden.persistence.mountPath` | The path the volume will be mounted at, useful when using different MongoDB(&reg;) images. | `/bitnami/mongodb` |
923| `hidden.persistence.subPath` | The subdirectory of the volume to mount to, useful in dev environments | `""` |
924| `hidden.persistence.volumeClaimTemplates.selector` | A label query over volumes to consider for binding (e.g. when using local volumes) | `{}` |
925| `hidden.persistence.volumeClaimTemplates.requests` | Custom PVC requests attributes | `{}` |
926| `hidden.persistence.volumeClaimTemplates.dataSource` | Set volumeClaimTemplate dataSource | `{}` |
927| `hidden.service.portName` | MongoDB(&reg;) service port name | `mongodb` |
928| `hidden.service.ports.mongodb` | MongoDB(&reg;) service port | `27017` |
929| `hidden.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
930| `hidden.service.annotations` | Provide any additional annotations that may be required | `{}` |
931| `hidden.service.headless.annotations` | Annotations for the headless service. | `{}` |
932
933### Metrics parameters
934
935| Name | Description | Value |
936| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
937| `metrics.enabled` | Enable using a sidecar Prometheus exporter | `false` |
938| `metrics.image.registry` | MongoDB(&reg;) Prometheus exporter image registry | `REGISTRY_NAME` |
939| `metrics.image.repository` | MongoDB(&reg;) Prometheus exporter image repository | `REPOSITORY_NAME/mongodb-exporter` |
940| `metrics.image.digest` | MongoDB(&reg;) image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
941| `metrics.image.pullPolicy` | MongoDB(&reg;) Prometheus exporter image pull policy | `IfNotPresent` |
942| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
943| `metrics.username` | String with username for the metrics exporter | `""` |
944| `metrics.password` | String with password for the metrics exporter | `""` |
945| `metrics.compatibleMode` | Enables old style mongodb-exporter metrics | `true` |
946| `metrics.collector.all` | Enable all collectors. Same as enabling all individual metrics | `false` |
947| `metrics.collector.diagnosticdata` | Boolean Enable collecting metrics from getDiagnosticData | `true` |
948| `metrics.collector.replicasetstatus` | Boolean Enable collecting metrics from replSetGetStatus | `true` |
949| `metrics.collector.dbstats` | Boolean Enable collecting metrics from dbStats | `false` |
950| `metrics.collector.topmetrics` | Boolean Enable collecting metrics from top admin command | `false` |
951| `metrics.collector.indexstats` | Boolean Enable collecting metrics from $indexStats | `false` |
952| `metrics.collector.collstats` | Boolean Enable collecting metrics from $collStats | `false` |
953| `metrics.collector.collstatsColls` | List of \<databases\>.\<collections\> to get $collStats | `[]` |
954| `metrics.collector.indexstatsColls` | List - List of \<databases\>.\<collections\> to get $indexStats | `[]` |
955| `metrics.collector.collstatsLimit` | Number - Disable collstats, dbstats, topmetrics and indexstats collector if there are more than \<n\> collections. 0=No limit | `0` |
956| `metrics.extraFlags` | String with extra flags to the metrics exporter | `""` |
957| `metrics.command` | Override default container command (useful when using custom images) | `[]` |
958| `metrics.args` | Override default container args (useful when using custom images) | `[]` |
959| `metrics.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production). | `nano` |
960| `metrics.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
961| `metrics.containerPort` | Port of the Prometheus metrics container | `9216` |
962| `metrics.service.annotations` | Annotations for Prometheus Exporter pods. Evaluated as a template. | `{}` |
963| `metrics.service.type` | Type of the Prometheus metrics service | `ClusterIP` |
964| `metrics.service.ports.metrics` | Port of the Prometheus metrics service | `9216` |
965| `metrics.service.extraPorts` | Extra ports to expose (normally used with the `sidecar` value) | `[]` |
966| `metrics.livenessProbe.enabled` | Enable livenessProbe | `true` |
967| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` |
968| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `5` |
969| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `10` |
970| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
971| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
972| `metrics.readinessProbe.enabled` | Enable readinessProbe | `true` |
973| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
974| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` |
975| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `10` |
976| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
977| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
978| `metrics.startupProbe.enabled` | Enable startupProbe | `false` |
979| `metrics.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
980| `metrics.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
981| `metrics.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
982| `metrics.startupProbe.failureThreshold` | Failure threshold for startupProbe | `30` |
983| `metrics.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
984| `metrics.customLivenessProbe` | Override default liveness probe for MongoDB(&reg;) containers | `{}` |
985| `metrics.customReadinessProbe` | Override default readiness probe for MongoDB(&reg;) containers | `{}` |
986| `metrics.customStartupProbe` | Override default startup probe for MongoDB(&reg;) containers | `{}` |
987| `metrics.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the metrics container(s) | `[]` |
988| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using Prometheus Operator | `false` |
989| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
990| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
991| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
992| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping. | `[]` |
993| `metrics.serviceMonitor.metricRelabelings` | MetricsRelabelConfigs to apply to samples before ingestion. | `[]` |
994| `metrics.serviceMonitor.labels` | Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with | `{}` |
995| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
996| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
997| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
998| `metrics.prometheusRule.enabled` | Set this to true to create prometheusRules for Prometheus operator | `false` |
999| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so prometheusRules will be discovered by Prometheus | `{}` |
1000| `metrics.prometheusRule.namespace` | Namespace where prometheusRules resource should be created | `""` |
1001| `metrics.prometheusRule.rules` | Rules to be created, check values for an example | `[]` |
1002
1003Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
1004
1005```console
1006helm install my-release \
1007 --set auth.rootPassword=secretpassword,auth.username=my-user,auth.password=my-password,auth.database=my-database \
1008 oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb
1009```
1010
1011> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
1012
1013The above command sets the MongoDB(&reg;) `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`.
1014
1015> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
1016
1017Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
1018
1019```console
1020helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb
1021```
1022
1023> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
1024> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/mongodb/values.yaml)
1025
1026## Troubleshooting
1027
1028Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
1029
1030## Upgrading
1031
1032If authentication is enabled, it's necessary to set the `auth.rootPassword` (also `auth.replicaSetKey` when using a replicaset architecture) when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Credentials' section. Please note down the password, and run the command below to upgrade your chart:
1033
1034```console
1035helm upgrade my-release oci://REGISTRY_NAME/REPOSITORY_NAME/mongodb --set auth.rootPassword=[PASSWORD] (--set auth.replicaSetKey=[REPLICASETKEY])
1036```
1037
1038> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
1039> Note: you need to substitute the placeholders [PASSWORD] and [REPLICASETKEY] with the values obtained in the installation notes.
1040
1041### To 16.0.0
1042
1043To upgrade to MongoDB `8.0` from a `7.0` deployment, the `7.0` deployment must have `featureCompatibilityVersion` set to `7.0`. Please refer to the [official documentation](https://www.mongodb.com/docs/manual/release-notes/8.0/#upgrade-procedures).
1044
1045### To 15.0.0
1046
1047This major bump changes the following security defaults:
1048
1049- `runAsGroup` is changed from `0` to `1001`
1050- `readOnlyRootFilesystem` is set to `true`
1051- `resourcesPreset` is changed from `none` to the minimum size working in our test suites (NOTE: `resourcesPreset` is not meant for production usage, but `resources` adapted to your use case).
1052- `global.compatibility.openshift.adaptSecurityContext` is changed from `disabled` to `auto`.
1053
1054This could potentially break any customization or init scripts used in your deployment. If this is the case, change the default values to the previous ones.
1055
1056### To 12.0.0
1057
1058This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository.
1059
1060Affected values:
1061
1062- `strategyType` is replaced by `updateStrategy`
1063- `service.port` is renamed to `service.ports.mongodb`
1064- `service.nodePort` is renamed to `service.nodePorts.mongodb`
1065- `externalAccess.service.port` is renamed to `externalAccess.hidden.service.ports.mongodb`
1066- `rbac.role.rules` is renamed to `rbac.rules`
1067- `externalAccess.hidden.service.port` is renamed ot `externalAccess.hidden.service.ports.mongodb`
1068- `hidden.strategyType` is replaced by `hidden.updateStrategy`
1069- `metrics.serviceMonitor.relabellings` is renamed to `metrics.serviceMonitor.relabelings`(typo fixed)
1070- `metrics.serviceMonitor.additionalLabels` is renamed to `metrics.serviceMonitor.labels`
1071
1072Additionally also updates the MongoDB image dependency to it newest major, 5.0
1073
1074### To 11.0.0
1075
1076In this version, the mongodb-exporter bundled as part of this Helm chart was updated to a new version which, even it is not a major change, can contain breaking changes (from `0.11.X` to `0.30.X`).
1077Please visit the release notes from the upstream project at <https://github.com/percona/mongodb_exporter/releases>
1078
1079### To 10.0.0
1080
1081[On November 13, 2020, Helm v2 support formally ended](https://github.com/helm/charts#status-of-the-project). This major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
1082
1083### To 9.0.0
1084
1085MongoDB(&reg;) container images were updated to `4.4.x` and it can affect compatibility with older versions of MongoDB(&reg;). Refer to the following guides to upgrade your applications:
1086
1087- [Standalone](https://docs.mongodb.com/manual/release-notes/4.4-upgrade-standalone/)
1088- [Replica Set](https://docs.mongodb.com/manual/release-notes/4.4-upgrade-replica-set/)
1089
1090### To 8.0.0
1091
1092- Architecture used to configure MongoDB(&reg;) as a replicaset was completely refactored. Now, both primary and secondary nodes are part of the same statefulset.
1093- Chart labels were adapted to follow the Helm charts best practices.
1094- This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/main/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade.
1095- Several parameters were renamed or disappeared in favor of new ones on this major version. These are the most important ones:
1096 - `replicas` is renamed to `replicaCount`.
1097 - Authentication parameters are reorganized under the `auth.*` parameter:
1098 - `usePassword` is renamed to `auth.enabled`.
1099 - `mongodbRootPassword`, `mongodbUsername`, `mongodbPassword`, `mongodbDatabase`, and `replicaSet.key` are now `auth.rootPassword`, `auth.username`, `auth.password`, `auth.database`, and `auth.replicaSetKey` respectively.
1100 - `securityContext.*` is deprecated in favor of `podSecurityContext` and `containerSecurityContext`.
1101 - Parameters prefixed with `mongodb` are renamed removing the prefix. E.g. `mongodbEnableIPv6` is renamed to `enableIPv6`.
1102 - Parameters affecting Arbiter nodes are reorganized under the `arbiter.*` parameter.
1103
1104Consequences:
1105
1106- Backwards compatibility is not guaranteed. To upgrade to `8.0.0`, install a new release of the MongoDB(&reg;) chart, and migrate your data by creating a backup of the database, and restoring it on the new release.
1107
1108### To 7.0.0
1109
1110From 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:
1111
1112```yaml
1113ingress:
1114 hosts:
1115 - name: mongodb.local
1116 path: /
1117```
1118
1119### To 6.0.0
1120
1121From 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.
1122You can find more information in the [`bitnami/mongodb` image README](https://github.com/bitnami/containers/tree/main/bitnami/mongodb#readme).
1123
1124### To 5.0.0
1125
1126When enabling replicaset configuration, backwards compatibility is not guaranteed unless you modify the labels used on the chart's statefulsets.
1127Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is `my-release`:
1128
1129```console
1130kubectl delete statefulset my-release-mongodb-arbiter my-release-mongodb-primary my-release-mongodb-secondary --cascade=false
1131```
1132
1133### Add extra deployment options
1134
1135To add extra deployments (useful for advanced features like sidecars), use the `extraDeploy` property.
1136
1137In the example below, you can find how to use a example here for a [MongoDB replica set pod labeler sidecar](https://github.com/combor/k8s-mongo-labeler-sidecar) to identify the primary pod and dynamically label it as the primary node:
1138
1139```yaml
1140extraDeploy:
1141 - apiVersion: v1
1142 kind: Service
1143 metadata:
1144 name: mongodb-primary
1145 namespace: default
1146 labels:
1147 app.kubernetes.io/component: mongodb
1148 app.kubernetes.io/instance: mongodb
1149 app.kubernetes.io/managed-by: Helm
1150 app.kubernetes.io/name: mongodb
1151 spec:
1152 type: NodePort
1153 externalTrafficPolicy: Cluster
1154 ports:
1155 - name: mongodb-primary
1156 port: 30001
1157 nodePort: 30001
1158 protocol: TCP
1159 targetPort: mongodb
1160 selector:
1161 app.kubernetes.io/component: mongodb
1162 app.kubernetes.io/instance: mongodb
1163 app.kubernetes.io/name: mongodb
1164 primary: "true"
1165```
1166
1167## License
1168
1169Copyright &copy; 2024 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1170
1171Licensed under the Apache License, Version 2.0 (the "License");
1172you may not use this file except in compliance with the License.
1173You may obtain a copy of the License at
1174
1175<https://www.apache.org/licenses/LICENSE-2.0>
1176
1177Unless required by applicable law or agreed to in writing, software
1178distributed under the License is distributed on an "AS IS" BASIS,
1179WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1180See the License for the specific language governing permissions and
1181limitations under the License.