mirror of
https://github.com/rancher/steve.git
synced 2025-09-06 18:01:04 +00:00
Implement /ext in Steve for Imperative API (#287)
This implements the Imperative API that is served at /ext with Steve. The imperative API is compatible with Kubernetes' API server and will be used as an extension API server.
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
func New(cfg *rest.Config, sf schema.Factory, authMiddleware auth.Middleware, next http.Handler,
|
||||
routerFunc router.RouterFunc) (*apiserver.Server, http.Handler, error) {
|
||||
routerFunc router.RouterFunc, extensionAPIServer http.Handler) (*apiserver.Server, http.Handler, error) {
|
||||
var (
|
||||
proxy http.Handler
|
||||
err error
|
||||
@@ -46,6 +46,9 @@ func New(cfg *rest.Config, sf schema.Factory, authMiddleware auth.Middleware, ne
|
||||
K8sProxy: w(proxy),
|
||||
APIRoot: w(a.apiHandler(apiRoot)),
|
||||
}
|
||||
if extensionAPIServer != nil {
|
||||
handlers.ExtensionAPIServer = w(extensionAPIServer)
|
||||
}
|
||||
if routerFunc == nil {
|
||||
return a.server, router.Routes(handlers), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user