package nodelabel
import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodelabel"
This plugin has been deprecated and is only configurable through the scheduler policy API and the v1beta1 component config API. It is recommended to use the NodeAffinity plugin instead.
Index ¶
- Constants
- func New(plArgs runtime.Object, handle framework.Handle) (framework.Plugin, error)
- type NodeLabel
- func (pl *NodeLabel) EventsToRegister() []framework.ClusterEvent
- func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, _ *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
- func (pl *NodeLabel) Name() string
- func (pl *NodeLabel) Score(ctx context.Context, _ *framework.CycleState, _ *v1.Pod, nodeName string) (int64, *framework.Status)
- func (pl *NodeLabel) ScoreExtensions() framework.ScoreExtensions
Constants ¶
const ( // ErrReasonPresenceViolated is used for CheckNodeLabelPresence predicate error. ErrReasonPresenceViolated = "node(s) didn't have the requested labels" )
Name of this plugin.
Functions ¶
func New ¶
New initializes a new plugin and returns it.
Types ¶
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) EventsToRegister ¶
func (pl *NodeLabel) EventsToRegister() []framework.ClusterEvent
EventsToRegister returns the possible events that may make a Pod failed by this plugin schedulable.
func (*NodeLabel) Filter ¶
func (pl *NodeLabel) Filter(ctx context.Context, _ *framework.CycleState, _ *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
Filter invoked at the filter extension point. It checks whether all of the specified labels exists on a node or not, regardless of their value
Consider the cases where the nodes are placed in regions/zones/racks and these are identified by labels In some cases, it is required that only nodes that are part of ANY of the defined regions/zones/racks be selected
Alternately, eliminating nodes that have a certain label, regardless of value, is also useful A node may have a label with "retiring" as key and the date as the value and it may be desirable to avoid scheduling new pods on this node.
func (*NodeLabel) Name ¶
Name returns name of the plugin. It is used in logs, etc.
func (*NodeLabel) Score ¶
func (pl *NodeLabel) Score(ctx context.Context, _ *framework.CycleState, _ *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.
Source Files ¶
node_label.go
- Version
- v1.22.9
- Published
- Apr 13, 2022
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 1 minute ago –
Tools for package owners.