Fix kubectl describe ingress annotations not sorted

Kubernetes-commit: 0acaf5c3e93cc3422aca47eeea96e9ef553ac35c
This commit is contained in:
zhouya0 2020-02-21 11:02:40 +08:00 committed by Kubernetes Publisher
parent 1f2c133d51
commit de11036690
1 changed files with 1 additions and 9 deletions

View File

@ -2410,7 +2410,7 @@ func (i *IngressDescriber) describeIngress(ing *networkingv1beta1.Ingress, descr
if count == 0 {
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 {
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.
type ServiceDescriber struct {
clientset.Interface