File tree Expand file tree Collapse file tree 5 files changed +66
-2
lines changed
charts/ent-operator-database Expand file tree Collapse file tree 5 files changed +66
-2
lines changed Original file line number Diff line number Diff line change 11apiVersion : v2
22name : mongodb-enterprise-database
33description : MongoDB Kubernetes Enterprise Operator- MongoDB DataBase charts
4- version : 0.1.2
4+ version : 0.1.4
55kubeVersion : ' >=1.15-0'
66keywords :
77- mongodb
Original file line number Diff line number Diff line change 2929 security :
3030 authentication :
3131 enabled : true
32- modes : ["SCRAM"] # Valid authentication modes are "SCRAM' and "X509"
32+ modes :
33+ {{- range .Values.security.authentication.modes }}
34+ - {{ . | quote }} # Valid authentication modes are "SCRAM' and "X509"
35+ {{- end }}
36+ {{- if .Values.security.tls.enabled }}
37+ tls :
38+ enabled : {{ .Values.security.tls.enabled }}
39+ {{- end }}
3340
3441 # Optional field - ignoreUnknownUsers
3542 # A value of true means that any users not configured via the Operator or the Ops Manager or Cloud Manager UI
Original file line number Diff line number Diff line change 1+ {{- range .Values.users }}
2+ ---
3+ apiVersion : v1
4+ kind : Secret
5+ metadata :
6+ name : {{ $.Values.name }}-{{ .username }}-secret
7+ namespace : {{ $.Release.Namespace }}
8+ type : Opaque
9+ stringData :
10+ password : {{ .password | quote}}
11+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- range .Values.users }}
2+ ---
3+ apiVersion : mongodb.com/v1
4+ kind : MongoDBUser
5+ metadata :
6+ name : {{ $.Values.name }}-{{ .username }}-mongodbuser
7+ namespace : {{ $.Release.Namespace }}
8+ spec :
9+ passwordSecretKeyRef :
10+ name : {{ $.Values.name }}-{{ .username }}-secret # the name of the secret that stores this user's password
11+ key : password # the key in the secret that stores the password
12+ username : {{ .username }}
13+ db : {{ .db }}
14+ mongodbResourceRef :
15+ name : {{ $.Values.name }} # The name of the MongoDB resource this user will be added to
16+ roles :
17+ {{- toYaml .roles | nindent 6 }}
18+ {{- end }}
Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ opsManager:
2525 # Alternatevly an existing secret and config map could be provided directly
2626 configMap : opsmanager-configmap
2727 secretRef : opsmanager-org-access-key
28+
29+ security :
30+ authentication :
31+ modes : ["SCRAM"] # Valid authentication modes are "SCRAM", "LDAP" and "X509"
32+ tls :
33+ enabled : false
34+
35+
2836resources :
2937 limits :
3038 cpu : 2
@@ -41,3 +49,23 @@ registry:
4149 # TODO: specify for each image and move there?
4250 pullPolicy : Always
4351 # Specify if images are pulled from private registry
52+
53+ users :
54+ - username : admin-user
55+ db : admin
56+ password : " %SomeLong%password$foradmin"
57+ roles :
58+ - db : admin
59+ name : clusterAdmin
60+ - db : admin
61+ name : userAdminAnyDatabase
62+ - db : admin
63+ name : readWrite
64+ - db : admin
65+ name : userAdminAnyDatabase
66+ - username : app-user
67+ db : admin
68+ password : " %SomeLong%password$"
69+ roles :
70+ - db : admin
71+ name : readWrite
You can’t perform that action at this time.
0 commit comments