Skip to content

Commit

Permalink
Bug 2016955: Set AWS Bootstrap Type == Master
Browse files Browse the repository at this point in the history
This commit sets the boostrap node to use the
same instance type as the control-plane nodes
in order to avoid failures that we have seen
when the hard-coded instance type of m5 is
unavailable in the zone.
  • Loading branch information
patrickdillon authored and clnperez committed Nov 2, 2021
1 parent ea5463b commit 5073cfb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/tfvars/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ package aws

import (
"encoding/json"
"fmt"

"github.com/pkg/errors"
"sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsprovider/v1beta1"

configaws "github.com/openshift/installer/pkg/asset/installconfig/aws"
"github.com/openshift/installer/pkg/types"
typesaws "github.com/openshift/installer/pkg/types/aws"
"github.com/openshift/installer/pkg/types/aws/defaults"
)

type config struct {
Expand Down Expand Up @@ -114,15 +112,13 @@ func TFVars(sources TFVarsSources) ([]byte, error) {
return nil, errors.New("EBS IOPS must be configured for the io1 root volume")
}

instanceClass := defaults.InstanceClass(masterConfig.Placement.Region, sources.Architecture)

cfg := &config{
CustomEndpoints: endpoints,
Region: masterConfig.Placement.Region,
ExtraTags: tags,
MasterAvailabilityZones: masterAvailabilityZones,
WorkerAvailabilityZones: workerAvailabilityZones,
BootstrapInstanceType: fmt.Sprintf("%s.large", instanceClass),
BootstrapInstanceType: masterConfig.InstanceType,
MasterInstanceType: masterConfig.InstanceType,
Size: *rootVolume.EBS.VolumeSize,
Type: *rootVolume.EBS.VolumeType,
Expand Down

0 comments on commit 5073cfb

Please sign in to comment.