kube-scheduler的调度上下文

[复制链接]
发表于 2022-8-30 18:29:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
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
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表