Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/create_kind_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ nodes:
hostPort: 30011
listenAddress: "0.0.0.0"
protocol: TCP
- containerPort: 30012
hostPort: 30012
listenAddress: "0.0.0.0"
protocol: TCP
- containerPort: 30013
hostPort: 30013
listenAddress: "0.0.0.0"
protocol: TCP
EOF

# connect the registry to the cluster network
Expand Down
9 changes: 8 additions & 1 deletion test/e2e/config/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,11 @@ nodes:
hostPort: 30011
listenAddress: "0.0.0.0"
protocol: TCP

- containerPort: 30012
hostPort: 30012
listenAddress: "0.0.0.0"
protocol: TCP
- containerPort: 30013
hostPort: 30013
listenAddress: "0.0.0.0"
protocol: TCP
42 changes: 38 additions & 4 deletions test/e2e/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ var _ = Describe("[cluster-ns] Configuration namespaced. Deploy cluster", func()
},
),
),
Entry("Multiregion, Backup and 2 DBUsers",
Entry("Multiregion AWS, Backup and 2 DBUsers",
model.NewTestDataProvider(
"operator-ns-multiregion",
"operator-ns-multiregion-aws",
model.NewEmptyAtlasKeyType().UseDefaulFullAccess(),
[]string{"data/atlascluster_multiregion.yaml"},
[]string{"data/atlascluster_multiregion_update.yaml"},
[]string{"data/atlascluster_multiregion_aws.yaml"},
[]string{"data/atlascluster_multiregion_aws_update.yaml"},
[]model.DBUser{
*model.NewDBUser("user1").
WithSecretRef("dbuser-secret-u1").
Expand All @@ -114,6 +114,40 @@ var _ = Describe("[cluster-ns] Configuration namespaced. Deploy cluster", func()
},
),
),
Entry("Multiregion Azure, Backup and 1 DBUser",
model.NewTestDataProvider(
"operator-multiregion-azure",
model.NewEmptyAtlasKeyType().UseDefaulFullAccess().CreateAsGlobalLevelKey(),
[]string{"data/atlascluster_multiregion_azure.yaml"},
[]string{},
[]model.DBUser{
*model.NewDBUser("user1").
WithSecretRef("dbuser-secret-u1").
AddBuildInAdminRole(),
},
30012,
[]func(*model.TestDataProvider){
actions.DeleteFirstUser,
},
),
),
Entry("Multiregion GCP, Backup and 1 DBUser",
model.NewTestDataProvider(
"operator-multiregion-gcp",
model.NewEmptyAtlasKeyType().UseDefaulFullAccess().CreateAsGlobalLevelKey(),
[]string{"data/atlascluster_multiregion_gcp.yaml"},
[]string{},
[]model.DBUser{
*model.NewDBUser("user1").
WithSecretRef("dbuser-secret-u1").
AddBuildInAdminRole(),
},
30013,
[]func(*model.TestDataProvider){
actions.DeleteFirstUser,
},
),
),
Entry("Product Owner - Simplest configuration with ProjectOwner and update cluster to have backup",
model.NewTestDataProvider(
"operator-ns-product-owner",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: atlas.mongodb.com/v1
kind: AtlasCluster
metadata:
name: atlascluster-multiregion
name: atlascluster-multiregion-aws
spec:
name: cluster-multiregion
name: cluster-multiregion-aws
projectRef:
name: my-project
providerBackupEnabled: true
Expand All @@ -24,4 +24,4 @@ spec:
analyticsNodes: 0
electableNodes: 2
priority: 7
readOnlyNodes: 0
readOnlyNodes: 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: atlas.mongodb.com/v1
kind: AtlasCluster
metadata:
name: atlascluster-multiregion
name: atlascluster-multiregion-aws
spec:
name: cluster-multiregion
name: cluster-multiregion-aws
projectRef:
name: my-project
providerBackupEnabled: false
Expand All @@ -24,4 +24,4 @@ spec:
analyticsNodes: 0
electableNodes: 2
priority: 7
readOnlyNodes: 0
readOnlyNodes: 0
27 changes: 27 additions & 0 deletions test/e2e/data/atlascluster_multiregion_azure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: atlas.mongodb.com/v1
kind: AtlasCluster
metadata:
name: atlascluster-multiregion-azure
spec:
name: cluster-multiregion-azure
projectRef:
name: my-project
providerBackupEnabled: true
clusterType: REPLICASET
providerSettings:
instanceSizeName: M10
providerName: AZURE
replicationSpecs:
- numShards: 1
zoneName: Europe
regionsConfig:
NORWAY_EAST:
analyticsNodes: 0
electableNodes: 1
priority: 6
readOnlyNodes: 0
GERMANY_NORTH:
analyticsNodes: 0
electableNodes: 2
priority: 7
readOnlyNodes: 0
27 changes: 27 additions & 0 deletions test/e2e/data/atlascluster_multiregion_azure_update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: atlas.mongodb.com/v1
kind: AtlasCluster
metadata:
name: atlascluster-multiregion-azure
spec:
name: cluster-multiregion-azure
projectRef:
name: my-project
providerBackupEnabled: true
clusterType: REPLICASET
providerSettings:
instanceSizeName: M20
providerName: AZURE
replicationSpecs:
- numShards: 1
zoneName: Europe
regionsConfig:
NORWAY_EAST:
analyticsNodes: 0
electableNodes: 1
priority: 6
readOnlyNodes: 0
GERMANY_NORTH:
analyticsNodes: 0
electableNodes: 2
priority: 7
readOnlyNodes: 0
27 changes: 27 additions & 0 deletions test/e2e/data/atlascluster_multiregion_gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: atlas.mongodb.com/v1
kind: AtlasCluster
metadata:
name: atlascluster-multiregion-gcp
spec:
name: cluster-multiregion-gcp
projectRef:
name: my-project
providerBackupEnabled: true
clusterType: REPLICASET
providerSettings:
instanceSizeName: M10
providerName: GCP
replicationSpecs:
- numShards: 1
zoneName: US-Zone
regionsConfig:
CENTRAL_US:
analyticsNodes: 0
electableNodes: 1
priority: 6
readOnlyNodes: 0
EASTERN_US:
analyticsNodes: 0
electableNodes: 2
priority: 7
readOnlyNodes: 0