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> Kubernetes-commit: c1c18295893282ae32e7be0d09f607680241712f
This commit is contained in:
parent
608cee4644
commit
a2f2f0453d
|
@ -31,6 +31,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"
|
||||||
|
@ -179,6 +180,10 @@ func newETCD3Client(c storagebackend.TransportConfig) (*clientv3.Client, error)
|
||||||
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