Documentation ¶
Index ¶
- func GetCondition(n *corev1.Node, match corev1.NodeConditionType) corev1.NodeCondition
- func GetNodeClaims(ctx context.Context, kubeClient client.Client, node *corev1.Node) ([]*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 IsManaged(node *corev1.Node, cp cloudprovider.CloudProvider) bool
- func IsManagedPredicateFuncs(cp cloudprovider.CloudProvider) predicate.Funcs
- func IsNodeClaimNotFoundError(err error) bool
- func NodeClaimEventHandler(c client.Client) handler.EventHandler
- 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, 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
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 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 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:
- No v1.NodeClaims match the corev1.Node's providerID
- 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