Merge pull request #58529 from aledbf/describe-ingress

Automatic merge from submit-queue (batch tested with PRs 58221, 58529, 57800). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Show all the annotations in ingress rules

**What this PR does / why we need it**:

This change prints all the annotation in Ingress when `kubectl describe ingress` is executed.
Right now kubectl assumes all the ingress annotations start with `ingress`.

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-01-19 18:49:29 -08:00 committed by GitHub
commit 570f26382e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2074,12 +2074,7 @@ func describeIngressTLS(w PrefixWriter, ingTLS []extensions.IngressTLS) {
func describeIngressAnnotations(w PrefixWriter, annotations map[string]string) {
w.Write(LEVEL_0, "Annotations:\n")
for k, v := range annotations {
if !strings.HasPrefix(k, "ingress") {
continue
}
parts := strings.Split(k, "/")
name := parts[len(parts)-1]
w.Write(LEVEL_1, "%v:\t%s\n", name, v)
w.Write(LEVEL_1, "%v:\t%s\n", k, v)
}
return
}