Disable pod view for ExternalName services (#1196)

Previously all pods in the service's namespace were shown.
mine
Daniel Lee Harple 2021-07-24 09:33:29 -04:00 committed by GitHub
parent 026adfbfbf
commit 10a52d1241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ func (s *Service) showPods(a *App, _ ui.Tabular, gvr, path string) {
return
}
if svc.Spec.Type == v1.ServiceTypeExternalName {
a.Flash().Warnf("No pod view available. Service %s is an external service.", path)
return
}
showPodsWithLabels(a, path, svc.Spec.Selector)
}