package nodeports

import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports"

Index

Constants

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"
)

Functions

func Fits

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

Fits checks if the pod fits the node.

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

func (pl *NodePorts) EventsToRegister(_ context.Context) ([]framework.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 *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.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

func (pl *NodePorts) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)

PreFilter invoked at the prefilter extension point.

func (*NodePorts) PreFilterExtensions

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

PreFilterExtensions do not exist for this plugin.

Source Files

node_ports.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
3 hours ago

Tools for package owners.