-
Kubernetes Submit Queue authored
Automatic merge from submit-queue (batch tested with PRs 40046, 40073, 40547, 40534, 40249) Issue #13501 - printEvent Source to much more cleaner Create a formatEventSource func and use it. **What this PR does / why we need it**: Adds a smarter way to print EventSource, removing "{ }" and the eventual extra ", " when Host is empty. It was also reported in OpenShift issue https://github.com/openshift/origin/issues/6586 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #13501 **Special notes for your reviewer**: I have used this new func in all user facing printouts, but there are other places where EventSource are printed to logs, like DumpEventsInNamespace in test/e2e/framework/util.go for instance. Don't know if I should correct there too... **Release note**: ```release-note Improve formatting of EventSource in kubectl get and kubectl describe ```e3a37434