check if the service provides selectors (#2322)
parent
0c642c6786
commit
4e37faf383
|
|
@ -66,6 +66,10 @@ func (s *Service) showPods(a *App, _ ui.Tabular, gvr, path string) {
|
|||
a.Flash().Warnf("No matching pods. Service %s is an external service.", path)
|
||||
return
|
||||
}
|
||||
if svc.Spec.Selector == nil {
|
||||
a.Flash().Warnf("No matching pods. Service %s does not provide any selectors", path)
|
||||
return
|
||||
}
|
||||
|
||||
showPodsWithLabels(a, path, svc.Spec.Selector)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue