Add dashboard to steve

This commit is contained in:
Darren Shepherd
2020-02-21 22:18:58 -07:00
parent c069f32bbe
commit 82c7877ba3
11 changed files with 478 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/rancher/steve/pkg/client"
"github.com/rancher/steve/pkg/clustercache"
schemacontroller "github.com/rancher/steve/pkg/controllers/schema"
"github.com/rancher/steve/pkg/dashboard"
"github.com/rancher/steve/pkg/schema"
"github.com/rancher/steve/pkg/schemaserver/types"
"github.com/rancher/steve/pkg/server/handler"
@@ -87,6 +88,10 @@ func setup(ctx context.Context, server *Server) (http.Handler, *schema.Collectio
return sync()
})
if server.DashboardURL != nil && server.DashboardURL() != "" {
handler = dashboard.Route(handler, server.DashboardURL)
}
return handler, sf, nil
}