node

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

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, node *corev1.Node, kubeClient client.Client) ([]*v1.NodeClaim, error)

GetNodeClaims grabs nodeClaim owner for the 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 IsNodeClaimNotFoundError added in v1.0.0

func IsNodeClaimNotFoundError(err error) bool

func NodeClaimForNode added in v1.0.0

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

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

  1. No corev1.Nodes match the v1.NodeClaim providerID
  2. Multiple corev1.Nodes match the v1.NodeClaim 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