Documentation ¶
Index ¶
- Constants
- func New(obj runtime.Object, handle framework.Handle) (framework.Plugin, error)
- type CapacityScheduling
- func (c *CapacityScheduling) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, ...) *framework.Status
- func (c *CapacityScheduling) EventsToRegister() []framework.ClusterEvent
- func (c *CapacityScheduling) Name() string
- func (c *CapacityScheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) (*framework.PostFilterResult, *framework.Status)
- func (c *CapacityScheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
- func (c *CapacityScheduling) PreFilterExtensions() framework.PreFilterExtensions
- func (c *CapacityScheduling) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, ...) *framework.Status
- func (c *CapacityScheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (c *CapacityScheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
- type ElasticQuotaInfo
- type ElasticQuotaInfos
- type ElasticQuotaSnapshotState
- type PreFilterState
Constants ¶
const ( // Name is the name of the plugin used in Registry and configurations. Name = "CapacityScheduling" ElasticQuotaSnapshotKey = "ElasticQuotaSnapshot" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CapacityScheduling ¶
CapacityScheduling is a plugin that implements the mechanism of capacity scheduling.
func (*CapacityScheduling) AddPod ¶
func (c *CapacityScheduling) AddPod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToAdd *framework.PodInfo, nodeInfo *framework.NodeInfo) *framework.Status
AddPod from pre-computed data in cycleState.
func (*CapacityScheduling) EventsToRegister ¶
func (c *CapacityScheduling) EventsToRegister() []framework.ClusterEvent
func (*CapacityScheduling) Name ¶
func (c *CapacityScheduling) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*CapacityScheduling) PostFilter ¶
func (c *CapacityScheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status)
func (*CapacityScheduling) PreFilter ¶
func (c *CapacityScheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
PreFilter performs the following validations. 1. Check if the (pod.request + eq.allocated) is less than eq.max. 2. Check if the sum(eq's usage) > sum(eq's min).
func (*CapacityScheduling) PreFilterExtensions ¶
func (c *CapacityScheduling) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions returns prefilter extensions, pod add and remove.
func (*CapacityScheduling) RemovePod ¶
func (c *CapacityScheduling) RemovePod(ctx context.Context, cycleState *framework.CycleState, podToSchedule *v1.Pod, podToRemove *framework.PodInfo, nodeInfo *framework.NodeInfo) *framework.Status
RemovePod from pre-computed data in cycleState.
func (*CapacityScheduling) Reserve ¶
func (c *CapacityScheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
func (*CapacityScheduling) Unreserve ¶
func (c *CapacityScheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
type ElasticQuotaInfo ¶
type ElasticQuotaInfo struct { Namespace string Min *framework.Resource Max *framework.Resource Used *framework.Resource // contains filtered or unexported fields }
ElasticQuotaInfo is a wrapper to a ElasticQuota with information. Each namespace can only have one ElasticQuota.
type ElasticQuotaInfos ¶
type ElasticQuotaInfos map[string]*ElasticQuotaInfo
func NewElasticQuotaInfos ¶
func NewElasticQuotaInfos() ElasticQuotaInfos
type ElasticQuotaSnapshotState ¶
type ElasticQuotaSnapshotState struct {
// contains filtered or unexported fields
}
ElasticQuotaSnapshotState stores the snapshot of elasticQuotas.
func (*ElasticQuotaSnapshotState) Clone ¶
func (s *ElasticQuotaSnapshotState) Clone() framework.StateData
Clone the ElasticQuotaSnapshot state.
type PreFilterState ¶
type PreFilterState struct {
// contains filtered or unexported fields
}
PreFilterState computed at PreFilter and used at PostFilter or Reserve.
func (*PreFilterState) Clone ¶
func (s *PreFilterState) Clone() framework.StateData
Clone the preFilter state.