-
Notifications
You must be signed in to change notification settings - Fork 33
Automation to validate Autoscaling of Nodes on IPI cluster. #125
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
base: main
Are you sure you want to change the base?
Automation to validate Autoscaling of Nodes on IPI cluster. #125
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: prajwal-gawande492 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fb1ae5d to
78d39a1
Compare
| delayAfterAdd: 10m | ||
| delayAfterDelete: 5m | ||
| delayAfterFailure: 30s | ||
| delayAfterFailure: 30s |
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.
Duplicate Line
| delayAfterFailure: 30s |
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.
Resolved
|
|
||
| - name: Wait for terminating the busybox pods | ||
| wait_for: | ||
| timeout: 180 |
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.
Can we use loop until conditions are met (until: with retries and delay) instead of fixed waits.
Look for other places also!
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.
Added a loop until condition.
| - name: Create a namespace and label it to deploy busybox | ||
| kubernetes.core.k8s: | ||
| name: test | ||
| api_version: v1 | ||
| kind: Namespace | ||
| state: present |
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.
We can add cleanup for 'test' namespace at the end of the play to avoid leftover resources.
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.
Done.
| block: | ||
| - name: Check the machine count before autoscaling | ||
| shell: oc get machineset -n openshift-machine-api -o=jsonpath='{.items[0].status.replicas}' | ||
| register: machine_replicas |
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.
| register: machine_replicas | |
| register: initial_machine_count |
We can have self-explanatory and clearer variable names
machine_replicas -> initial_machine_count
machines_count -> post_scaleup_machine_count
machineset_replicas -> pre_scaledown_machine_count
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.
Resolved.
Signed-off-by: prajwal-gawande492 <[email protected]>
78d39a1 to
07c9ac6
Compare
|
/lgtm |
No description provided.