MCPcopy Create free account
hub / github.com/cloudtty/cloudtty / isIdleWorker

Function isIdleWorker

pkg/workerpool/worker_pool.go:562–573  ·  view source on GitHub ↗
(worker *corev1.Pod)

Source from the content-addressed store, hash-verified

560}
561
562func 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.

Callers 1

enqueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected