util: add common logging to csi-addons gRPC

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-12-21 18:55:13 +01:00 committed by mergify[bot]
parent bb5d3b7257
commit 8eaf1abbdc

View File

@ -25,6 +25,7 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
csicommon "github.com/ceph/ceph-csi/internal/csi-common"
"github.com/ceph/ceph-csi/internal/util/log" "github.com/ceph/ceph-csi/internal/util/log"
) )
@ -86,7 +87,7 @@ func (cas *CSIAddonsServer) RegisterService(svc CSIAddonsService) {
// returned. // returned.
func (cas *CSIAddonsServer) Start() error { func (cas *CSIAddonsServer) Start() error {
// create the gRPC server and register services // create the gRPC server and register services
cas.server = grpc.NewServer() cas.server = grpc.NewServer(csicommon.NewMiddlewareServerOption(false))
for _, svc := range cas.services { for _, svc := range cas.services {
svc.RegisterService(cas.server) svc.RegisterService(cas.server)