Configuration manager for dynamic admission control registration#46302
Conversation
e6dd1de to
756cb83
Compare
756cb83 to
2728953
Compare
There was a problem hiding this comment.
Can't I just do wait.Poll instead of using this?
There was a problem hiding this comment.
I think I understand now.
There was a problem hiding this comment.
failureThreshold int
(don't use uint just because it shouldn't be negative)
There was a problem hiding this comment.
please check ready inside the lock or there is a race
There was a problem hiding this comment.
I think setting in this order is probably OK but if you lock around both of them then it is obvious that there is not a problem.
There was a problem hiding this comment.
delete this function, it is not used outside this object and easy to cause a race when calling it.
There was a problem hiding this comment.
consistentReadPoller, maybe?
There was a problem hiding this comment.
Or just poller. It's a consistent poller only if the get is consistent.
There was a problem hiding this comment.
The later if m.invoked <= 1+m.failures+m.successes block returns.
2728953 to
485ffae
Compare
|
Comments addressed. PTAL. Thanks. |
There was a problem hiding this comment.
defaultInterval, defaultFailureTheshold
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: caesarxuchao, lavalamp DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
485ffae to
36a8b99
Compare
|
/release-note-none |
|
@caesarxuchao: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. I understand the commands that are listed here. |
36a8b99 to
dce3f69
Compare
|
Automatic merge from submit-queue |
|
This is flaking in other PRs: |
|
@caesarxuchao ^^^^^ |
|
It's a test issue. I'll fix the test. |
|
Sent #46648. |
|
|
||
| var _ InitializerConfigurationLister = &mockLister{} | ||
|
|
||
| func TestConfiguration(t *testing.T) { |
There was a problem hiding this comment.
this test is flaking (see https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/46709/pull-kubernetes-unit/33781/)
Implementing this section of kubernetes/community#611
Adding a configuration manager that reads the ExternalAdmissionHookConfigurations and InitializerConfigurations periodically, and returns the merged configuration.
cc @smarterclayton @whitlockjc