You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/samples/sharded_multicluster/example-sharded-cluster-deployment.yaml
+40-15Lines changed: 40 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ spec:
7
7
type: ShardedCluster
8
8
# this deployment will have 3 shards
9
9
shardCount: 3
10
-
# you cannot specify mongodsPerShardCount, configServerCount and mongosCount in MultiCluster topology
10
+
# you cannot specify mongodsPerShardCount, configServerCount and mongosCount
11
+
# in MultiCluster topology
11
12
version: 8.0.3
12
13
opsManager:
13
14
configMapRef:
@@ -18,7 +19,10 @@ spec:
18
19
shardPodSpec: # applies to all shards on all clusters
19
20
persistence:
20
21
single:
21
-
storage: 10G# all pods for all shards on all clusters will use that storage size in their PersistentVolumeClaim unless overridden in spec.shard.clusterSpecList or spec.shardOverrides.
22
+
# all pods for all shards on all clusters will use that storage size in their
23
+
# PersistentVolumeClaim unless overridden in spec.shard.clusterSpecList or
24
+
# spec.shardOverrides.
25
+
storage: 10G
22
26
23
27
configSrvPodSpec: # applies to all config server nodes in all clusters
24
28
persistence:
@@ -30,43 +34,62 @@ spec:
30
34
logs:
31
35
storage: 1G
32
36
33
-
shard: # consider this section as a default configuration for ALL shards
37
+
# consider this section as a default configuration for ALL shards
38
+
shard:
34
39
clusterSpecList:
35
40
- clusterName: kind-e2e-cluster-1
36
-
members: 1# each shard will have only one mongod process deployed in this cluster
41
+
# each shard will have only one mongod process deployed in this cluster
42
+
members: 1
37
43
memberConfig:
38
44
- votes: 1
39
45
priority: "20"# we increase the priority to have primary in this cluster
40
46
- clusterName: kind-e2e-cluster-2
41
-
members: 1# one member in this cluster, no votes and priority defined means it'll get the default values votes=1, priority="1"
47
+
# one member in this cluster, no votes and priority defined means it'll get
48
+
# the default values votes=1, priority="1"
49
+
members: 1
42
50
- clusterName: kind-e2e-cluster-3
43
51
members: 1# one member in this cluster
44
52
45
53
shardOverrides: # here you specify customizations for specific shards
46
-
- shardNames: # here you specify to which shard names the following configuration will apply
54
+
# here you specify to which shard names the following configuration will
55
+
# apply
56
+
- shardNames:
47
57
- sc-0
48
58
clusterSpecList:
49
59
- clusterName: kind-e2e-cluster-1
50
60
# all fields here are optional
51
-
members: 2# shard "sc-0" will have two members instead of one, which was defined as the default for all shards in spec.shard.clusterSpecList[0].members
61
+
# shard "sc-0" will have two members instead of one, which was defined as the
62
+
# default for all shards in spec.shard.clusterSpecList[0].members
63
+
members: 2
52
64
memberConfig:
53
65
- votes: 1
54
-
priority: "1"# shard "sc-0" should not have primary in this cluster like every other shard
66
+
# shard "sc-0" should not have primary in this cluster like every other shard
67
+
priority: "1"
55
68
- votes: 1
56
69
priority: "1"
57
70
- clusterName: kind-e2e-cluster-2
58
71
members: 2# shard "sc-0" will have two members instead of one
59
72
memberConfig:
60
73
- votes: 1
61
-
priority: "20"# both processes of shard "sc-0" in this cluster will have the same likelihood to become a primary member
74
+
# both processes of shard "sc-0" in this cluster will have the same
75
+
# likelihood to become a primary member
76
+
priority: "20"
62
77
- votes: 1
63
78
priority: "20"
64
-
- clusterName: kind-e2e-cluster-3 # We need to specify the list of all clusters on which this shard will be deployed.
65
-
# If the clusterName element is omitted here, it will be considered as an override for this shard, so that the operator shouldn't deploy any member to it.
66
-
# No fields are mandatory in here, though. In case a field is not set, it's not overridden and the default value is taken from a top level spec.shard settings.
79
+
# We need to specify the list of all clusters on which this shard will be
80
+
# deployed.
81
+
- clusterName: kind-e2e-cluster-3
82
+
# If the clusterName element is omitted here, it will be considered as an
83
+
# override for this shard, so that the operator shouldn't deploy any member
84
+
# to it.
85
+
# No fields are mandatory in here, though. In case a field is not set, it's
86
+
# not overridden and the default value is taken from a top level spec.shard
87
+
# settings.
67
88
68
89
configSrv:
69
-
clusterSpecList: # the same configuration fields are available as in spec.shard.clusterSpecList.
90
+
# the same configuration fields are available as in
91
+
# spec.shard.clusterSpecList.
92
+
clusterSpecList:
70
93
- clusterName: kind-e2e-cluster-1
71
94
members: 1
72
95
- clusterName: kind-e2e-cluster-2
@@ -75,11 +98,13 @@ spec:
75
98
members: 1
76
99
77
100
mongos:
78
-
clusterSpecList: # the same configuration fields are available as in spec.shard.clusterSpecList apart from storage and replica-set related fields.
101
+
# the same configuration fields are available as in
102
+
# spec.shard.clusterSpecList apart from storage and replica-set related
0 commit comments