mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
a0548898b7
* refactor: move registry client init in internal package Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * refactor: move leader election code in internal package Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
16 lines
423 B
Go
16 lines
423 B
Go
package internal
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/go-logr/logr"
|
|
"github.com/kyverno/kyverno/pkg/profiling"
|
|
)
|
|
|
|
func setupProfiling(logger logr.Logger) {
|
|
logger = logger.WithName("profiling").WithValues("enabled", profilingEnabled, "address", profilingAddress, "port", profilingPort)
|
|
if profilingEnabled {
|
|
logger.Info("setup profiling...")
|
|
profiling.Start(logger, net.JoinHostPort(profilingAddress, profilingPort))
|
|
}
|
|
}
|