mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Disable the etcd3 client logger
This logger is responsible for 20% of the API server's memory usage when many CRDs are installed. See the below issue for more context. https://github.com/kubernetes/kubernetes/issues/111476 Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
parent
e092b6d27b
commit
0e5401c939
@ -30,6 +30,7 @@ import (
|
|||||||
"go.etcd.io/etcd/client/pkg/v3/transport"
|
"go.etcd.io/etcd/client/pkg/v3/transport"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
|
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
|
||||||
|
"go.uber.org/zap"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
@ -223,6 +224,10 @@ var newETCD3Client = func(c storagebackend.TransportConfig) (*clientv3.Client, e
|
|||||||
DialOptions: dialOptions,
|
DialOptions: dialOptions,
|
||||||
Endpoints: c.ServerList,
|
Endpoints: c.ServerList,
|
||||||
TLS: tlsConfig,
|
TLS: tlsConfig,
|
||||||
|
|
||||||
|
// This logger uses a significant amount of memory when many CRDs (i.e.
|
||||||
|
// 1,000+) are added to the API server, so we disable it.
|
||||||
|
Logger: zap.NewNop(),
|
||||||
}
|
}
|
||||||
|
|
||||||
return clientv3.New(cfg)
|
return clientv3.New(cfg)
|
||||||
|
Loading…
Reference in New Issue
Block a user