From c71b2ba6612c73e52454516d66c3be7bf61cd32b Mon Sep 17 00:00:00 2001 From: Sebastian Blunt Date: Fri, 21 Feb 2020 18:32:12 -0800 Subject: [PATCH] Make --strict validation errors an Err instead of Warn Other warnings may appear that don't cause validation to fail, making this an error will make it easier to find what caused validation to fail. --- kubeval/output.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubeval/output.go b/kubeval/output.go index 59a6ccb..e278a61 100644 --- a/kubeval/output.go +++ b/kubeval/output.go @@ -61,7 +61,7 @@ func newSTDOutputManager() *STDOutputManager { func (s *STDOutputManager) Put(result ValidationResult) error { if len(result.Errors) > 0 { for _, desc := range result.Errors { - kLog.Warn(result.FileName, "contains an invalid", result.Kind, "-", desc.String()) + kLog.Error(fmt.Errorf("%v contains an invalid %v - %v", result.FileName, result.Kind, desc)) } } else if result.Kind == "" { kLog.Success(result.FileName, "contains an empty YAML document")