@@ -45,15 +45,15 @@ func deploymentSpecMask(atlasDeployment *akov2.AtlasDeployment) int {
45
45
return mask
46
46
}
47
47
48
- func AtlasDeployment (atlasDeployment * akov2.AtlasDeployment , isGov bool , regionUsageRestrictions string ) error {
48
+ func AtlasDeployment (atlasDeployment * akov2.AtlasDeployment ) error {
49
49
var err error
50
50
var tagsSpec []* akov2.TagSpec
51
51
switch deploymentSpecMask (atlasDeployment ) {
52
52
case 0 :
53
53
return errors .New ("expected exactly one of spec.deploymentSpec or spec.serverlessSpec or spec.flexSpec to be present, but none were" )
54
54
case DeploymentSet :
55
55
tagsSpec = atlasDeployment .Spec .DeploymentSpec .Tags
56
- err = regularDeployment (atlasDeployment .Spec .DeploymentSpec , isGov , regionUsageRestrictions )
56
+ err = regularDeployment (atlasDeployment .Spec .DeploymentSpec )
57
57
case ServerlessSet :
58
58
tagsSpec = atlasDeployment .Spec .ServerlessSpec .Tags
59
59
err = serverlessDeployment (atlasDeployment .Spec .ServerlessSpec )
@@ -75,13 +75,7 @@ func AtlasDeployment(atlasDeployment *akov2.AtlasDeployment, isGov bool, regionU
75
75
return nil
76
76
}
77
77
78
- func regularDeployment (spec * akov2.AdvancedDeploymentSpec , isGov bool , regionUsageRestrictions string ) error {
79
- if isGov {
80
- if err := deploymentForGov (spec , regionUsageRestrictions ); err != nil {
81
- return err
82
- }
83
- }
84
-
78
+ func regularDeployment (spec * akov2.AdvancedDeploymentSpec ) error {
85
79
var autoscaling akov2.AdvancedAutoScalingSpec
86
80
var instanceSize string
87
81
for _ , replicaSetSpec := range spec .ReplicationSpecs {
@@ -254,19 +248,6 @@ func advancedInstanceSizeInRange(currentInstanceSize, minInstanceSize, maxInstan
254
248
return nil
255
249
}
256
250
257
- func deploymentForGov (spec * akov2.AdvancedDeploymentSpec , regionUsageRestrictions string ) error {
258
- for _ , replication := range spec .ReplicationSpecs {
259
- for _ , region := range replication .RegionConfigs {
260
- regionErr := validCloudGovRegion (regionUsageRestrictions , region .RegionName )
261
- if regionErr != nil {
262
- return fmt .Errorf ("deployment in atlas for government support a restricted set of regions: %w" , regionErr )
263
- }
264
- }
265
- }
266
-
267
- return nil
268
- }
269
-
270
251
func serverlessDeployment (spec * akov2.ServerlessSpec ) error {
271
252
supportedProviders := provider .SupportedProviders ()
272
253
switch {
0 commit comments