Skip to content

Commit 239b094

Browse files
committed
swicth grpc deprecated method to new method
Signed-off-by: Icarus9913 <[email protected]>
1 parent 8ef28af commit 239b094

File tree

1 file changed

+4
-5
lines changed
  • cmd/routed-eni-cni-plugin

1 file changed

+4
-5
lines changed

cmd/routed-eni-cni-plugin/cni.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,23 @@ import (
2323
"strconv"
2424
"strings"
2525

26-
"github.com/aws/amazon-vpc-cni-k8s/pkg/utils/cniutils"
27-
28-
"github.com/aws/amazon-vpc-cni-k8s/pkg/sgpp"
29-
3026
"github.com/containernetworking/cni/pkg/skel"
3127
"github.com/containernetworking/cni/pkg/types"
3228
current "github.com/containernetworking/cni/pkg/types/100"
3329
cniSpecVersion "github.com/containernetworking/cni/pkg/version"
3430
"github.com/pkg/errors"
3531
"golang.org/x/net/context"
3632
"google.golang.org/grpc"
33+
"google.golang.org/grpc/credentials/insecure"
3734

3835
"github.com/aws/amazon-vpc-cni-k8s/cmd/routed-eni-cni-plugin/driver"
3936
"github.com/aws/amazon-vpc-cni-k8s/pkg/grpcwrapper"
4037
"github.com/aws/amazon-vpc-cni-k8s/pkg/ipamd/datastore"
4138
"github.com/aws/amazon-vpc-cni-k8s/pkg/networkutils"
4239
"github.com/aws/amazon-vpc-cni-k8s/pkg/rpcwrapper"
40+
"github.com/aws/amazon-vpc-cni-k8s/pkg/sgpp"
4341
"github.com/aws/amazon-vpc-cni-k8s/pkg/typeswrapper"
42+
"github.com/aws/amazon-vpc-cni-k8s/pkg/utils/cniutils"
4443
"github.com/aws/amazon-vpc-cni-k8s/pkg/utils/logger"
4544
pb "github.com/aws/amazon-vpc-cni-k8s/rpc"
4645
)
@@ -149,7 +148,7 @@ func add(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap
149148
log.Debugf("MTU value set is %d:", mtu)
150149

151150
// Set up a connection to the ipamD server.
152-
conn, err := grpcClient.Dial(ipamdAddress, grpc.WithInsecure())
151+
conn, err := grpcClient.Dial(ipamdAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
153152
if err != nil {
154153
log.Errorf("Failed to connect to backend server for container %s: %v",
155154
args.ContainerID, err)

0 commit comments

Comments
 (0)