(aws-eks): Modifying instance-types on managed-node-group shouldn't roll the whole node-group.
Describe the feature
As instance-types are added or removed from a managed node group then I would like just the underlying auto-scaling-group to update to reflect the change.
Use Case
The idea is that when I modify the list of instance-types in the node-group (adding or deleting one in the list), then the whole node group should not roll. Depending on the size of the cluster this can take quite some time to complete.
The instances-types are mapped to an auto-scaling-group. Would be nice on cloudformation deploy that just this resource was updated.
Proposed Solution
const launchTemplate = new LaunchTemplate(this, 'lt');
this.cluster.addNodegroupCapacity('node-group-xyz', {
launchTemplateSpec: {
id: launchTemplate.launchTemplateId!,
version: launchTemplate.latestVersionNumber,
},
capacityType: CapacityType.SPOT,
instanceTypes: [
new InstanceType('c5a.8xlarge'),
new InstanceType('c5ad.8xlarge'),
new InstanceType('c6a.8xlarge'),
new InstanceType('c5.9xlarge'),
new InstanceType('c5d.9xlarge'),
],
});
if i added new InstanceType('c5n.9xlarge'), to the list then i would like just the autoscaler to reflect this change without the whole node group rolling.
Other Information
This may be similar to https://github.com/aws/aws-cdk/issues/18478
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
CDK version used
2.24.1
Environment details (OS name and version, etc.)
amazon-linux-2
What do you mean by "rolling the whole nodegroup"? Is it terminating each instance after creating a new one? This sounds like a default behavior of ASG with LaunchTemple with mix instance types.