mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
K8s: Add example api service (#75911)
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"k8s.io/apiserver/pkg/registry/rest"
|
||||
genericapiserver "k8s.io/apiserver/pkg/server"
|
||||
common "k8s.io/kube-openapi/pkg/common"
|
||||
"k8s.io/kube-openapi/pkg/spec3"
|
||||
|
||||
grafanaapiserver "github.com/grafana/grafana/pkg/services/grafana-apiserver"
|
||||
grafanarest "github.com/grafana/grafana/pkg/services/grafana-apiserver/rest"
|
||||
@@ -36,6 +35,10 @@ func RegisterAPIService(p playlist.Service, apiregistration grafanaapiserver.API
|
||||
return builder
|
||||
}
|
||||
|
||||
func (b *PlaylistAPIBuilder) GetGroupVersion() schema.GroupVersion {
|
||||
return SchemeGroupVersion
|
||||
}
|
||||
|
||||
func (b *PlaylistAPIBuilder) InstallSchema(scheme *runtime.Scheme) error {
|
||||
err := AddToScheme(scheme)
|
||||
if err != nil {
|
||||
@@ -72,9 +75,8 @@ func (b *PlaylistAPIBuilder) GetOpenAPIDefinitions() common.GetOpenAPIDefinition
|
||||
return getOpenAPIDefinitions
|
||||
}
|
||||
|
||||
// Register additional routes with the server
|
||||
func (b *PlaylistAPIBuilder) GetOpenAPIPostProcessor() func(*spec3.OpenAPI) (*spec3.OpenAPI, error) {
|
||||
return nil
|
||||
func (b *PlaylistAPIBuilder) GetAPIRoutes() *grafanaapiserver.APIRoutes {
|
||||
return nil // no custom API routes
|
||||
}
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
|
||||
Reference in New Issue
Block a user