diff --git a/pkg/asset/machines/master.go b/pkg/asset/machines/master.go index 68b8d79acd2..41c65aac1c9 100644 --- a/pkg/asset/machines/master.go +++ b/pkg/asset/machines/master.go @@ -54,7 +54,6 @@ import ( "github.com/openshift/installer/pkg/types" alibabacloudtypes "github.com/openshift/installer/pkg/types/alibabacloud" awstypes "github.com/openshift/installer/pkg/types/aws" - awsdefaults "github.com/openshift/installer/pkg/types/aws/defaults" azuretypes "github.com/openshift/installer/pkg/types/azure" azuredefaults "github.com/openshift/installer/pkg/types/azure/defaults" baremetaltypes "github.com/openshift/installer/pkg/types/baremetal" @@ -143,15 +142,6 @@ func (m *Master) Dependencies() []asset.Asset { } } -func awsDefaultMasterMachineTypes(region string, arch types.Architecture) []string { - classes := awsdefaults.InstanceClasses(region, arch) - types := make([]string, len(classes)) - for i, c := range classes { - types[i] = fmt.Sprintf("%s.xlarge", c) - } - return types -} - // Generate generates the Master asset. func (m *Master) Generate(dependencies asset.Parents) error { ctx := context.TODO() @@ -240,10 +230,10 @@ func (m *Master) Generate(dependencies asset.Parents) error { } if mpool.InstanceType == "" { - mpool.InstanceType, err = aws.PreferredInstanceType(ctx, installConfig.AWS, awsDefaultMasterMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture), mpool.Zones) + mpool.InstanceType, err = aws.PreferredInstanceType(ctx, installConfig.AWS, awsDefaultMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture), mpool.Zones) if err != nil { logrus.Warn(errors.Wrap(err, "failed to find default instance type")) - mpool.InstanceType = awsDefaultMasterMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture)[0] + mpool.InstanceType = awsDefaultMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture)[0] } } diff --git a/pkg/asset/machines/worker.go b/pkg/asset/machines/worker.go index 179968909b7..3d058f38c7c 100644 --- a/pkg/asset/machines/worker.go +++ b/pkg/asset/machines/worker.go @@ -115,7 +115,7 @@ func defaultAzureMachinePoolPlatform() azuretypes.MachinePool { func defaultGCPMachinePoolPlatform() gcptypes.MachinePool { return gcptypes.MachinePool{ - InstanceType: "n1-standard-4", + InstanceType: "n2-standard-4", OSDisk: gcptypes.OSDisk{ DiskSizeGB: powerOfTwoRootVolumeSize, DiskType: "pd-ssd", @@ -156,9 +156,9 @@ func defaultOvirtMachinePoolPlatform() ovirttypes.MachinePool { func defaultVSphereMachinePoolPlatform() vspheretypes.MachinePool { return vspheretypes.MachinePool{ - NumCPUs: 2, - NumCoresPerSocket: 2, - MemoryMiB: 8192, + NumCPUs: 4, + NumCoresPerSocket: 1, + MemoryMiB: 16384, OSDisk: vspheretypes.OSDisk{ DiskSizeGB: decimalRootVolumeSize, }, @@ -185,11 +185,11 @@ func defaultNutanixMachinePoolPlatform() nutanixtypes.MachinePool { } } -func awsDefaultWorkerMachineTypes(region string, arch types.Architecture) []string { +func awsDefaultMachineTypes(region string, arch types.Architecture) []string { classes := awsdefaults.InstanceClasses(region, arch) types := make([]string, len(classes)) for i, c := range classes { - types[i] = fmt.Sprintf("%s.large", c) + types[i] = fmt.Sprintf("%s.xlarge", c) } return types } @@ -341,10 +341,10 @@ func (w *Worker) Generate(dependencies asset.Parents) error { } } if mpool.InstanceType == "" { - mpool.InstanceType, err = aws.PreferredInstanceType(ctx, installConfig.AWS, awsDefaultWorkerMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture), mpool.Zones) + mpool.InstanceType, err = aws.PreferredInstanceType(ctx, installConfig.AWS, awsDefaultMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture), mpool.Zones) if err != nil { logrus.Warn(errors.Wrap(err, "failed to find default instance type")) - mpool.InstanceType = awsDefaultWorkerMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture)[0] + mpool.InstanceType = awsDefaultMachineTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture)[0] } } // if the list of zones is the default we need to try to filter the list in case there are some zones where the instance might not be available