mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
16 lines
661 B
Go
16 lines
661 B
Go
|
package internal
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
|
||
|
"github.com/go-logr/logr"
|
||
|
reportutils "github.com/kyverno/kyverno/pkg/utils/report"
|
||
|
)
|
||
|
|
||
|
func setupReporting(logger logr.Logger) reportutils.ReportingConfiguration {
|
||
|
logger = logger.WithName("setup-reporting").WithValues("enableReporting", enableReporting)
|
||
|
cfg := reportutils.NewReportingConfig(strings.Split(enableReporting, ",")...)
|
||
|
logger.Info("setting up reporting...", "validate", cfg.ValidateReportsEnabled(), "mutate", cfg.MutateReportsEnabled(), "mutateExisiting", cfg.MutateExistingReportsEnabled(), "imageVerify", cfg.ImageVerificationReportsEnabled(), "generate", cfg.GenerateReportsEnabled())
|
||
|
return cfg
|
||
|
}
|