1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-01 15:37:31 +00:00

Add apigroups

This commit is contained in:
Darren Shepherd
2019-08-14 13:13:26 -07:00
parent de50acc048
commit 59a6ee577e
3 changed files with 77 additions and 2 deletions

View File

@@ -2,20 +2,23 @@ package resources
import (
"github.com/rancher/naok/pkg/accesscontrol"
"github.com/rancher/naok/pkg/resources/apigroups"
"github.com/rancher/naok/pkg/resources/common"
"github.com/rancher/naok/pkg/resources/counts"
"github.com/rancher/naok/pkg/resources/schema"
"github.com/rancher/norman/pkg/store/proxy"
"github.com/rancher/norman/pkg/subscribe"
"github.com/rancher/norman/pkg/types"
"k8s.io/client-go/kubernetes"
)
func SchemaFactory(getter proxy.ClientGetter, as *accesscontrol.AccessStore) *schema.Collection {
func SchemaFactory(getter proxy.ClientGetter, as *accesscontrol.AccessStore, k8s kubernetes.Interface) *schema.Collection {
baseSchema := types.EmptySchemas()
collection := schema.NewCollection(baseSchema, as)
counts.Register(baseSchema)
subscribe.Register(baseSchema)
apigroups.Register(baseSchema, k8s.Discovery())
common.Register(collection, getter)