mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #113634 from liggitt/duplicate-admission
Stop creating three copies of admission plugins
This commit is contained in:
commit
5d06c6a92d
@ -77,18 +77,6 @@ func createAggregatorConfig(
|
||||
genericConfig.BuildHandlerChainFunc = genericapiserver.BuildHandlerChainWithStorageVersionPrecondition
|
||||
}
|
||||
|
||||
// override genericConfig.AdmissionControl with kube-aggregator's scheme,
|
||||
// because aggregator apiserver should use its own scheme to convert its own resources.
|
||||
err := commandOptions.Admission.ApplyTo(
|
||||
&genericConfig,
|
||||
externalInformers,
|
||||
genericConfig.LoopbackClientConfig,
|
||||
utilfeature.DefaultFeatureGate,
|
||||
pluginInitializers...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// copy the etcd options so we don't mutate originals.
|
||||
// we assume that the etcd options have been completed already. avoid messing with anything outside
|
||||
// of changes to StorageConfig as that may lead to unexpected behavior when the options are applied.
|
||||
|
@ -50,18 +50,6 @@ func createAPIExtensionsConfig(
|
||||
genericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{}
|
||||
genericConfig.RESTOptionsGetter = nil
|
||||
|
||||
// override genericConfig.AdmissionControl with apiextensions' scheme,
|
||||
// because apiextensions apiserver should use its own scheme to convert resources.
|
||||
err := commandOptions.Admission.ApplyTo(
|
||||
&genericConfig,
|
||||
externalInformers,
|
||||
genericConfig.LoopbackClientConfig,
|
||||
utilfeature.DefaultFeatureGate,
|
||||
pluginInitializers...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// copy the etcd options so we don't mutate originals.
|
||||
// we assume that the etcd options have been completed already. avoid messing with anything outside
|
||||
// of changes to StorageConfig as that may lead to unexpected behavior when the options are applied.
|
||||
|
Loading…
Reference in New Issue
Block a user