1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

switched to default serve mux (#2592)

Signed-off-by: Siddharth Lal <siddharthlal25@gmail.com>
This commit is contained in:
Siddharth Lal 2021-10-27 04:39:07 +05:30 committed by GitHub
parent 9e9af4872e
commit 11a9eb3fb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,16 +113,14 @@ func main() {
os.Exit(1)
}
var profilingServerMux *http.ServeMux
var metricsServerMux *http.ServeMux
var promConfig *metrics.PromConfig
if profile {
profilingServerMux = http.NewServeMux()
addr := ":" + profilePort
setupLog.Info("Enable profiling, see details at https://github.com/kyverno/kyverno/wiki/Profiling-Kyverno-on-Kubernetes", "port", profilePort)
go func() {
if err := http.ListenAndServe(addr, profilingServerMux); err != nil {
if err := http.ListenAndServe(addr, nil); err != nil {
setupLog.Error(err, "Failed to enable profiling")
os.Exit(1)
}