From b03e461f25e435e9d960c6c11e0ab9f7fe4404c3 Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Fri, 29 Jul 2022 17:59:47 +0200 Subject: [PATCH] feat: auto optimize GOMAXPROCS (#4277) Signed-off-by: Guilhem Lettron --- cmd/kyverno/main.go | 2 ++ go.mod | 1 + go.sum | 2 ++ 3 files changed, 5 insertions(+) diff --git a/cmd/kyverno/main.go b/cmd/kyverno/main.go index 6e705f1e87..8a50ee27fd 100644 --- a/cmd/kyverno/main.go +++ b/cmd/kyverno/main.go @@ -11,6 +11,8 @@ import ( "strings" "time" + _ "go.uber.org/automaxprocs" // #nosec + "github.com/kyverno/kyverno/pkg/background" generatecleanup "github.com/kyverno/kyverno/pkg/background/generate/cleanup" kyvernoclient "github.com/kyverno/kyverno/pkg/client/clientset/versioned" diff --git a/go.mod b/go.mod index cd62d95b4e..3c28a93889 100644 --- a/go.mod +++ b/go.mod @@ -304,6 +304,7 @@ require ( go.opentelemetry.io/proto/otlp v0.16.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect go.uber.org/atomic v1.9.0 // indirect + go.uber.org/automaxprocs v1.5.1 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect diff --git a/go.sum b/go.sum index dfe9a97efe..5705cc3a97 100644 --- a/go.sum +++ b/go.sum @@ -2180,6 +2180,8 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= +go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=