Documentation ¶
Index ¶
- func GetCondition(n *corev1.Node, match corev1.NodeConditionType) corev1.NodeCondition
- func GetNodeClaims(ctx context.Context, node *corev1.Node, kubeClient client.Client) ([]*v1.NodeClaim, error)
- func GetPods(ctx context.Context, kubeClient client.Client, nodes ...*corev1.Node) ([]*corev1.Pod, error)
- func GetProvisionablePods(ctx context.Context, kubeClient client.Client) ([]*corev1.Pod, error)
- func GetReschedulablePods(ctx context.Context, kubeClient client.Client, nodes ...*corev1.Node) ([]*corev1.Pod, error)
- func GetVolumeAttachments(ctx context.Context, kubeClient client.Client, node *corev1.Node) ([]*storagev1.VolumeAttachment, error)
- func IgnoreDuplicateNodeClaimError(err error) error
- func IgnoreNodeClaimNotFoundError(err error) error
- func IsDuplicateNodeClaimError(err error) bool
- func IsNodeClaimNotFoundError(err error) bool
- func NodeClaimForNode(ctx context.Context, c client.Client, node *corev1.Node) (*v1.NodeClaim, error)
- type DuplicateNodeClaimError
- type NodeClaimNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCondition ¶
func GetCondition(n *corev1.Node, match corev1.NodeConditionType) corev1.NodeCondition
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
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 IgnoreNodeClaimNotFoundError ¶ added in v1.0.0
func IsDuplicateNodeClaimError ¶ added in v1.0.0
func IsNodeClaimNotFoundError ¶ added in v1.0.0
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:
- No corev1.Nodes match the v1.NodeClaim providerID
- 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