minor change in log output (NOTICE prefix)
This commit is contained in:
parent
a640b726bf
commit
b3c24048d6
@ -22,7 +22,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func LogValidationMsg(level ValidationLevel, msg string, v ...any) {
|
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 {
|
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 {
|
for _, application := range ns.Applications {
|
||||||
pods := FindPods(application, clientset)
|
pods := FindPods(application, clientset)
|
||||||
log.Printf(namespace + "/" + application.Name)
|
//log.Printf(namespace + "/" + application.Name)
|
||||||
if len(pods) == 0 {
|
if len(pods) == 0 {
|
||||||
LogValidationMsg(Error, "application %s: no running pods found", application.Name)
|
LogValidationMsg(Error, "application %s: no running pods found", application.Name)
|
||||||
}
|
}
|
||||||
ownerReferences := make(map[string]bool)
|
ownerReferences := make(map[string]bool)
|
||||||
for _, pod := range pods {
|
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 {
|
for _, ownerReference := range pod.OwnerReferences {
|
||||||
ownerReferences[ownerReference.Kind+"/"+ownerReference.Name] = true
|
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 {
|
for _, communication := range config.Communications {
|
||||||
|
Loading…
Reference in New Issue
Block a user