refactor names for the apiserver handling chain

This commit is contained in:
deads2k
2017-05-04 14:18:38 -04:00
parent 3a81a86034
commit 4389f71576
26 changed files with 230 additions and 285 deletions

View File

@@ -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{