terraform-provider-tanzu-mission-control icon indicating copy to clipboard operation
terraform-provider-tanzu-mission-control copied to clipboard

Support autoscaling

Open hxietkg opened this issue 6 months ago • 3 comments

Add a new block nodepool.spec.auto_scaling, which contains enabled, min_count and max_count to enable/disable the autoscaling on a nodepool.

  1. What this PR does / why we need it: TKGS supports auto-scaling from 80u3 (tkg-service 3.0.0), this MR is to expose the feature in terraform cli. To support this feature from TMC side, a new member in nodepool's spec was added, it contains: enabled: true or false to enable/disable auto-scaling on a nodepool min_count: minimum number of nodes during auto-scaling max_count: maximum number of nodes during auto-scaling

test done:

    1. create a nodepool with {enabled: true, min_count:1, max_count:2}, to verify the nodepool being created successfully,
    1. change a nodepool from {enabled: true, min_count:1, max_count:2} to {enabled: false, min_count:0, max_count:0}, to verify auto-scaling being disabled successfully.
    1. change a nodepool from {enabled: false, min_count:0, max_count:0} to {enabled: true, min_count:1, max_count:2}, to verify auto-scaling being enabled successfully.
    1. change a nodepool from {enabled: true, min_count:1, max_count:2} to {enabled: true, min_count:2, max_count:3}, to verify the change applied to cluster nodepool.
  1. Which issue(s) this PR fixes

  2. Additional information

  3. Special notes for your reviewer

hxietkg avatar Aug 24 '24 04:08 hxietkg