-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(util): add Readiness utility for checking resource readiness status #4539
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: master
Are you sure you want to change the base?
feat(util): add Readiness utility for checking resource readiness status #4539
Conversation
Add a utility class that provides fabric8-style readiness checking for Kubernetes resources. Includes support for: - Pods, Deployments, StatefulSets, ReplicaSets, DaemonSets - Jobs, Nodes, ReplicationControllers - PersistentVolumeClaims, Endpoints, Services The generic isReady() method automatically delegates to the appropriate type-specific method based on the resource type. Also adds comprehensive unit tests covering all readiness checks.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| Integer readyReplicas = status.getReadyReplicas(); | ||
|
|
||
| if (replicas == null) { | ||
| replicas = 1; |
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.
hmm does this defaulting make sense? if it's only for null panic prevention. how about we reverse L246 to:
readyReplicas.equals(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.
Changed to return false.
yue9944882
left a comment
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.
one question, otherwise LGTM
|
Comment addressed, please take another look. |
Add a utility class that provides fabric8-style readiness checking for Kubernetes resources. Includes support for:
The generic isReady() method automatically delegates to the appropriate type-specific method based on the resource type.
Also adds comprehensive unit tests covering all readiness checks.