nodeports

package
v1.35.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 9 Imported by: 13

Documentation

Index

Constants

View Source
const (
	// Name is the name of the plugin used in the plugin registry and configurations.
	Name = names.NodePorts

	// ErrReason when node ports aren't available.
	ErrReason = "node(s) didn't have free ports for the requested pod ports"
)

Variables

This section is empty.

Functions

func Fits added in v1.18.0

func Fits(pod *v1.Pod, nodeInfo fwk.NodeInfo) bool

Fits checks if the pod has any ports conflicting with nodeInfo's ports. It returns true if there are no conflicts (which means that pod fits the node), otherwise false.

func New

New initializes a new plugin and returns it.

Types

type NodePorts

type NodePorts struct {
	// contains filtered or unexported fields
}

NodePorts is a plugin that checks if a node has free ports for the requested pod ports.

func (*NodePorts) EventsToRegister added in v1.22.0

func (pl *NodePorts) EventsToRegister(_ context.Context) ([]fwk.ClusterEventWithHint, error)

EventsToRegister returns the possible events that may make a Pod failed by this plugin schedulable.

func (*NodePorts) Filter

func (pl *NodePorts) Filter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) *fwk.Status

Filter invoked at the filter extension point.

func (*NodePorts) Name

func (pl *NodePorts) Name() string

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

func (*NodePorts) PreFilter added in v1.18.0

func (pl *NodePorts) PreFilter(ctx context.Context, cycleState fwk.CycleState, pod *v1.Pod, nodes []fwk.NodeInfo) (*fwk.PreFilterResult, *fwk.Status)

PreFilter invoked at the prefilter extension point.

func (*NodePorts) PreFilterExtensions added in v1.18.0

func (pl *NodePorts) PreFilterExtensions() fwk.PreFilterExtensions

PreFilterExtensions do not exist for this plugin.

func (*NodePorts) SignPod

func (pl *NodePorts) SignPod(ctx context.Context, pod *v1.Pod) ([]fwk.SignFragment, *fwk.Status)

NodePort feasibility and scheduling is based on the host ports for the containers.

Jump to

Keyboard shortcuts

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