[bitnami/mongodb] Allow using existingClaim in the cluster primary node (#2101)

* [bitnami/mongodb] Allow using existingClaim in the cluster primary node

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@vmware.com>

* Small fix

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2020-03-24 10:33:15 +01:00
committed by GitHub
parent 524b338147
commit d9fcba3a3d
3 changed files with 8 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: mongodb
version: 7.9.1
version: 7.10.0
appVersion: 4.2.4
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
keywords:

View File

@@ -131,7 +131,7 @@ The following table lists the configurable parameters of the MongoDB chart and t
| `persistence.accessModes` | Use volume as ReadOnly or ReadWrite | `[ReadWriteOnce]` |
| `persistence.size` | Size of data volume | `8Gi` |
| `persistence.annotations` | Persistent Volume annotations | `{}` |
| `persistence.existingClaim` | Name of an existing PVC to use (avoids creating one if this is given) | `nil` |
| `persistence.existingClaim` | Name of an existing PVC to use in the primary node (avoids creating one if this is given) | `nil` |
| `useStatefulSet` | Set to true to use StatefulSet instead of Deployment even when replicaSet.enalbed=false | `nil` |
| `extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function | `{}` |
| `livenessProbe.enabled` | Enable/disable the Liveness probe | `true` |

View File

@@ -285,6 +285,11 @@ spec:
{{ toYaml .Values.extraVolumes | indent 8}}
{{- end }}
{{- if .Values.persistence.enabled }}
{{- if.Values.persistence.existingClaim }}
- name: datadir
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{- else }}
volumeClaimTemplates:
- metadata:
name: datadir
@@ -301,6 +306,7 @@ spec:
requests:
storage: {{ .Values.persistence.size | quote }}
{{ include "mongodb.storageClass" . }}
{{- end }}
{{- else }}
- name: datadir
emptyDir: {}