mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-17 09:06:36 +10:00
fix: mongodb validation auth (#4506)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user