Skip to content

Cluster autoscaling #233

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

Merged
merged 8 commits into from
May 29, 2020
Merged

Cluster autoscaling #233

merged 8 commits into from
May 29, 2020

Conversation

coderGo93
Copy link
Contributor

Added new fields for cluster about autoscaling

  • auto_scaling_compute_enabled
  • auto_scaling_compute_scale_down_enabled
  • provider_auto_scaling_compute_min_instance_size
  • provider_auto_scaling_compute_max_instance_size

Added a testacc for cluster using autoscaling

Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

A question on validation and a few changes/fixes to docs. Thanks!!

Comment on lines 209 to 226
* `auto_scaling_compute_enabled` - (Optional) Specifies whether cluster tier auto-scaling is enabled. The default is false.
- Set to `true` to enable cluster tier auto-scaling. If enabled, you must specify a value for `providerSettings.autoScaling.compute.maxInstanceSize`.
- Set to `false` to disable cluster tier auto-scaling.
* `auto_scaling_compute_scale_down_enabled` - (Optional) Set to `true` to enable the cluster tier to scale down. This option is only available if `autoScaling.compute.enabled` is `true`.
- If this option is enabled, you must specify a value for `providerSettings.autoScaling.compute.minInstanceSize`
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need an important note in the doc that if auto_scaling_compute_enabled then Atlas will automatically scale up to the maximum provided and down to the minimum, if provided. This will cause the value of instanceSizeName returned to potential be different than what is specified in the Terraform config and if one then applies a plan, not noting this, Terraform will scale the cluster back down to the original instanceSizeName value. To prevent this a lifecycle customization should be used, i.e.:
lifecycle {
ignore_changes = instanceSizeName
}

We should also test that a lifecycle customization works as expected, thought that will be tough to auto trigger a scaling event so one could test manually by running a terraform config, change the instance size in the UI to between the autoscale values and see if the lifecycle customerization works properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I pushed with note important about lifecycle and added a similar situation,its test, thank you so much, melissa !

@coderGo93 coderGo93 requested a review from themantissa May 21, 2020 19:34
Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

Thank you so much for the quick turnaround on the last review! One more small doc adjustment. I also provided some information about how to potentially really test this add and the lifecycle changes - I hope it is helpful.

@coderGo93 coderGo93 requested a review from themantissa May 26, 2020 19:31
Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

LGTM - just needs a DoU review and we should be good!

@coderGo93 coderGo93 force-pushed the cluster-autoscaling branch from c064f58 to 8613cdc Compare May 29, 2020 17:32
Copy link
Contributor

@PacoDw PacoDw left a comment

Choose a reason for hiding this comment

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

LGTM!

@coderGo93 coderGo93 merged commit 2baee60 into master May 29, 2020
@coderGo93 coderGo93 deleted the cluster-autoscaling branch May 29, 2020 19:08
@themantissa themantissa mentioned this pull request Jun 11, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants