From e04437e8ca1b6540a4b0d0fc497ad83ccb7dae05 Mon Sep 17 00:00:00 2001 From: takahashi shun Date: Fri, 7 Nov 2025 00:35:55 +0900 Subject: [PATCH 1/3] Add support for multiple instance types in AWSManagedMachinePool --- ...uster.x-k8s.io_awsmanagedmachinepools.yaml | 10 +++++ exp/api/v1beta1/conversion.go | 24 +++++++++++- exp/api/v1beta1/zz_generated.conversion.go | 1 + .../v1beta2/awsmanagedmachinepool_types.go | 8 ++++ .../v1beta2/awsmanagedmachinepool_webhook.go | 25 ++++++++++++ exp/api/v1beta2/zz_generated.deepcopy.go | 5 +++ pkg/cloud/services/eks/nodegroup.go | 6 ++- test-awsmanagedmachinepool.yaml | 39 +++++++++++++++++++ 8 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 test-awsmanagedmachinepool.yaml diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml index 11fdfa422c..fb5e4a131d 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml @@ -933,6 +933,16 @@ spec: instanceType: description: InstanceType specifies the AWS instance type type: string + instanceTypes: + description: |- + InstanceTypes specifies a list of AWS instance types for the node group. + When specified, this allows using multiple instance types which enhances + the availability of Spot instances. + At most one of InstanceType or InstanceTypes may be specified. + See https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types + items: + type: string + type: array labels: additionalProperties: type: string diff --git a/exp/api/v1beta1/conversion.go b/exp/api/v1beta1/conversion.go index cf4040a456..ec2521daa9 100644 --- a/exp/api/v1beta1/conversion.go +++ b/exp/api/v1beta1/conversion.go @@ -149,6 +149,14 @@ func (src *AWSManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error { dst.Spec.RolePath = restored.Spec.RolePath dst.Spec.RolePermissionsBoundary = restored.Spec.RolePermissionsBoundary + // Restore InstanceType and InstanceTypes from the hub version + // v1beta1 doesn't have InstanceTypes, but v1beta2 does + // We preserve the exact state through the annotation-based conversion data + // This includes cases where both fields are set (even though webhook would reject it) + // to ensure fuzzy conversion tests pass + dst.Spec.InstanceType = restored.Spec.InstanceType + dst.Spec.InstanceTypes = restored.Spec.InstanceTypes + return nil } @@ -160,12 +168,26 @@ func (r *AWSManagedMachinePool) ConvertFrom(srcRaw conversion.Hub) error { return err } + // Preserve v1beta2 data through annotation + // This ensures fuzzy conversion tests pass return utilconversion.MarshalData(src, r) } // Convert_v1beta2_AWSManagedMachinePoolSpec_To_v1beta1_AWSManagedMachinePoolSpec is a conversion function. func Convert_v1beta2_AWSManagedMachinePoolSpec_To_v1beta1_AWSManagedMachinePoolSpec(in *expinfrav1.AWSManagedMachinePoolSpec, out *AWSManagedMachinePoolSpec, s apiconversion.Scope) error { - return autoConvert_v1beta2_AWSManagedMachinePoolSpec_To_v1beta1_AWSManagedMachinePoolSpec(in, out, s) + if err := autoConvert_v1beta2_AWSManagedMachinePoolSpec_To_v1beta1_AWSManagedMachinePoolSpec(in, out, s); err != nil { + return err + } + + // Convert v1beta2 InstanceTypes or InstanceType to v1beta1 InstanceType + // Prefer InstanceTypes if set (use first element), otherwise use InstanceType + if len(in.InstanceTypes) > 0 { + out.InstanceType = &in.InstanceTypes[0] + } else if in.InstanceType != nil { + out.InstanceType = in.InstanceType + } + + return nil } func Convert_v1beta2_AWSMachinePoolStatus_To_v1beta1_AWSMachinePoolStatus(in *expinfrav1.AWSMachinePoolStatus, out *AWSMachinePoolStatus, s apiconversion.Scope) error { diff --git a/exp/api/v1beta1/zz_generated.conversion.go b/exp/api/v1beta1/zz_generated.conversion.go index 933a08f716..2634d640be 100644 --- a/exp/api/v1beta1/zz_generated.conversion.go +++ b/exp/api/v1beta1/zz_generated.conversion.go @@ -745,6 +745,7 @@ func autoConvert_v1beta2_AWSManagedMachinePoolSpec_To_v1beta1_AWSManagedMachineP out.Taints = *(*Taints)(unsafe.Pointer(&in.Taints)) out.DiskSize = (*int32)(unsafe.Pointer(in.DiskSize)) out.InstanceType = (*string)(unsafe.Pointer(in.InstanceType)) + // WARNING: in.InstanceTypes requires manual conversion: does not exist in peer-type out.Scaling = (*ManagedMachinePoolScaling)(unsafe.Pointer(in.Scaling)) out.RemoteAccess = (*ManagedRemoteAccess)(unsafe.Pointer(in.RemoteAccess)) out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) diff --git a/exp/api/v1beta2/awsmanagedmachinepool_types.go b/exp/api/v1beta2/awsmanagedmachinepool_types.go index 0aeb7be0dc..f6709f8b16 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_types.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_types.go @@ -180,6 +180,14 @@ type AWSManagedMachinePoolSpec struct { // +optional InstanceType *string `json:"instanceType,omitempty"` + // InstanceTypes specifies a list of AWS instance types for the node group. + // When specified, this allows using multiple instance types which enhances + // the availability of Spot instances. + // At most one of InstanceType or InstanceTypes may be specified. + // See https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types + // +optional + InstanceTypes []string `json:"instanceTypes,omitempty"` + // Scaling specifies scaling for the ASG behind this pool // +optional Scaling *ManagedMachinePoolScaling `json:"scaling,omitempty"` diff --git a/exp/api/v1beta2/awsmanagedmachinepool_webhook.go b/exp/api/v1beta2/awsmanagedmachinepool_webhook.go index 38ceffe3f3..3c31e8707a 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_webhook.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_webhook.go @@ -124,6 +124,20 @@ func (r *AWSManagedMachinePool) validateRemoteAccess() field.ErrorList { return allErrs } +func (r *AWSManagedMachinePool) validateInstanceTypes() field.ErrorList { + var allErrs field.ErrorList + + // InstanceType and InstanceTypes are mutually exclusive + if r.Spec.InstanceType != nil && len(r.Spec.InstanceTypes) > 0 { + allErrs = append(allErrs, field.Invalid( + field.NewPath("spec", "InstanceTypes"), + r.Spec.InstanceTypes, + "cannot specify both instanceType and instanceTypes. Use instanceTypes for multiple instance types or instanceType for a single instance type")) + } + + return allErrs +} + func (r *AWSManagedMachinePool) validateLaunchTemplate() field.ErrorList { var allErrs field.ErrorList if r.Spec.AWSLaunchTemplate == nil { @@ -133,6 +147,9 @@ func (r *AWSManagedMachinePool) validateLaunchTemplate() field.ErrorList { if r.Spec.InstanceType != nil { allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "InstanceType"), r.Spec.InstanceType, "InstanceType cannot be specified when LaunchTemplate is specified")) } + if len(r.Spec.InstanceTypes) > 0 { + allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "InstanceTypes"), r.Spec.InstanceTypes, "InstanceTypes cannot be specified when LaunchTemplate is specified")) + } if r.Spec.DiskSize != nil { allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "DiskSize"), r.Spec.DiskSize, "DiskSize cannot be specified when LaunchTemplate is specified")) } @@ -171,6 +188,9 @@ func (*awsManagedMachinePoolWebhook) ValidateCreate(_ context.Context, obj runti if errs := r.validateNodegroupUpdateConfig(); len(errs) > 0 { allErrs = append(allErrs, errs...) } + if errs := r.validateInstanceTypes(); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } if errs := r.validateLaunchTemplate(); len(errs) > 0 { allErrs = append(allErrs, errs...) } @@ -216,6 +236,9 @@ func (*awsManagedMachinePoolWebhook) ValidateUpdate(_ context.Context, oldObj, n if errs := r.validateNodegroupUpdateConfig(); len(errs) > 0 { allErrs = append(allErrs, errs...) } + if errs := r.validateInstanceTypes(); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } if errs := r.validateLaunchTemplate(); len(errs) > 0 { allErrs = append(allErrs, errs...) } @@ -265,6 +288,8 @@ func (r *AWSManagedMachinePool) validateImmutable(old *AWSManagedMachinePool) fi appendErrorIfMutated(old.Spec.SubnetIDs, r.Spec.SubnetIDs, "subnetIDs") appendErrorIfSetAndMutated(old.Spec.RoleName, r.Spec.RoleName, "roleName") appendErrorIfMutated(old.Spec.DiskSize, r.Spec.DiskSize, "diskSize") + appendErrorIfMutated(old.Spec.InstanceType, r.Spec.InstanceType, "instanceType") + appendErrorIfMutated(old.Spec.InstanceTypes, r.Spec.InstanceTypes, "instanceTypes") appendErrorIfMutated(old.Spec.AMIType, r.Spec.AMIType, "amiType") appendErrorIfMutated(old.Spec.RemoteAccess, r.Spec.RemoteAccess, "remoteAccess") appendErrorIfSetAndMutated(old.Spec.CapacityType, r.Spec.CapacityType, "capacityType") diff --git a/exp/api/v1beta2/zz_generated.deepcopy.go b/exp/api/v1beta2/zz_generated.deepcopy.go index af59aa3b75..87a3740d85 100644 --- a/exp/api/v1beta2/zz_generated.deepcopy.go +++ b/exp/api/v1beta2/zz_generated.deepcopy.go @@ -532,6 +532,11 @@ func (in *AWSManagedMachinePoolSpec) DeepCopyInto(out *AWSManagedMachinePoolSpec *out = new(string) **out = **in } + if in.InstanceTypes != nil { + in, out := &in.InstanceTypes, &out.InstanceTypes + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.Scaling != nil { in, out := &in.Scaling, &out.Scaling *out = new(ManagedMachinePoolScaling) diff --git a/pkg/cloud/services/eks/nodegroup.go b/pkg/cloud/services/eks/nodegroup.go index eb1430ffe6..e9141427cf 100644 --- a/pkg/cloud/services/eks/nodegroup.go +++ b/pkg/cloud/services/eks/nodegroup.go @@ -225,7 +225,11 @@ func (s *NodegroupService) createNodegroup(ctx context.Context) (*ekstypes.Nodeg if managedPool.DiskSize != nil { input.DiskSize = managedPool.DiskSize } - if managedPool.InstanceType != nil { + // Support both InstanceTypes (preferred for multiple types) and InstanceType (for single type) + // Webhook validation ensures they are mutually exclusive + if len(managedPool.InstanceTypes) > 0 { + input.InstanceTypes = managedPool.InstanceTypes + } else if managedPool.InstanceType != nil { input.InstanceTypes = []string{aws.ToString(managedPool.InstanceType)} } if len(managedPool.Taints) > 0 { diff --git a/test-awsmanagedmachinepool.yaml b/test-awsmanagedmachinepool.yaml new file mode 100644 index 0000000000..2003ea1181 --- /dev/null +++ b/test-awsmanagedmachinepool.yaml @@ -0,0 +1,39 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 +kind: AWSManagedMachinePool +metadata: + name: test-pool-multiple-instance-types + namespace: default +spec: + eksNodegroupName: test-nodegroup + # Use instanceTypes (plural) to specify multiple instance types + # This enhances availability when using Spot instances + instanceTypes: + - t3.medium + - t3a.medium + - t2.medium + capacityType: spot + scaling: + minSize: 1 + maxSize: 10 + updateConfig: + maxUnavailable: 1 + tags: + usage: test +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta2 +kind: AWSManagedMachinePool +metadata: + name: test-pool-single-instance-type + namespace: default +spec: + eksNodegroupName: test-nodegroup-single + # Use instanceType (singular) for a single instance type (backward compatible) + instanceType: t3.medium + capacityType: on-demand + scaling: + minSize: 1 + maxSize: 5 + updateConfig: + maxUnavailable: 1 + tags: + usage: test From 71efb58add12b44288cd160b472089c8c8e7d893 Mon Sep 17 00:00:00 2001 From: takahashi shun Date: Fri, 7 Nov 2025 09:33:53 +0900 Subject: [PATCH 2/3] Add deprecation notice and improve documentation for InstanceType field --- ...uster.x-k8s.io_awsmanagedmachinepools.yaml | 12 +- .../v1beta2/awsmanagedmachinepool_types.go | 11 +- .../v1beta2/awsmanagedmachinepool_webhook.go | 5 + .../awsmanagedmachinepool_webhook_test.go | 139 ++++++++++++++++++ 4 files changed, 159 insertions(+), 8 deletions(-) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml index fb5e4a131d..712a9364e2 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml @@ -931,15 +931,19 @@ spec: name of the managed machine pool. type: string instanceType: - description: InstanceType specifies the AWS instance type + description: |- + InstanceType specifies the AWS instance type. + This field is deprecated. Use InstanceTypes instead. type: string instanceTypes: description: |- InstanceTypes specifies a list of AWS instance types for the node group. - When specified, this allows using multiple instance types which enhances - the availability of Spot instances. + The order of instance types specified determines priority of picking that instance type. + This is also influenced by the CapacityType. For On-Demand capacity, the allocation strategy + uses the order of instance types to determine which instance type to use first when fulfilling capacity. + See AWS documentation https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types + for more information. At most one of InstanceType or InstanceTypes may be specified. - See https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types items: type: string type: array diff --git a/exp/api/v1beta2/awsmanagedmachinepool_types.go b/exp/api/v1beta2/awsmanagedmachinepool_types.go index f6709f8b16..ed69b54359 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_types.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_types.go @@ -176,15 +176,18 @@ type AWSManagedMachinePoolSpec struct { // +optional DiskSize *int32 `json:"diskSize,omitempty"` - // InstanceType specifies the AWS instance type + // InstanceType specifies the AWS instance type. + // This field is deprecated. Use InstanceTypes instead. // +optional InstanceType *string `json:"instanceType,omitempty"` // InstanceTypes specifies a list of AWS instance types for the node group. - // When specified, this allows using multiple instance types which enhances - // the availability of Spot instances. + // The order of instance types specified determines priority of picking that instance type. + // This is also influenced by the CapacityType. For On-Demand capacity, the allocation strategy + // uses the order of instance types to determine which instance type to use first when fulfilling capacity. + // See AWS documentation https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types + // for more information. // At most one of InstanceType or InstanceTypes may be specified. - // See https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types // +optional InstanceTypes []string `json:"instanceTypes,omitempty"` diff --git a/exp/api/v1beta2/awsmanagedmachinepool_webhook.go b/exp/api/v1beta2/awsmanagedmachinepool_webhook.go index 3c31e8707a..6e8c81bf3a 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_webhook.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_webhook.go @@ -200,6 +200,11 @@ func (*awsManagedMachinePoolWebhook) ValidateCreate(_ context.Context, obj runti allErrs = append(allErrs, r.Spec.AdditionalTags.Validate()...) + // Log deprecation warning for InstanceType field + if r.Spec.InstanceType != nil { + mmpLog.Info("spec.instanceType is deprecated, use spec.instanceTypes instead", "managed-machine-pool", klog.KObj(r)) + } + if len(allErrs) == 0 { return nil, nil } diff --git a/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go b/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go index 34401a3cec..951bd2d733 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_webhook_test.go @@ -155,6 +155,37 @@ func TestAWSManagedMachinePoolValidateCreate(t *testing.T) { }, wantErr: false, }, + { + name: "both instanceType and instanceTypes are specified", + pool: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-4", + InstanceTypes: []string{"m5.xlarge", "m5.2xlarge"}, + InstanceType: ptr.To("m5.xlarge"), + }, + }, + wantErr: true, + }, + { + name: "only instanceTypes is accepted", + pool: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-5", + InstanceTypes: []string{"m5.xlarge", "m5.2xlarge"}, + }, + }, + wantErr: false, + }, + { + name: "only instanceType is accepted", + pool: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-6", + InstanceType: ptr.To("m5.xlarge"), + }, + }, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -693,6 +724,114 @@ func TestAWSManagedMachinePoolValidateUpdate(t *testing.T) { }, wantErr: false, }, + { + name: "adding instanceType is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceType: ptr.To("m5.xlarge"), + }, + }, + wantErr: true, + }, + { + name: "removing instanceType is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceType: ptr.To("m5.xlarge"), + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + }, + }, + wantErr: true, + }, + { + name: "changing instanceType is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceType: ptr.To("m5.xlarge"), + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceType: ptr.To("m5.2xlarge"), + }, + }, + wantErr: true, + }, + { + name: "adding instanceTypes is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceTypes: []string{"m5.xlarge", "m5.2xlarge"}, + }, + }, + wantErr: true, + }, + { + name: "removing instanceTypes is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceTypes: []string{"m5.xlarge", "m5.2xlarge"}, + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + }, + }, + wantErr: true, + }, + { + name: "changing instanceTypes is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceTypes: []string{"m5.xlarge", "m5.2xlarge"}, + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceTypes: []string{"m5.xlarge", "m6.xlarge"}, + }, + }, + wantErr: true, + }, + { + name: "adding both instanceType and instanceTypes is rejected", + old: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + }, + }, + new: &AWSManagedMachinePool{ + Spec: AWSManagedMachinePoolSpec{ + EKSNodegroupName: "eks-node-group-1", + InstanceType: ptr.To("m5.xlarge"), + InstanceTypes: []string{"m5.xlarge", "m6.xlarge"}, + }, + }, + wantErr: true, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { From afa49b92164f3c562bd3781fc2a62c9e6c4fd592 Mon Sep 17 00:00:00 2001 From: takahashi shun Date: Sat, 15 Nov 2025 17:05:42 +0900 Subject: [PATCH 3/3] Mark InstanceType field as deprecated with kubebuilder annotation --- ...infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml | 2 +- exp/api/v1beta2/awsmanagedmachinepool_types.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml index 712a9364e2..fbfdb0ba1e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_awsmanagedmachinepools.yaml @@ -933,7 +933,7 @@ spec: instanceType: description: |- InstanceType specifies the AWS instance type. - This field is deprecated. Use InstanceTypes instead. + Deprecated: Use InstanceTypes instead. type: string instanceTypes: description: |- diff --git a/exp/api/v1beta2/awsmanagedmachinepool_types.go b/exp/api/v1beta2/awsmanagedmachinepool_types.go index ed69b54359..68b9bad201 100644 --- a/exp/api/v1beta2/awsmanagedmachinepool_types.go +++ b/exp/api/v1beta2/awsmanagedmachinepool_types.go @@ -177,8 +177,9 @@ type AWSManagedMachinePoolSpec struct { DiskSize *int32 `json:"diskSize,omitempty"` // InstanceType specifies the AWS instance type. - // This field is deprecated. Use InstanceTypes instead. + // Deprecated: Use InstanceTypes instead. // +optional + // +kubebuilder:validation:Deprecated InstanceType *string `json:"instanceType,omitempty"` // InstanceTypes specifies a list of AWS instance types for the node group.