code: func getSelectors(pod *v1.Pod, sl algorithm.ServiceLister, cl algorithm.ControllerLister, rsl algorithm.ReplicaSetLister, ssl algorithm.StatefulSetLister) []labels.Selector {
  	var selectors []labels.Selector
  
  	if services, err := sl.GetPodServices(pod); err == nil {
  		for _, service := range services {
  			selectors = append(selectors, labels.SelectorFromSet(service.Spec.Selector))
  		}
  	}
  
  	if rcs, err := cl.GetPodControllers(pod); err == nil {
  		for _, rc := range rcs {
  			selectors = append(selectors, labels.SelectorFromSet(rc.Spec.Selector))
  		}
  	}
  
  	if rss, err := rsl.GetPodReplicaSets(pod); err == nil {
  		for _, rs := range rss {
  			if selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector); err == nil {
  				selectors = append(selectors, selector)
  			}
  		}
  	}
  
  	if sss, err := ssl.GetPodStatefulSets(pod); err == nil {
  		for _, ss := range sss {
  			if selector, err := metav1.LabelSelectorAsSelector(ss.Spec.Selector); err == nil {
  				selectors = append(selectors, selector)
  			}
  		}
  	}
  
  	return selectors
  }
docs: // getSelectors returns selectors of services, RCs and RSs matching the given pod.