[bitnami/mongodb-sharded] Use common helper to manage app secrets (#10828)

* Use common helper to manage app secrets

Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>

* Bump version correctly

Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
Jose Antonio Carmona
2022-07-14 10:19:35 +02:00
committed by GitHub
parent 819db25f92
commit 9892db1bda
2 changed files with 5 additions and 9 deletions

View File

@@ -26,4 +26,4 @@ name: mongodb-sharded
sources:
- https://github.com/bitnami/bitnami-docker-mongodb-sharded
- https://mongodb.org
version: 5.0.17
version: 5.1.0

View File

@@ -15,17 +15,13 @@ metadata:
type: Opaque
data:
{{- if .Values.configsvr.external.rootPassword }}
mongodb-root-password: {{ .Values.configsvr.external.rootPassword | b64enc | quote }}
{{- else if .Values.auth.rootPassword }}
mongodb-root-password: {{ .Values.auth.rootPassword | b64enc | quote }}
mongodb-root-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-root-password" "providedValues" (list "configsvr.external.rootPassword" ) "context" $) }}
{{- else }}
mongodb-root-password: {{ randAlphaNum 10 | b64enc | quote }}
mongodb-root-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-root-password" "providedValues" (list "auth.rootPassword" ) "context" $) }}
{{- end }}
{{- if .Values.configsvr.external.replicasetKey }}
mongodb-replica-set-key: {{ .Values.configsvr.external.replicasetKey | b64enc | quote }}
{{- else if .Values.auth.replicaSetKey }}
mongodb-replica-set-key: {{ .Values.auth.replicaSetKey | b64enc | quote }}
mongodb-replica-set-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-replica-set-key" "providedValues" (list "configsvr.external.replicasetKey" ) "context" $) }}
{{- else }}
mongodb-replica-set-key: {{ randAlphaNum 10 | b64enc | quote }}
mongodb-replica-set-key: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "mongodb-replica-set-key" "providedValues" (list "auth.replicaSetKey" ) "context" $) }}
{{- end }}
{{- end }}