From f273874f266290a985def430abe056a8e9d3f70e Mon Sep 17 00:00:00 2001 From: malc0lm Date: Wed, 13 Jun 2018 15:14:15 +0800 Subject: [PATCH] rbd: advertises PluginCapability_Service_CONTROLLER_SERVICE --- pkg/rbd/identityserver.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkg/rbd/identityserver.go b/pkg/rbd/identityserver.go index d410d8548..40d86f851 100644 --- a/pkg/rbd/identityserver.go +++ b/pkg/rbd/identityserver.go @@ -17,9 +17,26 @@ limitations under the License. package rbd import ( + "context" + + "github.com/container-storage-interface/spec/lib/go/csi/v0" "github.com/kubernetes-csi/drivers/pkg/csi-common" ) type identityServer struct { *csicommon.DefaultIdentityServer } + +func (is *identityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error) { + return &csi.GetPluginCapabilitiesResponse{ + Capabilities: []*csi.PluginCapability{ + { + Type: &csi.PluginCapability_Service_{ + Service: &csi.PluginCapability_Service{ + Type: csi.PluginCapability_Service_CONTROLLER_SERVICE, + }, + }, + }, + }, + }, nil +}