K8s: Make GetAPIRoutes an optional interface (#97531)

This commit is contained in:
Ryan McKinley
2024-12-07 03:08:18 +03:00
committed by GitHub
parent f276f9b35d
commit 5f39d2eeb0
15 changed files with 30 additions and 77 deletions
+1 -6
View File
@@ -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) {