diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index da2df81e35..8212b42294 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mongodb -version: 5.13.0 +version: 5.13.1 appVersion: 4.0.6 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/templates/statefulset-primary-rs.yaml b/stable/mongodb/templates/statefulset-primary-rs.yaml index 55b45cc6c9..87e4d01a95 100644 --- a/stable/mongodb/templates/statefulset-primary-rs.yaml +++ b/stable/mongodb/templates/statefulset-primary-rs.yaml @@ -111,7 +111,7 @@ spec: value: {{ .Values.mongodbDatabase | quote }} {{- end }} {{- if .Values.usePassword }} - {{- if or .Values.mongodbPassword .Values.existingSecret }} + {{- if and .Values.mongodbUsername (or .Values.mongodbPassword .Values.existingSecret) }} - name: MONGODB_PASSWORD valueFrom: secretKeyRef: