Documentation ¶
Index ¶
- func New(ctx context.Context, cfg *Config) (scheduler.Scheduler, error)
- type Autoscaler
- type Config
- type GetReserved
- type Pending
- type StatefulSetScheduler
- func (s *StatefulSetScheduler) Demote(b reconciler.Bucket)
- func (s *StatefulSetScheduler) HasScorePlugins(state *st.State, policy *scheduler.SchedulerPolicy) bool
- func (s *StatefulSetScheduler) Promote(b reconciler.Bucket, enq func(reconciler.Bucket, types.NamespacedName)) error
- func (s *StatefulSetScheduler) Reserved() map[types.NamespacedName]map[string]int32
- func (s *StatefulSetScheduler) RunFilterPlugins(ctx context.Context, states *st.State, vpod scheduler.VPod, podID int32, ...) st.PluginToStatus
- func (s *StatefulSetScheduler) RunScorePlugins(ctx context.Context, states *st.State, vpod scheduler.VPod, ...) (st.PluginToPodScores, *st.Status)
- func (s *StatefulSetScheduler) Schedule(vpod scheduler.VPod) ([]duckv1alpha1.Placement, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Autoscaler ¶
type Config ¶ added in v0.35.6
type Config struct { StatefulSetNamespace string `json:"statefulSetNamespace"` StatefulSetName string `json:"statefulSetName"` ScaleCacheConfig scheduler.ScaleCacheConfig `json:"scaleCacheConfig"` // PodCapacity max capacity for each StatefulSet's pod. PodCapacity int32 `json:"podCapacity"` // Autoscaler refresh period RefreshPeriod time.Duration `json:"refreshPeriod"` SchedulerPolicy scheduler.SchedulerPolicyType `json:"schedulerPolicy"` SchedPolicy *scheduler.SchedulerPolicy `json:"schedPolicy"` DeschedPolicy *scheduler.SchedulerPolicy `json:"deschedPolicy"` Evictor scheduler.Evictor `json:"-"` VPodLister scheduler.VPodLister `json:"-"` NodeLister corev1listers.NodeLister `json:"-"` // contains filtered or unexported fields }
type GetReserved ¶ added in v0.38.2
type GetReserved func() map[types.NamespacedName]map[string]int32
type Pending ¶ added in v0.38.2
type Pending map[types.NamespacedName]int32
type StatefulSetScheduler ¶
type StatefulSetScheduler struct {
// contains filtered or unexported fields
}
StatefulSetScheduler is a scheduler placing VPod into statefulset-managed set of pods
func (*StatefulSetScheduler) Demote ¶ added in v0.37.0
func (s *StatefulSetScheduler) Demote(b reconciler.Bucket)
Demote implements reconciler.LeaderAware.
func (*StatefulSetScheduler) HasScorePlugins ¶
func (s *StatefulSetScheduler) HasScorePlugins(state *st.State, policy *scheduler.SchedulerPolicy) bool
HasScorePlugins returns true if at least one score plugin is defined.
func (*StatefulSetScheduler) Promote ¶ added in v0.37.0
func (s *StatefulSetScheduler) Promote(b reconciler.Bucket, enq func(reconciler.Bucket, types.NamespacedName)) error
Promote implements reconciler.LeaderAware.
func (*StatefulSetScheduler) Reserved ¶ added in v0.38.2
func (s *StatefulSetScheduler) Reserved() map[types.NamespacedName]map[string]int32
func (*StatefulSetScheduler) RunFilterPlugins ¶
func (s *StatefulSetScheduler) RunFilterPlugins(ctx context.Context, states *st.State, vpod scheduler.VPod, podID int32, policy *scheduler.SchedulerPolicy) st.PluginToStatus
RunFilterPlugins runs the set of configured Filter plugins for a vrep on the given pod. If any of these plugins doesn't return "Success", the pod is not suitable for placing the vrep. Meanwhile, the failure message and status are set for the given pod.
func (*StatefulSetScheduler) RunScorePlugins ¶
func (s *StatefulSetScheduler) RunScorePlugins(ctx context.Context, states *st.State, vpod scheduler.VPod, feasiblePods []int32, policy *scheduler.SchedulerPolicy) (st.PluginToPodScores, *st.Status)
RunScorePlugins runs the set of configured scoring plugins. It returns a list that stores for each scoring plugin name the corresponding PodScoreList(s). It also returns *Status, which is set to non-success if any of the plugins returns a non-success status.
func (*StatefulSetScheduler) Schedule ¶
func (s *StatefulSetScheduler) Schedule(vpod scheduler.VPod) ([]duckv1alpha1.Placement, error)