1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/metrics/fake.go
Charles-Edouard Brétéché e03f48128a
refactor: metrics configuration code (#5475)
* refactor: metrics configuration

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-11-25 13:14:55 +00:00

15 lines
278 B
Go

package metrics
import (
"github.com/kyverno/kyverno/pkg/config"
"k8s.io/klog/v2"
)
func NewFakeMetricsConfig() *MetricsConfig {
mc := &MetricsConfig{
Config: config.NewDefaultMetricsConfiguration(),
Log: klog.NewKlogr(),
}
_ = mc.initializeMetrics()
return mc
}