-
Notifications
You must be signed in to change notification settings - Fork 289
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
Improve cluster autoscaler e2e test #7965
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7965 +/- ##
=======================================
Coverage 73.42% 73.42%
=======================================
Files 577 577
Lines 35821 35821
=======================================
Hits 26302 26302
Misses 7854 7854
Partials 1665 1665 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pokearu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-0.19 |
@sp1999: #7965 failed to apply on top of branch "release-0.19":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of changes:
Currently, cluster autoscaler test creates a busybox deployment with HPA to simulate load to trigger autoscaling.
The problem with this approach is that we expect HPA to scale up the pods to a point where they are un-schedulable which should cause autoscaler to scale up the worker nodes, but there's no guarantee that it'll do that. Plus, HPA can take time to scale the pods as well.
So instead, we replace the uncertainty with HPA and just try to schedule 111 pods which is over the limit of number of pods supported per Kubernetes node. This will ensure that there's atleast 1 pod that's un-schedulable and cause the autoscaler to scale up the MD.
There is a bug in cluster autoscaler currently where it's not able to autoscale the cluster initially because of missing permissions on infrastructure machine template. Cluster Autoscaler does restart after ~10 min after which it starts functioning normally.
Instead of waiting for ~10 min, we'll also force triggering a restart so the e2e doesn't have to wait.
This can be removed once the following issue is resolve upstream kubernetes/autoscaler#6490
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.