Documentation ¶
Index ¶
- func AllNodesForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1.NodeClaim) ([]*corev1.Node, error)
- func ForNodeClass(nodeClass status.Object) client.ListOption
- func ForNodePool(nodePoolName string) client.ListOption
- func ForProviderID(providerID string) client.ListOption
- func IgnoreDuplicateNodeError(err error) error
- func IgnoreNodeNotFoundError(err error) error
- func IsDuplicateNodeError(err error) bool
- func IsManaged(nodeClaim *v1.NodeClaim, cp cloudprovider.CloudProvider) bool
- func IsManagedPredicateFuncs(cp cloudprovider.CloudProvider) predicate.Funcs
- func IsNodeNotFoundError(err error) bool
- func ListManaged(ctx context.Context, c client.Client, ...) ([]*v1.NodeClaim, error)
- func NodeClassEventHandler(c client.Client) handler.EventHandler
- func NodeEventHandler(c client.Client, cloudProvider cloudprovider.CloudProvider) handler.EventHandler
- func NodeForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1.NodeClaim) (*corev1.Node, error)
- func NodePoolEventHandler(c client.Client, cloudProvider cloudprovider.CloudProvider) handler.EventHandler
- func PodEventHandler(c client.Client, cloudProvider cloudprovider.CloudProvider) handler.EventHandler
- func UpdateNodeOwnerReferences(nodeClaim *v1.NodeClaim, node *corev1.Node) *corev1.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 *v1.NodeClaim) ([]*corev1.Node, error)
AllNodesForNodeClaim is a helper function that takes a v1.NodeClaim and finds ALL matching corev1.Nodes by their providerID If the providerID is not resolved for a NodeClaim, then no Nodes will map to it
func ForNodeClass ¶ added in v1.1.0
func ForNodeClass(nodeClass status.Object) client.ListOption
func ForNodePool ¶ added in v1.1.0
func ForNodePool(nodePoolName string) client.ListOption
func ForProviderID ¶ added in v1.1.0
func ForProviderID(providerID string) client.ListOption
func IgnoreNodeNotFoundError ¶
func IsDuplicateNodeError ¶
func IsManaged ¶ added in v1.1.0
func IsManaged(nodeClaim *v1.NodeClaim, 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 IsNodeNotFoundError ¶
func ListManaged ¶ added in v1.1.0
func ListManaged(ctx context.Context, c client.Client, cloudProvider cloudprovider.CloudProvider, opts ...client.ListOption) ([]*v1.NodeClaim, error)
func NodeClassEventHandler ¶ added in v0.36.0
func NodeClassEventHandler(c client.Client) handler.EventHandler
NodeClassEventHandler is a watcher on v1.NodeClaim that maps NodeClass to NodeClaims based on the nodeClassRef and enqueues reconcile.Requests for the NodeClaim
func NodeEventHandler ¶
func NodeEventHandler(c client.Client, cloudProvider cloudprovider.CloudProvider) handler.EventHandler
NodeEventHandler is a watcher on corev1.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 *v1.NodeClaim) (*corev1.Node, 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
func NodePoolEventHandler ¶
func NodePoolEventHandler(c client.Client, cloudProvider cloudprovider.CloudProvider) handler.EventHandler
NodePoolEventHandler is a watcher on v1.NodeClaim that maps NodePool to NodeClaims based on the v1.NodePoolLabelKey and enqueues reconcile.Requests for the NodeClaim
func PodEventHandler ¶
func PodEventHandler(c client.Client, cloudProvider cloudprovider.CloudProvider) handler.EventHandler
PodEventHandler is a watcher on corev1.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 corev1.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 corev1.Nodes are found matching the passed providerID
func (*NodeNotFoundError) Error ¶
func (e *NodeNotFoundError) Error() string