Skip to content

Commit 0847771

Browse files
committed
MULTIARCH-4569: aws: support multi-arch nodes
Use different instance types based on the node's architecture.
1 parent 160156e commit 0847771

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/asset/machines/worker.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,11 @@ func (w *Worker) Generate(ctx context.Context, dependencies asset.Parents) error
399399
}
400400

401401
if mpool.InstanceType == "" {
402-
instanceTypes := awsdefaults.InstanceTypes(installConfig.Config.Platform.AWS.Region, installConfig.Config.ControlPlane.Architecture, configv1.HighlyAvailableTopologyMode)
402+
arch := installConfig.Config.ControlPlane.Architecture
403+
if len(installConfig.Config.Compute) > 0 {
404+
arch = installConfig.Config.Compute[0].Architecture
405+
}
406+
instanceTypes := awsdefaults.InstanceTypes(installConfig.Config.Platform.AWS.Region, arch, configv1.HighlyAvailableTopologyMode)
403407
switch pool.Name {
404408
case types.MachinePoolEdgeRoleName:
405409
ok := awsSetPreferredInstanceByEdgeZone(ctx, instanceTypes, installConfig.AWS, zones)

0 commit comments

Comments
 (0)