mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
refactor names for the apiserver handling chain
This commit is contained in:
@@ -206,21 +206,21 @@ func (c *Config) SkipComplete() completedConfig {
|
||||
// Certain config fields will be set to a default value if unset.
|
||||
// Certain config fields must be specified, including:
|
||||
// KubeletClientConfig
|
||||
func (c completedConfig) New() (*Master, error) {
|
||||
func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) (*Master, error) {
|
||||
if reflect.DeepEqual(c.KubeletClientConfig, kubeletclient.KubeletClientConfig{}) {
|
||||
return nil, fmt.Errorf("Master.New() called with empty config.KubeletClientConfig")
|
||||
}
|
||||
|
||||
s, err := c.Config.GenericConfig.SkipComplete().New() // completion is done in Complete, no need for a second time
|
||||
s, err := c.Config.GenericConfig.SkipComplete().New(delegationTarget) // completion is done in Complete, no need for a second time
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if c.EnableUISupport {
|
||||
routes.UIRedirect{}.Install(s.FallThroughHandler)
|
||||
routes.UIRedirect{}.Install(s.Handler.PostGoRestfulMux)
|
||||
}
|
||||
if c.EnableLogsSupport {
|
||||
routes.Logs{}.Install(s.HandlerContainer)
|
||||
routes.Logs{}.Install(s.Handler.GoRestfulContainer)
|
||||
}
|
||||
|
||||
m := &Master{
|
||||
|
||||
Reference in New Issue
Block a user