Skip to content

Conversation

@brendandburns
Copy link
Contributor

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.

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.
@k8s-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 21, 2026
Integer readyReplicas = status.getReadyReplicas();

if (replicas == null) {
replicas = 1;
Copy link
Member

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);

Copy link
Member

@yue9944882 yue9944882 left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants