diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index f4b7eba3b3..6309ad9594 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 0.4.19 +version: 0.4.20 appVersion: 3.6.0 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. keywords: diff --git a/stable/mongodb/README.md b/stable/mongodb/README.md index bac5168a36..82fb2f3ee2 100644 --- a/stable/mongodb/README.md +++ b/stable/mongodb/README.md @@ -47,9 +47,9 @@ The following tables lists the configurable parameters of the MongoDB chart and |----------------------------|-------------------------------------|----------------------------------------------------------| | `image` | MongoDB image | `bitnami/mongodb:{VERSION}` | | `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent`. | -| `mongodbRootPassword` | MongoDB admin password | `nil` | +| `mongodbRootPassword` | MongoDB admin password | `random alhpanumeric string (10)` | | `mongodbUsername` | MongoDB custom user | `nil` | -| `mongodbPassword` | MongoDB custom user password | `nil` | +| `mongodbPassword` | MongoDB custom user password | `random alhpanumeric string (10)` | | `mongodbDatabase` | Database to create | `nil` | | `serviceType` | Kubernetes Service type | `ClusterIP` | | `persistence.enabled` | Use a PVC to persist data | `true` | diff --git a/stable/mongodb/templates/secrets.yaml b/stable/mongodb/templates/secrets.yaml index d95e7a451c..7d2d4047bf 100644 --- a/stable/mongodb/templates/secrets.yaml +++ b/stable/mongodb/templates/secrets.yaml @@ -9,5 +9,13 @@ metadata: heritage: "{{ .Release.Service }}" type: Opaque data: - mongodb-root-password: {{ default "" .Values.mongodbRootPassword | b64enc | quote }} - mongodb-password: {{ default "" .Values.mongodbPassword | b64enc | quote }} + {{ if .Values.mongodbRootPassword }} + mongodb-root-password: {{ .Values.mongodbRootPassword | b64enc | quote }} + {{ else }} + mongodb-root-password: {{ randAlphaNum 10 | b64enc | quote }} + {{ end }} + {{ if .Values.mongodbPassword }} + mongodb-password: {{ .Values.mongodbPassword | b64enc | quote }} + {{ else }} + mongodb-password: {{ randAlphaNum 10 | b64enc | quote }} + {{ end }} \ No newline at end of file