K8s: Make GetAPIRoutes an optional interface (#97531)
This commit is contained in:
@@ -3,6 +3,7 @@ package userstorage
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -13,8 +14,6 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
userstorage "github.com/grafana/grafana/pkg/apis/userstorage/v0alpha1"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/builder"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
)
|
||||
@@ -78,10 +77,6 @@ func (b *UserStorageAPIBuilder) GetOpenAPIDefinitions() common.GetOpenAPIDefinit
|
||||
return userstorage.GetOpenAPIDefinitions
|
||||
}
|
||||
|
||||
func (b *UserStorageAPIBuilder) GetAPIRoutes() *builder.APIRoutes {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *UserStorageAPIBuilder) GetAuthorizer() authorizer.Authorizer {
|
||||
return authorizer.AuthorizerFunc(
|
||||
func(ctx context.Context, attr authorizer.Attributes) (authorized authorizer.Decision, reason string, err error) {
|
||||
|
||||
Reference in New Issue
Block a user