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
Fix /readyz to contain informer-sync #93670
Fix /readyz to contain informer-sync #93670
Conversation
24c2f93
to
ad4d5ac
Compare
ad4d5ac
to
0fa521d
Compare
0fa521d
to
bb7c89e
Compare
/lgtm |
/hold For @liggitt to take a look |
bb7c89e
to
e0e1129
Compare
/retest |
/retest |
) | ||
|
||
var ( | ||
expectedHealthzVerbose = `[+]ping ok |
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.
these are pretty fragile to apiserver configuration... for example, rbac might not be present in some clusters. also, other configurations (like KMS-based encryption add checks). exact matches based on presubmit API server config aren't likely to work well in general. maybe partition these to required and optional things, and tolerate absence of optional items?
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.
Please let me know what checks should be removed from required ones.
var _ = SIGDescribe("health handlers", func() { | ||
f := framework.NewDefaultFramework("health") | ||
|
||
ginkgo.It("/healthz should contain all checks", 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.
three distinct tests seems like overkill... maybe one with three calls it verifies? remember there is per test overhead like namespace creation, etc
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.
Done.
e0e1129
to
db61c52
Compare
"[+]poststarthook/start-apiextensions-controllers ok", | ||
"[+]poststarthook/crd-informer-synced ok", | ||
"[+]poststarthook/bootstrap-controller ok", | ||
"[+]poststarthook/rbac/bootstrap-roles ok", |
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.
rbac is optional, depending on whether the RBAC authorizer is enabled
"[+]poststarthook/rbac/bootstrap-roles ok", | ||
"[+]poststarthook/scheduling/bootstrap-system-priority-classes ok", | ||
"[+]poststarthook/start-cluster-authentication-info-controller ok", | ||
"[+]poststarthook/aggregator-reload-proxy-client-cert ok", |
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.
this is optional based on API server flags
for _, check := range requiredChecks { | ||
if !checks.Has(check) { | ||
return fmt.Errorf("required %s check: %s not present: %s", path, check, string(body)) | ||
} | ||
} |
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.
nit: testing if sets.NewString(requiredChecks...).Difference(checks)
is non-empty and logging all missing required checks avoids iterating on CI adding a single string each time
db61c52
to
5b4ab8f
Compare
@liggitt - thanks! PTAL |
/retest |
/lgtm |
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, wojtek-t 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 |
/retest |
/assign @logicalhan |
/retest |
Ref #93599
/kind bug