mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
kubelet: use custom dialer for grpc probes
This commit is contained in:
parent
c801053791
commit
12b8944702
@ -57,6 +57,9 @@ func (p grpcProber) Probe(host, service string, port int, timeout time.Duration)
|
||||
grpc.WithUserAgent(fmt.Sprintf("kube-probe/%s.%s", v.Major, v.Minor)),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()), //credentials are currently not supported
|
||||
grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
|
||||
return probe.ProbeDialer().DialContext(ctx, "tcp", addr)
|
||||
}),
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
|
Loading…
Reference in New Issue
Block a user