-
Notifications
You must be signed in to change notification settings - Fork 509
/
Copy pathmongodb.com_v1_mongodbcommunity_x509.yaml
56 lines (53 loc) · 1.34 KB
/
mongodb.com_v1_mongodbcommunity_x509.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: example-mongodb
spec:
members: 3
type: ReplicaSet
version: "6.0.5"
security:
tls:
enabled: true
certificateKeySecretRef:
name: mongodb-tls
caConfigMapRef:
name: ca-issuer
authentication:
modes: ["X509", "SCRAM"]
agentMode: "X509"
agentCertificateSecretRef:
name: my-agent-certificate
users:
- name: my-user
db: admin
passwordSecretRef: # a reference to the secret that will be used to generate the user's password
name: my-user-password
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
- db: admin
name: readWriteAnyDatabase
scramCredentialsSecretName: my-scram
- name: "CN=my-x509-authenticated-user,OU=organizationalunit,O=organization"
db: "$external"
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
- db: admin
name: readWriteAnyDatabase
# the user credentials will be generated from this secret
# once the credentials are generated, this secret is no longer required
---
apiVersion: v1
kind: Secret
metadata:
name: my-user-password
type: Opaque
stringData:
password: password