Skip to content

Commit

Permalink
Merge pull request #110356 from p0lyn0mial/automated-cherry-pick-of-#…
Browse files Browse the repository at this point in the history
…105069-upstream-release-1.21

Automated cherry pick of #105069: etcd-client starts retrying transient errors from the etcd
  • Loading branch information
k8s-ci-robot committed Jun 9, 2022
2 parents 80390b8 + b67cf46 commit 4bf8569
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -132,8 +132,13 @@ func newETCD3Client(c storagebackend.TransportConfig) (*clientv3.Client, error)
}
dialOptions := []grpc.DialOption{
grpc.WithBlock(), // block until the underlying connection is up
grpc.WithUnaryInterceptor(grpcprom.UnaryClientInterceptor),
grpc.WithStreamInterceptor(grpcprom.StreamClientInterceptor),
// use chained interceptors so that the default (retry and backoff) interceptors are added.
// otherwise they will be overwritten by the metric interceptor.
//
// these optional interceptors will be placed after the default ones.
// which seems to be what we want as the metrics will be collected on each attempt (retry)
grpc.WithChainUnaryInterceptor(grpcprom.UnaryClientInterceptor),
grpc.WithChainStreamInterceptor(grpcprom.StreamClientInterceptor),
}
if egressDialer != nil {
dialer := func(ctx context.Context, addr string) (net.Conn, error) {
Expand Down

0 comments on commit 4bf8569

Please sign in to comment.