mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 07:26:55 +00:00
* structuring log Signed-off-by: Kamaal <kamaal@macs-MacBook-Air.local> * Update controller.go Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> * Update main.go Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> * Update run.go Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> * Update config.go Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> * Update pkg/webhooks/resource/mutation/mutation.go Co-authored-by: shuting <shuting@nirmata.com> Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> * Update pkg/webhooks/resource/mutation/mutation.go Co-authored-by: shuting <shuting@nirmata.com> Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> Signed-off-by: Kamaal <kamaal@macs-MacBook-Air.local> --------- Signed-off-by: Kamaal <kamaal@macs-MacBook-Air.local> Signed-off-by: Mohd Kamaal <102820439+Mohdcode@users.noreply.github.com> Co-authored-by: Kamaal <kamaal@macs-MacBook-Air.local> Co-authored-by: shuting <shuting@nirmata.com>
15 lines
666 B
Go
15 lines
666 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.V(2).Info("setting up reporting...", "validate", cfg.ValidateReportsEnabled(), "mutate", cfg.MutateReportsEnabled(), "mutateExisiting", cfg.MutateExistingReportsEnabled(), "imageVerify", cfg.ImageVerificationReportsEnabled(), "generate", cfg.GenerateReportsEnabled())
|
|
return cfg
|
|
}
|