mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #105069 from p0lyn0mial/upstream-etcd-client-retry
etcd client starts retrying transient errors from the etcd cluster
This commit is contained in:
commit
63e7ee43bb
@ -137,8 +137,13 @@ func newETCD3Client(c storagebackend.TransportConfig) (*clientv3.Client, error)
|
|||||||
}
|
}
|
||||||
dialOptions := []grpc.DialOption{
|
dialOptions := []grpc.DialOption{
|
||||||
grpc.WithBlock(), // block until the underlying connection is up
|
grpc.WithBlock(), // block until the underlying connection is up
|
||||||
grpc.WithUnaryInterceptor(grpcprom.UnaryClientInterceptor),
|
// use chained interceptors so that the default (retry and backoff) interceptors are added.
|
||||||
grpc.WithStreamInterceptor(grpcprom.StreamClientInterceptor),
|
// 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 utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) {
|
if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) {
|
||||||
tracingOpts := []otelgrpc.Option{
|
tracingOpts := []otelgrpc.Option{
|
||||||
|
Loading…
Reference in New Issue
Block a user