pkg/util/route.go
Function GetNsForListPodAndSvc
has 5 return statements (exceeds 4 allowed). Open
Open
func GetNsForListPodAndSvc(ctx context.Context, clientset *kubernetes.Clientset, nsList []string) (podNs string, svcNs string, err error) {
for _, ns := range nsList {
log.Debugf("List namepsace %s pods", ns)
_, err = clientset.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{Limit: 1})
if apierrors.IsForbidden(err) {