Skip to content

Commit 12b8514

Browse files
author
Rodrigo Valin
committed
916cb3fba7fd353a42941a5ed55e6ab9542a4493: update public repo contents
1 parent f3e188e commit 12b8514

15 files changed

+283
-8
lines changed

crds.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ spec:
5252
type:
5353
type: string
5454
pattern: "^Standalone$"
55+
security:
56+
type: object
57+
properties:
58+
tls:
59+
type: object
60+
properties:
61+
enabled:
62+
type: boolean
5563
additionalMongodConfig:
5664
properties:
5765
net:
@@ -88,6 +96,17 @@ spec:
8896
type:
8997
type: string
9098
pattern: "^ReplicaSet$"
99+
security:
100+
type: object
101+
properties:
102+
tls:
103+
type: object
104+
properties:
105+
enabled:
106+
type: boolean
107+
clusterAuthenticationMode:
108+
type: string
109+
enum: ["x509"]
91110
additionalMongodConfig:
92111
properties:
93112
net:
@@ -135,6 +154,17 @@ spec:
135154
type:
136155
type: string
137156
pattern: "^ShardedCluster$"
157+
security:
158+
type: object
159+
properties:
160+
tls:
161+
type: object
162+
properties:
163+
enabled:
164+
type: boolean
165+
clusterAuthenticationMode:
166+
type: string
167+
enum: ["x509"]
138168
additionalMongodConfig:
139169
properties:
140170
net:
@@ -155,4 +185,52 @@ spec:
155185
- mongodsPerShardCount
156186
- mongosCount
157187
- configServerCount
188+
---
189+
apiVersion: apiextensions.k8s.io/v1beta1
190+
kind: CustomResourceDefinition
191+
metadata:
192+
name: mongodbusers.mongodb.com
193+
spec:
194+
group: mongodb.com
195+
version: v1
196+
scope: Namespaced
197+
names:
198+
kind: MongoDBUser
199+
plural: mongodbusers
200+
shortNames:
201+
- mdbu
202+
singular: mongodbuser
203+
validation:
204+
openAPIV3Schema:
205+
properties:
206+
spec:
207+
properties:
208+
username:
209+
type: string
210+
description: "The username of the user"
211+
db:
212+
type: string
213+
enum: ["$external"]
214+
description: "The database the user is stored in"
215+
project:
216+
type: string
217+
description: "The project the user belongs to"
218+
roles:
219+
type: array
220+
items:
221+
type: object
222+
properties:
223+
name:
224+
type: string
225+
description: "The name of the role"
226+
db:
227+
type: string
228+
description: "The db the role can act on"
229+
required:
230+
- name
231+
- db
232+
required:
233+
- username
234+
- db
235+
- project
158236

helm_chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mongodb-enterprise-operator
22
description: MongoDB Kubernetes Enterprise Operator
3-
version: '0.11'
3+
version: '0.12'
44
kubeVersion: '>=1.11'
55
keywords:
66
- mongodb

helm_chart/templates/crds.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ spec:
5050
type:
5151
type: string
5252
pattern: "^Standalone$"
53+
security:
54+
type: object
55+
properties:
56+
tls:
57+
type: object
58+
properties:
59+
enabled:
60+
type: boolean
5361
additionalMongodConfig:
5462
properties:
5563
net:
@@ -86,6 +94,17 @@ spec:
8694
type:
8795
type: string
8896
pattern: "^ReplicaSet$"
97+
security:
98+
type: object
99+
properties:
100+
tls:
101+
type: object
102+
properties:
103+
enabled:
104+
type: boolean
105+
clusterAuthenticationMode:
106+
type: string
107+
enum: ["x509"]
89108
additionalMongodConfig:
90109
properties:
91110
net:
@@ -133,6 +152,17 @@ spec:
133152
type:
134153
type: string
135154
pattern: "^ShardedCluster$"
155+
security:
156+
type: object
157+
properties:
158+
tls:
159+
type: object
160+
properties:
161+
enabled:
162+
type: boolean
163+
clusterAuthenticationMode:
164+
type: string
165+
enum: ["x509"]
136166
additionalMongodConfig:
137167
properties:
138168
net:
@@ -153,4 +183,52 @@ spec:
153183
- mongodsPerShardCount
154184
- mongosCount
155185
- configServerCount
186+
---
187+
apiVersion: apiextensions.k8s.io/v1beta1
188+
kind: CustomResourceDefinition
189+
metadata:
190+
name: mongodbusers.mongodb.com
191+
spec:
192+
group: mongodb.com
193+
version: v1
194+
scope: Namespaced
195+
names:
196+
kind: MongoDBUser
197+
plural: mongodbusers
198+
shortNames:
199+
- mdbu
200+
singular: mongodbuser
201+
validation:
202+
openAPIV3Schema:
203+
properties:
204+
spec:
205+
properties:
206+
username:
207+
type: string
208+
description: "The username of the user"
209+
db:
210+
type: string
211+
enum: ["$external"]
212+
description: "The database the user is stored in"
213+
project:
214+
type: string
215+
description: "The project the user belongs to"
216+
roles:
217+
type: array
218+
items:
219+
type: object
220+
properties:
221+
name:
222+
type: string
223+
description: "The name of the role"
224+
db:
225+
type: string
226+
description: "The db the role can act on"
227+
required:
228+
- name
229+
- db
230+
required:
231+
- username
232+
- db
233+
- project
156234
{{end}}

helm_chart/templates/roles.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ rules:
3636
resources:
3737
- mongodb
3838
- mongodb/finalizers
39+
- mongodbusers
3940
verbs:
4041
- get
4142
- list
@@ -79,6 +80,7 @@ rules:
7980
- get
8081
- create
8182
- list
83+
- watch
8284

8385
---
8486
kind: ClusterRoleBinding

helm_chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ operator:
1616
name: mongodb-enterprise-operator
1717

1818
# Version of mongodb-enterprise-operator and mongodb-enterprise-database images
19-
version: '0.11'
19+
version: '0.12'
2020

2121
database:
2222
name: mongodb-enterprise-database

mongodb-enterprise.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ rules:
3838
resources:
3939
- mongodb
4040
- mongodb/finalizers
41+
- mongodbusers
4142
verbs:
4243
- get
4344
- list
@@ -81,6 +82,7 @@ rules:
8182
- get
8283
- create
8384
- list
85+
- watch
8486

8587
---
8688
kind: ClusterRoleBinding
@@ -131,7 +133,7 @@ spec:
131133
serviceAccountName: mongodb-enterprise-operator
132134
containers:
133135
- name: mongodb-enterprise-operator
134-
image: quay.io/mongodb/mongodb-enterprise-operator:0.11
136+
image: quay.io/mongodb/mongodb-enterprise-operator:0.12
135137
imagePullPolicy: Always
136138

137139
env:
@@ -145,7 +147,7 @@ spec:
145147

146148

147149
- name: MONGODB_ENTERPRISE_DATABASE_IMAGE
148-
value: quay.io/mongodb/mongodb-enterprise-database:0.11
150+
value: quay.io/mongodb/mongodb-enterprise-database:0.12
149151
- name: IMAGE_PULL_POLICY
150152
value: Always
151153

samples/extended/replica-set-persistent-volumes.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ spec:
88
version: 4.0.0
99
service: my-service
1010

11+
# Indicates featureCompatibilityVersion. This attribute will make the data
12+
# format to persist in a particular version, maybe older, allowing for
13+
# future downgrades if necessary.
14+
featureCompatibilityVersion: 3.6
15+
1116
## Please Note: The default Kubernetes cluster name is `cluster.local`.
1217
## If your cluster has been configured with another name, you can specify
1318
## it with the `clusterName` attribute.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: mongodb.com/v1
3+
kind: MongoDB
4+
metadata:
5+
name: my-x509-enabled-rs
6+
spec:
7+
type: ReplicaSet
8+
9+
members: 3
10+
version: 4.0.4
11+
12+
project: my-project
13+
credentials: my-credentials
14+
15+
# look into `replica-set-persistent-volumes.yaml` for an example on how to use
16+
# Kubernetes Persistent Volumes in your MDB deployment.
17+
persistent: false
18+
19+
# This will create a TLS & x509 enabled Replica Set, which means that all the traffic
20+
# between members of the Replica Set and clients, will be encrypted using TLS
21+
# certificates. These certificates will be generated on the fly by the operator
22+
# using the Kubernetes CA.
23+
#
24+
# More information about setting up x509 client authentication in Ops Manager:
25+
#
26+
# https://docs.opsmanager.mongodb.com/current/tutorial/enable-x509-authentication-for-group
27+
#
28+
# Please refer to Kubernetes TLS Documentation on how to approve these certs:
29+
#
30+
# https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/
31+
#
32+
security:
33+
clusterAuthenticationMode: x509
34+
tls:
35+
enabled: true

samples/extended/sharded-cluster-persistent-volumes.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ spec:
1111
version: 4.0.0
1212
service: my-service
1313

14+
# Indicates featureCompatibilityVersion. This attribute will make the data
15+
# format to persist in a particular version, maybe older, allowing for
16+
# future downgrades if necessary.
17+
featureCompatibilityVersion: 3.6
18+
1419
## Please Note: The default Kubernetes cluster name is `cluster.local`.
1520
## If your cluster has been configured with another name, you can specify
1621
## it with the `clusterName` attribute.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
apiVersion: mongodb.com/v1
3+
kind: MongoDB
4+
metadata:
5+
name: my-x509-enabled-sc
6+
spec:
7+
type: ShardedCluster
8+
9+
shardCount: 2
10+
mongodsPerShardCount: 3
11+
mongosCount: 2
12+
configServerCount: 3
13+
14+
version: 4.0.6
15+
16+
project: my-project
17+
credentials: my-credentials
18+
19+
persistent: false
20+
21+
# This will create a TLS & x509 enabled Sharded Cluster, which means that all the traffic
22+
# between members of the Shards and clients, will be encrypted using TLS
23+
# certificates. These certificates will be generated on the fly by the operator
24+
# using the Kubernetes CA.
25+
#
26+
# More information about setting up x509 client authentication in Ops Manager:
27+
#
28+
# https://docs.opsmanager.mongodb.com/current/tutorial/enable-x509-authentication-for-group
29+
#
30+
# Please refer to Kubernetes TLS Documentation on how to approve these certs:
31+
#
32+
# https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/
33+
#
34+
security:
35+
clusterAuthenticationMode: x509
36+
tls:
37+
enabled: true

samples/extended/standalone-persistent-volumes.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: mongodb.com/v1
23
kind: MongoDB
34
metadata:
@@ -6,6 +7,11 @@ spec:
67
version: 4.0.0
78
service: my-service
89

10+
# Indicates featureCompatibilityVersion. This attribute will make the data
11+
# format to persist in a particular version, maybe older, allowing for
12+
# future downgrades if necessary.
13+
featureCompatibilityVersion: 4.0
14+
915
## Please Note: The default Kubernetes cluster name is `cluster.local`.
1016
## If your cluster has been configured with another name, you can specify
1117
## it with the `clusterName` attribute.

samples/extended/standalone-tls.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: mongodb.com/v1
23
kind: MongoDB
34
metadata:

0 commit comments

Comments
 (0)