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

✨ Support addon health probe for checking workload availability #275

Conversation

zhujian7
Copy link
Member

@zhujian7 zhujian7 commented Jun 13, 2024

Summary

Add a new health check probe type WorkloadAvailability to check if all deployments and daemonsets are available.

Related issue(s)

open-cluster-management-io/ocm#368

Fixes #

pkg/utils/probe_helper.go Outdated Show resolved Hide resolved
@zhujian7 zhujian7 force-pushed the daemonset-health-check branch 3 times, most recently from 55c2594 to 5093771 Compare June 13, 2024 15:14
@zhujian7
Copy link
Member Author

/hold

@zhujian7 zhujian7 force-pushed the daemonset-health-check branch 2 times, most recently from 96a3a24 to 3a43edd Compare June 14, 2024 01:15
@zhujian7
Copy link
Member Author

/cc @qiujian16
/unhold

@zhujian7
Copy link
Member Author

/cc @zhiweiyin318

return nil
}
case "daemonsets":
if readyReplicas == desiredNumberReplicas && readyReplicas > -1 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiujian16 @zhiweiyin318 Do you think this is reasonable for daemonsets?

Copy link
Member Author

@zhujian7 zhujian7 Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a cluster has no nodes, when deploying a daemonset, it will be like:

╰─$ oc get ds nginx-deployment
NAME               DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
nginx-deployment   0         0         0       0            0           <none>          18s

should we treat it as health or not?
as the current implementation, because the readyReplicas(0) == desiredNumberReplicas(0), it is health.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be healthy in this case.

Signed-off-by: zhujian <jiazhu@redhat.com>
@qiujian16
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Jun 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, zhujian7

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhujian7
Copy link
Member Author

/hold

@zhiweiyin318
Copy link
Member

/lgtm

@zhujian7
Copy link
Member Author

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit 660e21b into open-cluster-management-io:main Jun 17, 2024
15 checks passed
zhiweiyin318 pushed a commit to zhiweiyin318/addon-framework that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants