-
Notifications
You must be signed in to change notification settings - Fork 14
fix(aws): propagate architecture in cluster mode #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"). | ||
| // +kubebuilder:default="m5.xlarge" | ||
| // +optional | ||
| // +optional | ||
|
|
||
| InstanceType string `json:"instanceType,omitempty"` | ||
|
|
||
| // OS specifies the operating system by ID (e.g., "ubuntu-22.04"). | ||
|
|
@@ -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
|
||
| // +optional | ||
| // +optional | ||
|
|
||
| InstanceType string `json:"instanceType,omitempty"` | ||
|
|
||
| // OS specifies the operating system by ID (e.g., "ubuntu-22.04"). | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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
|
||||||||||||||||||||||
| // 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 |
There was a problem hiding this comment.
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.