nodelabel

package
v1.17.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "NodeLabel"

Name of this plugin.

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type Args

type Args struct {
	// The list of labels that identify node "groups"
	// All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod
	Labels []string `json:"labels,omitempty"`
	// The boolean flag that indicates whether the labels should be present or absent from the node
	Presence bool `json:"presence,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) Name

func (pl *NodeLabel) Name() string

Name returns name of the plugin. It is used in logs, etc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL