From b3c24048d60310ec015effef24b838f0c7a57977 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sun, 12 Jan 2025 16:42:11 +0100 Subject: [PATCH] minor change in log output (NOTICE prefix) --- cmd/policygen/configvalidator.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/policygen/configvalidator.go b/cmd/policygen/configvalidator.go index 360059f..14d25ff 100644 --- a/cmd/policygen/configvalidator.go +++ b/cmd/policygen/configvalidator.go @@ -22,7 +22,7 @@ const ( ) func LogValidationMsg(level ValidationLevel, msg string, v ...any) { - fmt.Fprintf(os.Stderr, msg+"\n", v...) + fmt.Fprintf(os.Stderr, "NOTICE: "+msg+"\n", v...) } func IterToSlice[K any](i iter.Seq[K]) []K { @@ -52,13 +52,13 @@ func validate(files []string, options *Options) error { } for _, application := range ns.Applications { pods := FindPods(application, clientset) - log.Printf(namespace + "/" + application.Name) + //log.Printf(namespace + "/" + application.Name) if len(pods) == 0 { LogValidationMsg(Error, "application %s: no running pods found", application.Name) } ownerReferences := make(map[string]bool) for _, pod := range pods { - log.Printf(" %s %v", pod.Name, pod.OwnerReferences) + //log.Printf(" %s %v", pod.Name, pod.OwnerReferences) for _, ownerReference := range pod.OwnerReferences { ownerReferences[ownerReference.Kind+"/"+ownerReference.Name] = true } @@ -75,6 +75,8 @@ func validate(files []string, options *Options) error { } } } + // Check service accounts + } } for _, communication := range config.Communications {