mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/mongodb] Do not set mongo password if username and database are not defined (#4955)
* Do not set mongo password if username and database are not defined * Bump chart version
This commit is contained in:
committed by
k8s-ci-robot
parent
f356afd9b5
commit
45bffe4771
@@ -1,5 +1,5 @@
|
||||
name: mongodb
|
||||
version: 1.0.1
|
||||
version: 1.0.2
|
||||
appVersion: 3.7.3
|
||||
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
|
||||
keywords:
|
||||
|
||||
@@ -35,11 +35,13 @@ spec:
|
||||
key: mongodb-root-password
|
||||
- name: MONGODB_USERNAME
|
||||
value: {{ default "" .Values.mongodbUsername | quote }}
|
||||
{{ if and .Values.mongodbUsername .Values.mongodbDatabase }}
|
||||
- name: MONGODB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mongodb.fullname" . }}
|
||||
key: mongodb-password
|
||||
{{ end }}
|
||||
- name: MONGODB_DATABASE
|
||||
value: {{ default "" .Values.mongodbDatabase | quote }}
|
||||
ports:
|
||||
|
||||
@@ -14,8 +14,10 @@ data:
|
||||
{{ else }}
|
||||
mongodb-root-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
{{ if and .Values.mongodbUsername .Values.mongodbDatabase }}
|
||||
{{ if .Values.mongodbPassword }}
|
||||
mongodb-password: {{ .Values.mongodbPassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
mongodb-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user