scheduler's NodeInfo tracks PodInfos instead of Pods

This commit is contained in:
Abdullah Gharaibeh
2020-04-08 15:56:30 -04:00
parent 3072d1e22e
commit b8ddd00312
25 changed files with 358 additions and 381 deletions

View File

@@ -17,7 +17,8 @@ limitations under the License.
package cache
import (
v1 "k8s.io/api/core/v1"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
)
@@ -56,7 +57,8 @@ import (
// - Both "Expired" and "Deleted" are valid end states. In case of some problems, e.g. network issue,
// a pod might have changed its state (e.g. added and deleted) without delivering notification to the cache.
type Cache interface {
framework.PodLister
// ListPods lists all pods in the cache.
ListPods(selector labels.Selector) ([]*v1.Pod, error)
// AssumePod assumes a pod scheduled and aggregates the pod's information into its node.
// The implementation also decides the policy to expire pod before being confirmed (receiving Add event).