mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #88394 from zhouya0/fix_kubectl_describe_ingress_annotations_not_sorted
Fix kubectl describe ingress annotations not sorted
This commit is contained in:
commit
4b83d0b2fd
@ -2410,7 +2410,7 @@ func (i *IngressDescriber) describeIngress(ing *networkingv1beta1.Ingress, descr
|
|||||||
if count == 0 {
|
if count == 0 {
|
||||||
w.Write(LEVEL_1, "%s\t%s \t%s (%s)\n", "*", "*", backendStringer(def), i.describeBackend(ns, def))
|
w.Write(LEVEL_1, "%s\t%s \t%s (%s)\n", "*", "*", backendStringer(def), i.describeBackend(ns, def))
|
||||||
}
|
}
|
||||||
describeIngressAnnotations(w, ing.Annotations)
|
printAnnotationsMultiline(w, "Annotations", ing.Annotations)
|
||||||
|
|
||||||
if describerSettings.ShowEvents {
|
if describerSettings.ShowEvents {
|
||||||
events, _ := i.CoreV1().Events(ing.Namespace).Search(scheme.Scheme, ing)
|
events, _ := i.CoreV1().Events(ing.Namespace).Search(scheme.Scheme, ing)
|
||||||
@ -2433,14 +2433,6 @@ func describeIngressTLS(w PrefixWriter, ingTLS []networkingv1beta1.IngressTLS) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Move from annotations into Ingress status.
|
|
||||||
func describeIngressAnnotations(w PrefixWriter, annotations map[string]string) {
|
|
||||||
w.Write(LEVEL_0, "Annotations:\n")
|
|
||||||
for k, v := range annotations {
|
|
||||||
w.Write(LEVEL_1, "%v:\t%s\n", k, v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ServiceDescriber generates information about a service.
|
// ServiceDescriber generates information about a service.
|
||||||
type ServiceDescriber struct {
|
type ServiceDescriber struct {
|
||||||
clientset.Interface
|
clientset.Interface
|
||||||
|
Loading…
Reference in New Issue
Block a user