funcgetPodsToDelete(filteredPods []*v1.Pod, diff int) []*v1.Pod {// No need to sort pods if we are about to delete all of them.// diff will always be <= len(filteredPods), so not need to handle > case.if diff < len(filteredPods) {// Sort the pods in the order such that not-ready < ready, unscheduled// < scheduled, and pending < running. This ensures that we delete pods// in the earlier stages whenever possible. sort.Sort(controller.ActivePods(filteredPods)) }return filteredPods[:diff]}