Skip to content

Commit

Permalink
MULTIARCH-4569: aws: support multi-arch nodes
Browse files Browse the repository at this point in the history
Use different instance types based on the node's architecture.
  • Loading branch information
r4f4 committed Jul 11, 2024
1 parent 160156e commit 0847771
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/asset/machines/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,11 @@ func (w *Worker) Generate(ctx context.Context, dependencies asset.Parents) error
}

if mpool.InstanceType == "" {
instanceTypes := awsdefaults.InstanceTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture, configv1.HighlyAvailableTopologyMode)
arch := installConfig.Config.ControlPlane.Architecture
if len(installConfig.Config.Compute) > 0 {
arch = installConfig.Config.Compute[0].Architecture
}
instanceTypes := awsdefaults.InstanceTypes(installConfig.Config.Platform.AWS.Region, arch, configv1.HighlyAvailableTopologyMode)
switch pool.Name {
case types.MachinePoolEdgeRoleName:
ok := awsSetPreferredInstanceByEdgeZone(ctx, instanceTypes, installConfig.AWS, zones)
Expand Down

0 comments on commit 0847771

Please sign in to comment.