Skip to content

Commit

Permalink
Merge pull request #149 from apelisse/fix-gvk-initialization
Browse files Browse the repository at this point in the history
Fix kubernetes gvk initialization order
  • Loading branch information
Phillip Wittrock committed Sep 16, 2017
2 parents b8da02a + 8557167 commit 1f2cd2a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/cmd/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ func (o *ServerOptions) RunServer(stopCh <-chan struct{}, title, version string)
return err
}

config.GenericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(GetOpenApiDefinition, builders.Scheme)
config.GenericConfig.OpenAPIConfig.Info.Title = title
config.GenericConfig.OpenAPIConfig.Info.Version = version

if o.PrintBearerToken {
glog.Infof("Serving on loopback...")
glog.Infof("\n\n********************************\nTo test the server run:\n"+
Expand All @@ -205,7 +201,13 @@ func (o *ServerOptions) RunServer(stopCh <-chan struct{}, title, version string)
config.AddApi(provider)
}

server, err := config.Init().Complete().New()
config.Init()

config.GenericConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(GetOpenApiDefinition, builders.Scheme)
config.GenericConfig.OpenAPIConfig.Info.Title = title
config.GenericConfig.OpenAPIConfig.Info.Version = version

server, err := config.Complete().New()
if err != nil {
return err
}
Expand Down

0 comments on commit 1f2cd2a

Please sign in to comment.