Skip to content
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

Add node watcher functionality and test case #3

Merged
merged 11 commits into from
Feb 27, 2025
Merged

Conversation

hlts2
Copy link
Member

@hlts2 hlts2 commented Feb 27, 2025

This PR includes the implementation of a watcher that periodically checks the status of nodes in a Kubernetes cluster, specifically focusing on the availability of GPUs and the readiness of the nodes.

The watcher works as follows:

it fetches the list of nodes that match the specified selector.
It then checks if the node meets the desired GPU count and whether the node is in a ready state. If either condition is not met, the node is considered unready.
If a node is found to be unready or doesn't have the expected GPU count, the watcher attempts to reboot the node by invoking a reboot on the corresponding instance in Civo.
This functionality ensures that nodes are automatically monitored and rebooted if necessary to meet the specified conditions, maintaining optimal performance and readiness.

⚠️ It also includes the necessary test cases to validate the functionality. I am currently checking the GPU part, so some corrections might be made later, but the implementation and tests are complete for now.

@hlts2 hlts2 marked this pull request as ready for review February 27, 2025 17:35
@hlts2 hlts2 requested a review from jokestax February 27, 2025 19:23
@hlts2
Copy link
Member Author

hlts2 commented Feb 27, 2025

@jokestax @johndietz

Thank you for your review! I will merge this PR 👍

@hlts2 hlts2 merged commit f700a3c into main Feb 27, 2025
1 check passed
@hlts2 hlts2 deleted the fix/add-test-case branch February 27, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants