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
Admission plugin initializer for the generic API server. #43710
Admission plugin initializer for the generic API server. #43710
Conversation
Hi @p0lyn0mial. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with 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. |
@deads2k please take a look. |
} | ||
} | ||
|
||
extClientset, err := kubernetes.NewForConfig(cfg) |
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.
Accept the clientset and informer factory as arguments.
The informer factory should be shared. We only want a single instance or we'll end up with multiple list/watches running.
The clientset will be privileged and settings like QPS and roundtrippers should be configured externally and passed here.
I like the idea of including a loopback *rest.Config
through the initializer so that people aren't forced to create their own initializers if they don't want to.
Just the comment about the |
@k8s-bot ok to test |
|
might have to add your package to the list of linted packages too |
09b0714
to
4546b69
Compare
New method updated |
This PR implements a standard admission plugin initializer for the generic API server. The initializer accepts external clientset, external informers and the authorizer.
4546b69
to
86e06e2
Compare
@k8s-bot gci gce e2e test this |
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deads2k, p0lyn0mial
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
This looks like a good starting point. |
vendor/BUILD strikes again. approved. |
Automatic merge from submit-queue (batch tested with PRs 41541, 43710) |
What this PR does / why we need it:
This PR implements a standard admission plugin initializer for the generic API server.
The initializer uses kubeconfig to populate external clients and informers. By default
in-cluster config is used.
Special notes for your reviewer:
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/apiserver-build-in-admission-plugins.md
Release note: NONE