1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-09 11:19:12 +00:00

Add fields to cluster

This commit is contained in:
Darren Shepherd
2020-06-05 20:45:26 -07:00
parent 0849182bdd
commit 2eb87bffc1
4 changed files with 171 additions and 55 deletions

View File

@@ -20,14 +20,15 @@ import (
"k8s.io/client-go/discovery"
)
func DefaultSchemas(ctx context.Context, baseSchema *types.APISchemas, ccache clustercache.ClusterCache, cg proxy.ClientGetter) *types.APISchemas {
func DefaultSchemas(ctx context.Context, baseSchema *types.APISchemas, ccache clustercache.ClusterCache, cg proxy.ClientGetter) (*types.APISchemas, error) {
counts.Register(baseSchema, ccache)
subscribe.Register(baseSchema)
apiroot.Register(baseSchema, []string{"v1"}, []string{"proxy:/apis"})
userpreferences.Register(baseSchema, cg)
clusters.Register(ctx, baseSchema, cg, ccache)
helm.Register(baseSchema)
return baseSchema
err := clusters.Register(ctx, baseSchema, cg, ccache)
return baseSchema, err
}
func DefaultSchemaTemplates(cf *client.Factory, lookup accesscontrol.AccessSetLookup, discovery discovery.DiscoveryInterface) []schema.Template {