node

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeClaims added in v1.0.0

func GetNodeClaims(ctx context.Context, kubeClient client.Client, node *corev1.Node) ([]*v1.NodeClaim, error)

GetNodeClaims grabs all NodeClaims with a providerID that matches the provided Node

func GetPods added in v0.34.0

func GetPods(ctx context.Context, kubeClient client.Client, nodes ...*corev1.Node) ([]*corev1.Pod, error)

GetPods grabs all pods that are currently bound to the passed nodes

func GetProvisionablePods added in v0.34.0

func GetProvisionablePods(ctx context.Context, kubeClient client.Client) ([]*corev1.Pod, error)

GetProvisionablePods grabs all the pods from the passed nodes that satisfy the IsProvisionable criteria

func GetReschedulablePods added in v0.34.0

func GetReschedulablePods(ctx context.Context, kubeClient client.Client, nodes ...*corev1.Node) ([]*corev1.Pod, error)

GetReschedulablePods grabs all pods from the passed nodes that satisfy the IsReschedulable criteria

func GetVolumeAttachments added in v1.0.0

func GetVolumeAttachments(ctx context.Context, kubeClient client.Client, node *corev1.Node) ([]*storagev1.VolumeAttachment, error)

GetVolumeAttachments grabs all volumeAttachments associated with the passed node

func IgnoreDuplicateNodeClaimError added in v1.0.0

func IgnoreDuplicateNodeClaimError(err error) error

func IgnoreNodeClaimNotFoundError added in v1.0.0

func IgnoreNodeClaimNotFoundError(err error) error

func IsDuplicateNodeClaimError added in v1.0.0

func IsDuplicateNodeClaimError(err error) bool

func IsManaged added in v1.1.0

func IsManaged(node *corev1.Node, cp cloudprovider.CloudProvider) bool

func IsManagedPredicateFuncs added in v1.1.0

func IsManagedPredicateFuncs(cp cloudprovider.CloudProvider) predicate.Funcs

IsManagedPredicateFuncs is used to filter controller-runtime NodeClaim watches to NodeClaims managed by the given cloudprovider.

func IsNodeClaimNotFoundError added in v1.0.0

func IsNodeClaimNotFoundError(err error) bool

func NodeClaimEventHandler added in v1.1.0

func NodeClaimEventHandler(c client.Client) handler.EventHandler

func NodeClaimForNode added in v1.0.0

func NodeClaimForNode(ctx context.Context, c client.Client, node *corev1.Node) (*v1.NodeClaim, error)

NodeClaimForNode is a helper function that takes a corev1.Node and attempts to find the matching v1.NodeClaim by its providerID This function will return errors if:

  1. No v1.NodeClaims match the corev1.Node's providerID
  2. Multiple v1.NodeClaims match the corev1.Node's providerID

Types

type DuplicateNodeClaimError added in v1.0.0

type DuplicateNodeClaimError struct {
	ProviderID string
}

DuplicateNodeClaimError is an error returned when multiple v1.NodeClaims are found matching the passed providerID

func (*DuplicateNodeClaimError) Error added in v1.0.0

func (e *DuplicateNodeClaimError) Error() string

type NodeClaimNotFoundError added in v1.0.0

type NodeClaimNotFoundError struct {
	ProviderID string
}

NodeClaimNotFoundError is an error returned when no v1.NodeClaims are found matching the passed providerID

func (*NodeClaimNotFoundError) Error added in v1.0.0

func (e *NodeClaimNotFoundError) Error() string

Jump to

Keyboard shortcuts

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