Skip to content

Configuration manager for dynamic admission control registration#46302

Merged
k8s-github-robot merged 2 commits intokubernetes:masterfrom
caesarxuchao:acc-configuration-manager
May 27, 2017
Merged

Configuration manager for dynamic admission control registration#46302
k8s-github-robot merged 2 commits intokubernetes:masterfrom
caesarxuchao:acc-configuration-manager

Conversation

@caesarxuchao
Copy link
Copy Markdown
Contributor

@caesarxuchao caesarxuchao commented May 23, 2017

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

@caesarxuchao caesarxuchao self-assigned this May 23, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 23, 2017
@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-label-needed labels May 23, 2017
@caesarxuchao caesarxuchao force-pushed the acc-configuration-manager branch from e6dd1de to 756cb83 Compare May 26, 2017 17:52
@caesarxuchao caesarxuchao changed the title [WIP] Configuration manager for dynamic admission control registration Configuration manager for dynamic admission control registration May 26, 2017
@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/new-api labels May 26, 2017
@caesarxuchao caesarxuchao force-pushed the acc-configuration-manager branch from 756cb83 to 2728953 Compare May 26, 2017 18:21
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't I just do wait.Poll instead of using this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I understand now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missed a name change?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

failureThreshold int

(don't use uint just because it shouldn't be negative)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please check ready inside the lock or there is a race

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete this function, it is not used outside this object and easy to cause a race when calling it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

consistentReadPoller, maybe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Or just poller. It's a consistent poller only if the get is consistent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

newConsistentReadPoller?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

return?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The later if m.invoked <= 1+m.failures+m.successes block returns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah

@caesarxuchao caesarxuchao force-pushed the acc-configuration-manager branch from 2728953 to 485ffae Compare May 26, 2017 21:05
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/new-api size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 26, 2017
@caesarxuchao
Copy link
Copy Markdown
Contributor Author

Comments addressed. PTAL. Thanks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

defaultInterval, defaultFailureTheshold

@lavalamp
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2017
@k8s-github-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, lavalamp

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. labels May 26, 2017
@caesarxuchao caesarxuchao force-pushed the acc-configuration-manager branch from 485ffae to 36a8b99 Compare May 26, 2017 22:12
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2017
@caesarxuchao caesarxuchao added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2017
@caesarxuchao
Copy link
Copy Markdown
Contributor Author

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels May 26, 2017
@caesarxuchao caesarxuchao removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label May 26, 2017
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

k8s-ci-robot commented May 26, 2017

@caesarxuchao: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-cross 27289530479b788f9d2daf5925de848d206df6b3 link @k8s-bot pull-kubernetes-cross test this

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.

Details

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. I understand the commands that are listed here.

@caesarxuchao caesarxuchao force-pushed the acc-configuration-manager branch from 36a8b99 to dce3f69 Compare May 26, 2017 23:06
@caesarxuchao caesarxuchao added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels May 26, 2017
@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 94312a0 into kubernetes:master May 27, 2017
@smarterclayton
Copy link
Copy Markdown
Contributor

This is flaking in other PRs:

k8s.io/kubernetes/pkg/kubeapiserver/admission/configuration TestConfiguration 0.03s
go test -v k8s.io/kubernetes/pkg/kubeapiserver/admission/configuration -run TestConfiguration$
initializer_manager_test.go:113: case number of failures just reaches failureThreshold, expect not ready

https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/36721/pull-kubernetes-unit/33132/

@lavalamp
Copy link
Copy Markdown
Contributor

@caesarxuchao ^^^^^

@caesarxuchao
Copy link
Copy Markdown
Contributor Author

It's a test issue. I'll fix the test.

@caesarxuchao
Copy link
Copy Markdown
Contributor Author

Sent #46648.


var _ InitializerConfigurationLister = &mockLister{}

func TestConfiguration(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sent #46648.

@caesarxuchao caesarxuchao deleted the acc-configuration-manager branch May 12, 2020 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants