(worker *corev1.Pod)
| 560 | } |
| 561 | |
| 562 | func isIdleWorker(worker *corev1.Pod) bool { |
| 563 | if worker.Labels != nil { |
| 564 | owner, exist := worker.Labels[constants.WorkerOwnerLabelKey] |
| 565 | if !exist { |
| 566 | return true |
| 567 | } |
| 568 | |
| 569 | return len(owner) == 0 |
| 570 | } |
| 571 | |
| 572 | return false |
| 573 | } |
| 574 | |
| 575 | // SplitWorkerKey returns the namespace, name, image that |
| 576 | // WorkerKeyFunc encoded into key. |