Merge pull request #65057 from sttts/sttts-apiexitensions-coreapi

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiextensions: enable CoreAPI options needed for admission

Admission webhooks need the client and the shared informers for kube resources. The comment is invalid and we have to enable the CoreAPI options.

This PR is important to run apiextensions-apiserver in a standalone integration test setup.
pull/8/head
Kubernetes Submit Queue 2018-06-24 22:17:15 -07:00 committed by GitHub
commit f01eaef77f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -51,9 +51,6 @@ func NewCustomResourceDefinitionsServerOptions(out, errOut io.Writer) *CustomRes
StdErr: errOut,
}
// the shared informer is not needed for apiextentions apiserver. Disable the kubeconfig flag and the client creation.
o.RecommendedOptions.CoreAPI = nil
return o
}

View File

@ -47,6 +47,7 @@ func DefaultServerConfig() (*extensionsapiserver.Config, error) {
options.RecommendedOptions.Authentication = nil // disable
options.RecommendedOptions.Authorization = nil // disable
options.RecommendedOptions.Admission = nil // disable
options.RecommendedOptions.CoreAPI = nil // disable
options.RecommendedOptions.SecureServing.BindAddress = net.ParseIP("127.0.0.1")
options.RecommendedOptions.SecureServing.Listener = listener
etcdURL, ok := os.LookupEnv("KUBE_INTEGRATION_ETCD_URL")