nodes

package
v0.0.0-...-1e4a09a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodesSelector string

NodesSelector represent the label selector used to filter impacted nodes.

Functions

func ExecAndLogCommand

func ExecAndLogCommand(logCommand bool, timeout time.Duration, name string, arg ...string) ([]byte, error)

func IsNodeReachable

func IsNodeReachable(nodeName string) bool

func IsSingleNodeCluster

func IsSingleNodeCluster() (bool, error)

func LabelNode

func LabelNode(nodeName, key, value string) (*corev1.Node, error)

func LabeledNodesCount

func LabeledNodesCount(label string) (int, error)

LabeledNodesCount return the number of nodes with the given label.

func MatchingOptionalSelectorPTP

func MatchingOptionalSelectorPTP(toFilter []ptpv1.NodePtpDevice) ([]ptpv1.NodePtpDevice, error)

MatchingOptionalSelectorPTP filter the given slice with only the nodes matching the optional selector. If no selector is set, it returns the same list. The NODES_SELECTOR must be set with a labelselector expression. For example: NODES_SELECTOR="sctp=true"

func RebootNode

func RebootNode(pod corev1.Pod, nodeName string)

func WaitForNodeReachability

func WaitForNodeReachability(nodeName string, timeout time.Duration, expectedReachabilityStatus bool)

expectedReachabilityStatus true means test if the node is reachable, false means test if the node is unreachable

Types

type NodeTopology

type NodeTopology struct {
	NodeName      string
	InterfaceList []string
	NodeObject    *corev1.Node
}

func PtpEnabled

func PtpEnabled(aclient *client.ClientSet) ([]*NodeTopology, error)

PtpEnabled returns the topology of a given node, filtering using the given selector.

Jump to

Keyboard shortcuts

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