Merge pull request #45804 from nilebox/nilebox/apiextensions-delegate-handler

Automatic merge from submit-queue

kube-apiextensions-server: Fix potential SEGV with null delegate handler

**What this PR does / why we need it**:
In the kube-apiextensions-server there is a fallback value for `null` delegate to `http.NotFoundHandler()` in handling group and versions discovery, but no fallback for custom resources endpoint.
It leads to SEGV when running with `genericapiserver.EmptyDelegate`.
This commit is contained in:
Kubernetes Submit Queue 2017-05-15 06:20:45 -07:00 committed by GitHub
commit 5a1ec9bf6f

View File

@ -145,7 +145,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget)
groupDiscoveryHandler,
s.GenericAPIServer.RequestContextMapper(),
customResourceInformers.Apiextensions().InternalVersion().CustomResources().Lister(),
delegationTarget.UnprotectedHandler(),
delegateHandler,
c.CustomResourceRESTOptionsGetter,
c.GenericConfig.AdmissionControl,
)