mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
e03f48128a
* 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>
15 lines
278 B
Go
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
|
|
}
|