mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Merge pull request #6182 from thockin/plural_services_20
Implement multi-port Services
This commit is contained in:
@@ -333,7 +333,15 @@ func describeService(service *api.Service, endpoints *api.Endpoints, events *api
|
||||
list := strings.Join(service.Spec.PublicIPs, ", ")
|
||||
fmt.Fprintf(out, "Public IPs:\t%s\n", list)
|
||||
}
|
||||
fmt.Fprintf(out, "Port:\t%d\n", service.Spec.Port)
|
||||
for i := range service.Spec.Ports {
|
||||
sp := &service.Spec.Ports[i]
|
||||
|
||||
name := sp.Name
|
||||
if name == "" {
|
||||
name = "<unnamed>"
|
||||
}
|
||||
fmt.Fprintf(out, "Port:\t%s\t%d/%s\n", name, sp.Port, sp.Protocol)
|
||||
}
|
||||
fmt.Fprintf(out, "Endpoints:\t%s\n", formatEndpoints(endpoints))
|
||||
fmt.Fprintf(out, "Session Affinity:\t%s\n", service.Spec.SessionAffinity)
|
||||
if events != nil {
|
||||
|
||||
Reference in New Issue
Block a user