Change:
should output Conditions. For example: Including Conditions in the output is useful. In this example, a Condition can explain why a namespace deletion has not completed. While the output below includes Conditions, I believe the output of would be easier to read.
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig cli
/assign

Discussion:
printLabelsMultiline(w, "Labels", namespace.Labels) printAnnotationsMultiline(w, "Annotations", namespace.Annotations) w.Write(LEVEL_0, "Status:t%sn", string(namespace.Status.Phase)) <ins> if len(namespace.Status.Conditions) > 0 { w.Write(LEVEL_0, "Conditions:n") w.Write(LEVEL_1, "TypetStatustLastTransitionTimetReasontMessagen") w.Write(LEVEL_1, "----t------t------------------t------t-------n") for _, c := range namespace.Status.Conditions { w.Write(LEVEL_1, "%vt%vt%st%vt%vn", c.Type, c.Status, c.LastTransitionTime.Time.Format(time.RFC1123Z), c.Reason, c.Message) } } </ins> if resourceQuotaList != nil { w.Write(LEVEL_0, "n") DescribeResourceQuotas(resourceQuotaList, w) } if limitRangeList != nil { w.Write(LEVEL_0, "n") DescribeLimitRanges(limitRangeList, w) } return nil }) }

} func TestDescribeNamespace(t *testing.T) { <del> fake := fake.NewSimpleClientset(&corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: "myns", </del> <ins> exampleNamespaceName := "example" testCases := []struct { name      string namespace *corev1.Namespace expect    []string }{ { name: "no quotas or limit ranges", namespace: &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: exampleNamespaceName, }, Status: corev1.NamespaceStatus{ Phase: corev1.NamespaceActive, }, }, expect: []string{ "Name", exampleNamespaceName, "Status", string(corev1.NamespaceActive), "No resource quota", "No LimitRange resource.", }, }, { name: "has conditions", namespace: &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: exampleNamespaceName, }, Status: corev1.NamespaceStatus{ Phase: corev1.NamespaceTerminating, Conditions: []corev1.NamespaceCondition{ { LastTransitionTime: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), Message:            "example message", Reason:             "example reason", Status:             corev1.ConditionTrue, Type:               corev1.NamespaceDeletionContentFailure, }, }, }, }, expect: []string{ "Name", exampleNamespaceName, "Status", string(corev1.NamespaceTerminating), "Conditions", "Type", string(corev1.NamespaceDeletionContentFailure), "Status", string(corev1.ConditionTrue), "Reason", "example reason", "Message", "example message", "No resource quota", "No LimitRange resource.", }, </ins> }, <del> }) c := &describeClient{T: t, Namespace: "", Interface: fake} d := NamespaceDescriber{c} out, err := d.Describe("", "myns", DescriberSettings{ShowEvents: true}) if err != nil { t.Errorf("unexpected error: %v", err) </del> } <del> if !strings.Contains(out, "myns") { t.Errorf("unexpected out: %s", out) </del> <ins> for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { fake := fake.NewSimpleClientset(testCase.namespace) c := &describeClient{T: t, Namespace: "", Interface: fake} d := NamespaceDescriber{c} out, err := d.Describe("", testCase.namespace.Name, DescriberSettings{ShowEvents: true}) if err != nil { t.Errorf("unexpected error: %v", err) } for _, expected := range testCase.expect { if !strings.Contains(out, expected) { t.Errorf("expected to find %q in output: %q", expected, out) } } }) </ins> } }