mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #113077 from lixiaobing1/WithTransportCredentials
replace WithInsecure() with WithTransportCredentials()
This commit is contained in:
commit
3eeb7cb57f
@ -24,6 +24,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
|
|
||||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||||
"k8s.io/apiserver/pkg/storage/value/encrypt/envelope/util"
|
"k8s.io/apiserver/pkg/storage/value/encrypt/envelope/util"
|
||||||
@ -55,7 +56,7 @@ func NewGRPCService(ctx context.Context, endpoint string, callTimeout time.Durat
|
|||||||
s := &gRPCService{callTimeout: callTimeout}
|
s := &gRPCService{callTimeout: callTimeout}
|
||||||
s.connection, err = grpc.Dial(
|
s.connection, err = grpc.Dial(
|
||||||
addr,
|
addr,
|
||||||
grpc.WithInsecure(),
|
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
|
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
|
||||||
grpc.WithContextDialer(
|
grpc.WithContextDialer(
|
||||||
func(context.Context, string) (net.Conn, error) {
|
func(context.Context, string) (net.Conn, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user