Documentation ¶
Index ¶
- Constants
- func New(plArgs *runtime.Unknown, handle framework.FrameworkHandle) (framework.Plugin, error)
- type Args
- type NodeLabel
- func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (pl *NodeLabel) Name() string
- func (pl *NodeLabel) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
- func (pl *NodeLabel) ScoreExtensions() framework.ScoreExtensions
Constants ¶
View Source
const Name = "NodeLabel"
Name of this plugin.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct { // PresentLabels should be present for the node to be considered a fit for hosting the pod PresentLabels []string `json:"presentLabels,omitempty"` // AbsentLabels should be absent for the node to be considered a fit for hosting the pod AbsentLabels []string `json:"absentLabels,omitempty"` // Nodes that have labels in the list will get a higher score. PresentLabelsPreference []string `json:"presentLabelsPreference,omitempty"` // Nodes that don't have labels in the list will get a higher score. AbsentLabelsPreference []string `json:"absentLabelsPreference,omitempty"` }
Args holds the args that are used to configure the plugin.
type NodeLabel ¶
type NodeLabel struct {
// contains filtered or unexported fields
}
NodeLabel checks whether a pod can fit based on the node labels which match a filter that it requests.
func (*NodeLabel) Filter ¶
func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeInfo *nodeinfo.NodeInfo) *framework.Status
Filter invoked at the filter extension point.
func (*NodeLabel) Score ¶
func (pl *NodeLabel) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*NodeLabel) ScoreExtensions ¶
func (pl *NodeLabel) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
Click to show internal directories.
Click to hide internal directories.