mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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:
commit
570f26382e
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user