var rcKind … var rsKind … var ssKind … // DefaultSelector returns a selector deduced from the Services, Replication // Controllers, Replica Sets, and Stateful Sets matching the given pod. func DefaultSelector( pod *v1.Pod, sl corelisters.ServiceLister, cl corelisters.ReplicationControllerLister, rsl appslisters.ReplicaSetLister, ssl appslisters.StatefulSetLister, ) labels.Selector { … } // GetPodServices gets the services that have the selector that match the labels on the given pod. func GetPodServices(sl corelisters.ServiceLister, pod *v1.Pod) ([]*v1.Service, error) { … }