-
Notifications
You must be signed in to change notification settings - Fork 96
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 conditions.DaemonSetReady #344
Add conditions.DaemonSetReady #344
Conversation
Welcome @cartermckinnon! |
Hi @cartermckinnon. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Thanks for the contribution.
@@ -303,3 +303,17 @@ func (c *Condition) DeploymentAvailable(name, namespace string) apimachinerywait | |||
v1.ConditionTrue, | |||
) | |||
} | |||
|
|||
// DaemonSetReady is a helper function used to check if a daemonset's pods are scheduled and ready | |||
func (c *Condition) DaemonSetReady(daemonset k8s.Object) apimachinerywait.ConditionWithContextFunc { |
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.
@cartermckinnon ... based on the description in comment, should name be DeamonSetPodReady
? Are there other conditions that can be checked for a ready status for DaemonSet
?
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.
The DaemonSet.Status
does have Conditions
in the API types, but AFAICT, it's unimplemented, the DaemonSet controller doesn't populate it.
- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#daemonsetcondition-v1-apps
- https://github.com/search?q=repo%3Akubernetes%2Fkubernetes%20DaemonSetCondition&type=code
I don't feel too strongly about the name, SGTM if you think that's clearer.
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.
@cartermckinnon when I looked, i came with same conclusion that conditions not populated... so let's keep name you have. Plus, as long as it's documented, SGTM.
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.
/lgtm
@harshanarayana or @cpanato PTAL |
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.
/lgtm
/approve
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cartermckinnon, harshanarayana, vladimirvivien 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 |
/test pull-e2e-framework-test |
/ok-to-test |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds a
conditions
helper for aDaemonSet
that asserts its pods are scheduled and ready.Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., Usage docs, etc.: