Skip to content

Commit 53b4575

Browse files
authored
Fix S3 creation in iad (#219)
1 parent f743be9 commit 53b4575

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

substrate/cmd/kitctl/bootstrap.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func bootstrap(cmd *cobra.Command, args []string) {
5151
start := time.Now()
5252
name := parseName(ctx, args)
5353
logging.FromContext(ctx).Infof("Bootstrapping %q", name)
54-
vpcCidrs := []string{"10.0.0.0/16", "10.1.0.0/16", "10.2.0.0/16", "10.3.0.0/16", "10.4.0.0/16", "10.5.0.0/16"}
54+
vpcCidrs := []string{"10.0.0.0/16", "10.1.0.0/16", "10.2.0.0/16", "10.3.0.0/16", "10.4.0.0/16"}
5555
if err := substrate.NewController(ctx).Reconcile(ctx, &v1alpha1.Substrate{
5656
ObjectMeta: metav1.ObjectMeta{Name: name},
5757

@@ -64,7 +64,6 @@ func bootstrap(cmd *cobra.Command, args []string) {
6464
{Zone: "us-west-2c", CIDR: vpcCidrs[2]},
6565
{Zone: "us-west-2a", CIDR: vpcCidrs[3], Public: true},
6666
{Zone: "us-west-2b", CIDR: vpcCidrs[4], Public: true},
67-
{Zone: "us-west-2c", CIDR: vpcCidrs[5], Public: true},
6867
},
6968
},
7069
}); err != nil {

substrate/pkg/controller/substrate/cluster/config.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ func (c *Config) generateStaticPodManifests(cfg *kubeadm.InitConfiguration, subs
199199
}
200200

201201
func (c *Config) ensureBucket(ctx context.Context, substrate *v1alpha1.Substrate) error {
202-
if _, err := c.S3.CreateBucket(&s3.CreateBucketInput{Bucket: discovery.Name(substrate),
203-
CreateBucketConfiguration: &s3.CreateBucketConfiguration{LocationConstraint: c.S3.Config.Region},
204-
}); err != nil {
202+
if _, err := c.S3.CreateBucket(&s3.CreateBucketInput{Bucket: discovery.Name(substrate)}); err != nil {
205203
if err.(awserr.Error).Code() != s3.ErrCodeBucketAlreadyOwnedByYou {
206204
return fmt.Errorf("creating S3 bucket, %w", err)
207205
}

0 commit comments

Comments
 (0)