Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions api/holodeck/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ type ControlPlaneSpec struct {
Count int32 `json:"count"`

// InstanceType specifies the EC2 instance type for control-plane nodes.
// Default is "m5.xlarge" (x86_64). For arm64, use Graviton types
// (e.g., "m7g.xlarge", "c7g.xlarge").
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new doc suggests switching to arm64 instance types (e.g., m7g/c7g, g5g) but doesn’t mention that users also need to set the AMI architecture (e.g., image.architecture: arm64) so AMI resolution matches the instance type. Without that, instance creation can fail due to an AMI/instance architecture mismatch.

Suggested change
// (e.g., "m7g.xlarge", "c7g.xlarge").
// (e.g., "m7g.xlarge", "c7g.xlarge"). When using arm64 instance types,
// ensure the AMI architecture also matches arm64 (for example, by
// setting `image.architecture: arm64` when specifying an explicit image)
// so that AMI resolution matches the instance type.

Copilot uses AI. Check for mistakes.
// +kubebuilder:default="m5.xlarge"
// +optional
// +optional

InstanceType string `json:"instanceType,omitempty"`

// OS specifies the operating system by ID (e.g., "ubuntu-22.04").
Expand Down Expand Up @@ -236,10 +236,10 @@ type WorkerPoolSpec struct {

// InstanceType specifies the EC2 instance type for worker nodes.
// For GPU workloads, use GPU instance types (g4dn, p4d, etc.).
// Default is "g4dn.xlarge" (x86_64). For arm64 GPU workloads,
// use "g5g.xlarge" or similar Graviton GPU instances.
// +kubebuilder:default="g4dn.xlarge"
Comment on lines 237 to 241
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc adds arm64 GPU instance guidance (g5g), but it should also call out that the worker pool’s AMI architecture must be set to arm64 (via image.architecture) for OS-based AMI resolution to select an arm64 AMI; otherwise you can end up with an x86_64 AMI on an arm64 instance type.

Copilot uses AI. Check for mistakes.
// +optional
// +optional

InstanceType string `json:"instanceType,omitempty"`

// OS specifies the operating system by ID (e.g., "ubuntu-22.04").
Expand Down
7 changes: 6 additions & 1 deletion pkg/provider/aws/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,12 @@ func (p *Provider) createInstances(
image *v1alpha1.Image,
) ([]InstanceInfo, error) {
// Resolve AMI for this node pool
resolved, err := p.resolveImageForNode(os, image, "")
// Determine architecture from image spec
var arch string
if image != nil && image.Architecture != "" {
arch = image.Architecture
Comment on lines +399 to +402
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cluster mode this still won’t propagate a globally configured architecture (p.Spec.Image.Architecture) when the node-pool image is nil, because arch remains empty and resolveImageForNode defaults to x86_64. If the intent is to support arm64 clusters without requiring cluster.*.image.architecture on every pool, use p.Spec.Image.Architecture as the fallback (and let per-pool image.Architecture override), or move that fallback logic into resolveImageForNode itself. As written, the new arch variable is also redundant because resolveImageForNode already consults image.Architecture when arch is empty.

Suggested change
// Determine architecture from image spec
var arch string
if image != nil && image.Architecture != "" {
arch = image.Architecture
// Determine architecture, preferring per-pool image over global spec
var arch string
if image != nil && image.Architecture != "" {
arch = image.Architecture
} else if p.Spec.Image != nil && p.Spec.Image.Architecture != "" {
arch = p.Spec.Image.Architecture

Copilot uses AI. Check for mistakes.
}
resolved, err := p.resolveImageForNode(os, image, arch)
if err != nil {
return nil, fmt.Errorf("error resolving AMI: %w", err)
}
Expand Down
Loading