chore(block-scheduler): add scheduler grpc methods to auth mw ignore list (#15388)

pull/15409/head
Ashwanth 1 year ago committed by GitHub
parent 6dfe90a12d
commit b353acf6e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      pkg/blockbuilder/types/grpc_transport.go
  2. 3
      pkg/loki/loki.go

@ -6,6 +6,9 @@ import (
"github.com/grafana/dskit/grpcclient"
"github.com/grafana/dskit/instrument"
"github.com/grafana/dskit/middleware"
otgrpc "github.com/opentracing-contrib/go-grpc"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
@ -47,7 +50,16 @@ func NewGRPCTransportFromAddress(
cfg grpcclient.Config,
reg prometheus.Registerer,
) (*GRPCTransport, error) {
dialOpts, err := cfg.DialOption(grpcclient.Instrument(newGRPCTransportMetrics(reg).requestLatency))
metrics := newGRPCTransportMetrics(reg)
dialOpts, err := cfg.DialOption(
[]grpc.UnaryClientInterceptor{
otgrpc.OpenTracingClientInterceptor(opentracing.GlobalTracer()),
middleware.UnaryClientInstrumentInterceptor(metrics.requestLatency),
}, []grpc.StreamClientInterceptor{
otgrpc.OpenTracingStreamClientInterceptor(opentracing.GlobalTracer()),
middleware.StreamClientInstrumentInterceptor(metrics.requestLatency),
},
)
if err != nil {
return nil, err
}

@ -430,6 +430,9 @@ func (t *Loki) setupAuthMiddleware() {
"/schedulerpb.SchedulerForFrontend/FrontendLoop",
"/schedulerpb.SchedulerForQuerier/QuerierLoop",
"/schedulerpb.SchedulerForQuerier/NotifyQuerierShutdown",
"/blockbuilder.types.SchedulerService/GetJob",
"/blockbuilder.types.SchedulerService/CompleteJob",
"/blockbuilder.types.SchedulerService/SyncJob",
})
}

Loading…
Cancel
Save