[stable/mongodb] Random passwords for mongodb if they are not set in values.yaml (#2850)

* random passwords for mongodb if not set

* increase Chart version to 0.4.19

* README.md adjusted

* version 0.4.19 to 0.4.20
This commit is contained in:
chris
2017-12-09 13:25:39 +01:00
committed by Reinhard Nägele
parent f5b85d3d24
commit b884cf07d3
3 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -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:
+2 -2
View File
@@ -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` |
+10 -2
View File
@@ -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 }}