mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-02-12 23:45:38 +00:00
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
|
{{- if (include "mongodb.createSecret" .) }}
|
||
|
apiVersion: v1
|
||
|
kind: Secret
|
||
|
metadata:
|
||
|
name: {{ include "mongodb.fullname" . }}
|
||
|
namespace: {{ template "mongodb.namespace" . }}
|
||
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||
|
app.kubernetes.io/component: mongodb
|
||
|
type: Opaque
|
||
|
data:
|
||
|
{{- if .Values.auth.rootPassword }}
|
||
|
mongodb-root-password: {{ .Values.auth.rootPassword | toString | b64enc | quote }}
|
||
|
{{- else }}
|
||
|
mongodb-root-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||
|
{{- end }}
|
||
|
{{- if and .Values.auth.username .Values.auth.database }}
|
||
|
{{- if .Values.auth.password }}
|
||
|
mongodb-password: {{ .Values.auth.password | toString | b64enc | quote }}
|
||
|
{{- else }}
|
||
|
mongodb-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- if eq .Values.architecture "replicaset" }}
|
||
|
{{- if .Values.auth.replicaSetKey }}
|
||
|
mongodb-replica-set-key: {{ .Values.auth.replicaSetKey | toString | b64enc | quote }}
|
||
|
{{- else }}
|
||
|
mongodb-replica-set-key: {{ randAlphaNum 10 | b64enc | quote }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|