fix: mongodb validation auth (#4506)

This commit is contained in:
Jose Antonio Carmona
2020-11-26 19:21:02 +01:00
committed by GitHub
parent c81fffeed0
commit ca3fdfbeeb
2 changed files with 5 additions and 19 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ annotations:
category: Infrastructure
apiVersion: v2
# Please make sure that version and appVersion are always the same.
appVersion: 1.1.0
appVersion: 1.1.1
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
home: https://github.com/bitnami/charts/tree/master/bitnami/common
icon: https://bitnami.com/downloads/logos/bitnami-mark.png
@@ -20,4 +20,4 @@ sources:
- https://github.com/bitnami/charts
- http://www.bitnami.com/
type: library
version: 1.1.0
version: 1.1.1
@@ -12,13 +12,15 @@ Params:
{{- $existingSecret := include "common.mongodb.values.auth.existingSecret" . -}}
{{- $enabled := include "common.mongodb.values.enabled" . -}}
{{- $authPrefix := include "common.mongodb.values.key.auth" . -}}
{{- $authEnabled := include "common.mongodb.values.key.auth.enabled" . -}}
{{- $architecture := include "common.mongodb.values.architecture" . -}}
{{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}}
{{- $valueKeyUsername := printf "%s.username" $authPrefix -}}
{{- $valueKeyDatabase := printf "%s.database" $authPrefix -}}
{{- $valueKeyPassword := printf "%s.password" $authPrefix -}}
{{- $valueKeyReplicaSetKey := printf "%s.replicaSetKey" $authPrefix -}}
{{- $valueKeyAuthEnabled := printf "%s.enabled" $authPrefix -}}
{{- $authEnabled := include "common.utils.getValueFromKey" (dict "key" $valueKeyAuthEnabled "context" .context) -}}
{{- if and (not $existingSecret) (eq $enabled "true") (eq $authEnabled "true") -}}
{{- $requiredPasswords := list -}}
@@ -89,22 +91,6 @@ Params:
{{- end -}}
{{- end -}}
{{/*
Auxiliar function to get the right value for the key auth enabled
Usage:
{{ include "common.mongodb.values.key.auth.enabled" (dict "subchart" "true" "context" $) }}
Params:
- subchart - Boolean - Optional. Whether MongoDB is used as subchart or not. Default: false
*/}}
{{- define "common.mongodb.values.key.auth.enabled" -}}
{{- if .subchart -}}
mongodb.auth.enabled
{{- else -}}
auth.enabled
{{- end -}}
{{- end -}}
{{/*
Auxiliar function to get the right value for architecture