Documentation ¶
Index ¶
- func AllNodesForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) ([]*v1.Node, error)
- func IgnoreDuplicateNodeError(err error) error
- func IgnoreNodeNotFoundError(err error) error
- func IsDuplicateNodeError(err error) bool
- func IsNodeNotFoundError(err error) bool
- func NewFromNode(node *v1.Node) *v1beta1.NodeClaim
- func NodeEventHandler(c client.Client) handler.EventHandler
- func NodeForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) (*v1.Node, error)
- func NodePoolEventHandler(c client.Client) handler.EventHandler
- func PodEventHandler(c client.Client) handler.EventHandler
- func UpdateNodeOwnerReferences(nodeClaim *v1beta1.NodeClaim, node *v1.Node) *v1.Node
- type DuplicateNodeError
- type NodeNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllNodesForNodeClaim ¶
func AllNodesForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) ([]*v1.Node, error)
AllNodesForNodeClaim is a helper function that takes a v1beta1.NodeClaim and finds ALL matching v1.Nodes by their providerID If the providerID is not resolved for a NodeClaim, then no Nodes will map to it
func IgnoreNodeNotFoundError ¶
func IsDuplicateNodeError ¶
func IsNodeNotFoundError ¶
func NewFromNode ¶
NewFromNode converts a node into a pseudo-NodeClaim using known values from the node Deprecated: This NodeClaim generator function can be removed when v1beta1 migration has completed.
func NodeEventHandler ¶
func NodeEventHandler(c client.Client) handler.EventHandler
NodeEventHandler is a watcher on v1.Node that maps Nodes to NodeClaims based on provider ids and enqueues reconcile.Requests for the NodeClaims
func NodeForNodeClaim ¶
func NodeForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) (*v1.Node, error)
NodeForNodeClaim is a helper function that takes a v1beta1.NodeClaim and attempts to find the matching v1.Node by its providerID This function will return errors if:
- No v1.Nodes match the v1beta1.NodeClaim providerID
- Multiple v1.Nodes match the v1beta1.NodeClaim providerID
func NodePoolEventHandler ¶
func NodePoolEventHandler(c client.Client) handler.EventHandler
NodePoolEventHandler is a watcher on v1beta1.NodeClaim that maps Provisioner to NodeClaims based on the v1beta1.NodePoolLabelKey and enqueues reconcile.Requests for the NodeClaim
func PodEventHandler ¶
func PodEventHandler(c client.Client) handler.EventHandler
PodEventHandler is a watcher on v1.Pods that maps Pods to NodeClaim based on the node names and enqueues reconcile.Requests for the NodeClaims
Types ¶
type DuplicateNodeError ¶
type DuplicateNodeError struct {
ProviderID string
}
DuplicateNodeError is an error returned when multiple v1.Nodes are found matching the passed providerID
func (*DuplicateNodeError) Error ¶
func (e *DuplicateNodeError) Error() string
type NodeNotFoundError ¶
type NodeNotFoundError struct {
ProviderID string
}
NodeNotFoundError is an error returned when no v1.Nodes are found matching the passed providerID
func (*NodeNotFoundError) Error ¶
func (e *NodeNotFoundError) Error() string