mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	update ingress describe output
This commit is contained in:
		@@ -1320,14 +1320,23 @@ func (i *IngressDescriber) describeIngress(ing *extensions.Ingress, describerSet
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		fmt.Fprint(out, "Rules:\n  Host\tPath\tBackends\n")
 | 
							fmt.Fprint(out, "Rules:\n  Host\tPath\tBackends\n")
 | 
				
			||||||
		fmt.Fprint(out, "  ----\t----\t--------\n")
 | 
							fmt.Fprint(out, "  ----\t----\t--------\n")
 | 
				
			||||||
 | 
							count := 0
 | 
				
			||||||
		for _, rules := range ing.Spec.Rules {
 | 
							for _, rules := range ing.Spec.Rules {
 | 
				
			||||||
			if rules.HTTP == nil {
 | 
								if rules.HTTP == nil {
 | 
				
			||||||
				continue
 | 
									continue
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			fmt.Fprintf(out, "  %s\t\n", rules.Host)
 | 
								count++
 | 
				
			||||||
			for _, path := range rules.HTTP.Paths {
 | 
								host := rules.Host
 | 
				
			||||||
				fmt.Fprintf(out, "    \t%s \t%s (%s)\n", path.Path, backendStringer(&path.Backend), i.describeBackend(ing.Namespace, &path.Backend))
 | 
								if len(host) == 0 {
 | 
				
			||||||
 | 
									host = "*"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								fmt.Fprintf(out, "  %s\t\n", host)
 | 
				
			||||||
 | 
								for _, path := range rules.HTTP.Paths {
 | 
				
			||||||
 | 
									fmt.Fprintf(out, "    \t%s \t%s (%s)\n", path.Path, backendStringer(&path.Backend), i.describeBackend(ns, &path.Backend))
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if count == 0 {
 | 
				
			||||||
 | 
								fmt.Fprintf(out, "  %s\t%s \t%s (%s)\n", "*", "*", backendStringer(def), i.describeBackend(ns, def))
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		describeIngressAnnotations(out, ing.Annotations)
 | 
							describeIngressAnnotations(out, ing.Annotations)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user