kube-scheduler的调度上下文

鼠扑  论坛元老 | 2022-8-30 18:27:21 | 显示全部楼层 | 阅读模式
打印 上一主题 下一主题

主题 2017|帖子 2017|积分 6051

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

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

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

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

鼠扑

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表