mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-28 02:37:11 +00:00
nfd-client: don't use deprecated grpc.WithInsecure()
Replace deprecated grpc.WithInsecure() with grpc.WithTransportCredentials and insecure.NewCredentials(). Makes golangci-lint pass muster. enter the commit message for your changes. Lines starting
This commit is contained in:
parent
c09225f75c
commit
ffa35427cd
1 changed files with 2 additions and 1 deletions
|
@ -26,6 +26,7 @@ import (
|
|||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"sigs.k8s.io/node-feature-discovery/pkg/utils"
|
||||
|
@ -121,7 +122,7 @@ func (w *NfdBaseClient) Connect() error {
|
|||
}
|
||||
dialOpts = append(dialOpts, grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)))
|
||||
} else {
|
||||
dialOpts = append(dialOpts, grpc.WithInsecure())
|
||||
dialOpts = append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
}
|
||||
klog.Infof("connecting to nfd-master at %s ...", w.args.Server)
|
||||
conn, err := grpc.DialContext(dialCtx, w.args.Server, dialOpts...)
|
||||
|
|
Loading…
Add table
Reference in a new issue