Simplify describe events table
The describe table for events is not easy to read and violates other output guidelines. Change to use spaces (we don't use tabs in formal output for tables). Remove columns that are not normally needed or available on events. Example for pods: ``` ... QoS Class: BestEffort Node-Selectors: role=app Tolerations: <none> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Pulling 1h (x51 over 5h) kubelet, origin-ci-ig-n-gj0x pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest" Normal BackOff 8m (x1274 over 5h) kubelet, origin-ci-ig-n-gj0x Back-off pulling image "registry.svc.ci.openshift.org/experiment/commenter:latest" Warning FailedSync 3m (x1359 over 5h) kubelet, origin-ci-ig-n-gj0x Error syncing pod ``` Puts the type first (separate important from not), then reason (which is the most impactful scanning field). Collapses first seen, last seen, and times into a single field, since most of the time you care about the last time the event happened, not the first time.
This commit is contained in:
@@ -335,7 +335,7 @@ func applyHistory(ds *extensionsv1beta1.DaemonSet, history *appsv1beta1.Controll
|
||||
func tabbedString(f func(io.Writer) error) (string, error) {
|
||||
out := new(tabwriter.Writer)
|
||||
buf := &bytes.Buffer{}
|
||||
out.Init(buf, 0, 8, 1, '\t', 0)
|
||||
out.Init(buf, 0, 8, 2, ' ', 0)
|
||||
|
||||
err := f(out)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user