-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat!: autoscaler with scaling schedules #139
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening this extensive PR @d-costa it looks really well on first sight - allow me to review it as soon as possible together again with the other PR (which I already reviewed but just need to merge). End of year was really hectic for me unfortunately! |
No problem at all! And happy new year 😄 |
hey @bschaatsbergen , how are you? We are currently using a local version of this but we would love to point all the way to your upstream :) |
Hi @dgteixeira, thanks for getting in touch. Now that the repository has been transferred to the runatlantis organization, and you, @d-costa, @DanielRieske, and @cblkwell are maintainers of this repository, I encourage you to collaborate on addressing these PRs together :) |
This one looks good to me if we can resolve the conflicts -- once that is done I don't think I'll have a problem signing off. |
Hrm. What's up with the ci? :/ |
c03e6c8
to
69bf12c
Compare
3a04ef4
to
d37e3c9
Compare
Add the ability to use an autoscaler to scale down to zero outside the defined schedules. Only non-stateful MIGs can be used with autoscalers, so this commit also removes the responsibility of creating the home folder disk (atlantis-disk-0) from the MIG, effectively making it a stateless MIG. Nonetheless, destroying the group will not destroy the disk. Add resources for the disk and the autoscaler, and a usage example. Update the README. BREAKING CHANGE: the 50GB stateful disk is no longer created by the mig, which makes the mig no longer stateful. Additionally, if terraform destroy is executed, the disk is destroyed. Signed-off-by: David Costa <[email protected]>
what
BREAKING CHANGE: the 50GB stateful disk is no longer created by the MIG, which makes the MIG no longer stateful. Additionally, if
terraform destroy
is executed, the disk is destroyed.why
Notes:
atlantis plan
andapply
will fix the drift.atlantis apply
as usual.Sidenote: We also tried to implement an on-demand scale up (to deploy an instance outside the schedules) using Monitoring metrics based on the load balancer, which is technically possible, but we were unsuccessful. While the group indeed scales from
0
to1
when requests arrive, it never scales back down: in the absence of requests, the metric will keep the last value. For reference, we tried the following:references
google_compute_autoscaler
resource: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_autoscaler#nested_scaling_schedules