Allow auto generated password usage (#13413)

* [stable/mongodb] Fix auto generated secrets

Signed-off-by: Nicolas Hervé <nicolas.herve.pessac@gmail.com>

* [stable/mongodb] Bump chart version

Signed-off-by: Nicolas Hervé <nicolas.herve.pessac@gmail.com>
This commit is contained in:
Nicolas Hervé
2019-05-03 00:58:18 -07:00
committed by Kubernetes Prow Robot
parent a4c792ea8f
commit 98fe7b82dd
4 changed files with 9 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: mongodb
version: 5.16.3
version: 5.16.4
appVersion: 4.0.9
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
keywords:
@@ -71,6 +71,13 @@ spec:
value: "1"
{{- end }}
{{- if .Values.usePassword }}
{{- if and .Values.mongodbUsername .Values.mongodbDatabase }}
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{- else }}{{ template "mongodb.fullname" . }}{{- end }}
key: mongodb-password
{{- end }}
- name: MONGODB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
@@ -81,13 +88,6 @@ spec:
- name: MONGODB_USERNAME
value: {{ .Values.mongodbUsername | quote }}
{{- end }}
{{- if and .Values.mongodbUsername .Values.mongodbDatabase }}
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.existingSecret }}{{ .Values.existingSecret }}{{- else }}{{ template "mongodb.fullname" . }}{{- end }}
key: mongodb-password
{{- end }}
- name: MONGODB_SYSTEM_LOG_VERBOSITY
value: {{ .Values.mongodbSystemLogVerbosity | quote }}
- name: MONGODB_DISABLE_SYSTEM_LOG
-2
View File
@@ -10,13 +10,11 @@ metadata:
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{- if .Values.usePassword }}
{{- if .Values.mongodbRootPassword }}
mongodb-root-password: {{ .Values.mongodbRootPassword | b64enc | quote }}
{{- else }}
mongodb-root-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
{{- end }}
{{- if and .Values.mongodbUsername .Values.mongodbDatabase }}
{{- if .Values.mongodbPassword }}
mongodb-password: {{ .Values.mongodbPassword | b64enc | quote }}
@@ -111,7 +111,7 @@ spec:
value: {{ .Values.mongodbDatabase | quote }}
{{- end }}
{{- if .Values.usePassword }}
{{- if and .Values.mongodbUsername (or .Values.mongodbPassword .Values.existingSecret) }}
{{- if and .Values.mongodbUsername .Values.mongodbDatabase }}
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef: