ToB企服应用市场:ToB评测及商务社交产业平台

标题: kube-scheduler的调度上下文 [打印本页]

作者: 鼠扑    时间: 2022-8-30 18:27
标题: kube-scheduler的调度上下文
Scheduler结构

Scheduler 是整个 kube-scheduler 的一个 structure,提供了 kube-scheduler 运行所需的组件。
[code]type Scheduler struct {        // Cache是一个抽象,会缓存pod的信息,作为scheduler进行查找,操作是基于Pod进行增加        Cache internalcache.Cache        // Extenders 算是调度框架中提供的调度插件,会影响kubernetes中的调度策略        Extenders []framework.Extender        // NextPod 作为一个函数提供,会阻塞获取下一个ke'diao'du        NextPod func() *framework.QueuedPodInfo        // Error is called if there is an error. It is passed the pod in        // question, and the error        Error func(*framework.QueuedPodInfo, error)        // SchedulePod 尝试将给出的pod调度到Node。        SchedulePod func(ctx context.Context, fwk framework.Framework, state *framework.CycleState, pod *v1.Pod) (ScheduleResult, error)        // 关闭scheduler的信号        StopEverything




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4