-
Notifications
You must be signed in to change notification settings - Fork 239
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
feat: add NodeRegistrationHealthy status condition to nodepool #1969
base: main
Are you sure you want to change the base?
feat: add NodeRegistrationHealthy status condition to nodepool #1969
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jigisha620 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @jigisha620. 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-sigs/prow repository. |
Pull Request Test Coverage Report for Build 13553912339Details
💛 - Coveralls |
d060e31
to
659e4dd
Compare
03a7d60
to
3fd43cf
Compare
// If the nodeClaim failed to launch/register during the TTL set NodeRegistrationHealthy status condition on | ||
// NodePool to False. If the launch failed get the launch failure reason and message from nodeClaim. | ||
if nodeClaim.StatusConditions().IsTrue(v1.ConditionTypeLaunched) { | ||
nodePool.StatusConditions().SetFalse(v1.ConditionTypeNodeRegistrationHealthy, "Unhealthy", "Failed to register node") |
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.
I think the reason is RegistrationFailed
. I'm also not sure if instead of that message we should try and make recommendations of things to double check.
3fd43cf
to
d202c66
Compare
5df485a
to
67ea6d0
Compare
bc920ec
to
7f356d4
Compare
7f356d4
to
a9d685a
Compare
a9d685a
to
810ad69
Compare
} | ||
|
||
func (c *Controller) Reconcile(ctx context.Context, nodePool *v1.NodePool) (reconcile.Result, error) { | ||
ctx = injection.WithControllerName(ctx, "nodepool.registrationhealth") |
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.
Should we check whether the NodePool is managed in this Reconcile to match our Predicate or are you wanting to handle that in the GetNodeClass() call
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.
I wanted to handle that in the the GetNodeClass() call. That should do this for us.
Expect(nodePool.StatusConditions().Get(v1.ConditionTypeNodeRegistrationHealthy).IsUnknown()).To(BeTrue()) | ||
Expect(nodePool.Status.NodeClassObservedGeneration).To(Equal(int64(1))) | ||
}) | ||
It("should not set NodeRegistrationHealthy status condition on nodePool as Unknown if it is already set to true", func() { |
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.
Not sure that I get this test -- why would we set the status condition to Unknown here -- all of the generation details match so I don't see our controller doing anything
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.
Wasn't that what you meant here?
Can we have a check for making sure that we don't override with Unknown in the case that we have already set the value to True or False and everything already matches
810ad69
to
30a813f
Compare
30a813f
to
deab154
Compare
Fixes #N/A
Description
This PR adds
NodeRegistrationHealthy
status condition to nodePool which indicates if a misconfiguration exists that is preventing successful node launch/registrations that requires manual investigation.How was this change tested?
Added tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.