Documentation
¶
Index ¶
- func AllNodesForMachine(ctx context.Context, c client.Client, machine *v1alpha5.Machine) ([]*v1.Node, error)
- func IgnoreDuplicateNodeError(err error) error
- func IgnoreNodeNotFoundError(err error) error
- func IsDuplicateNodeError(err error) bool
- func IsNodeNotFoundError(err error) bool
- func New(node *v1.Node, provisioner *v1alpha5.Provisioner) *v1alpha5.Machine
- func NewConditions(conds apis.Conditions) apis.Conditions
- func NewFromNode(node *v1.Node) *v1alpha5.Machine
- func NewFromNodeClaim(nodeClaim *v1beta1.NodeClaim) *v1alpha5.Machine
- func NewKubeletConfiguration(kc *v1beta1.KubeletConfiguration) *v1alpha5.KubeletConfiguration
- func NewMachineTemplateRef(ncr *v1beta1.NodeClassReference) *v1alpha5.MachineTemplateRef
- func NodeEventHandler(c client.Client) handler.EventHandler
- func NodeForMachine(ctx context.Context, c client.Client, machine *v1alpha5.Machine) (*v1.Node, error)
- func PodEventHandler(c client.Client) handler.EventHandler
- func ProvisionerEventHandler(c client.Client) handler.EventHandler
- type DuplicateNodeError
- type NodeNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllNodesForMachine ¶ added in v0.27.3
func AllNodesForMachine(ctx context.Context, c client.Client, machine *v1alpha5.Machine) ([]*v1.Node, error)
AllNodesForMachine is a helper function that takes a v1alpha5.Machine and finds ALL matching v1.Nodes by their providerID If the providerID is not resolved for a Machine, then no Nodes will map to it
func IgnoreDuplicateNodeError ¶ added in v0.27.1
func IgnoreNodeNotFoundError ¶ added in v0.27.1
func IsDuplicateNodeError ¶ added in v0.27.1
func IsNodeNotFoundError ¶ added in v0.27.1
func New ¶
New converts a node into a Machine using known values from the node and provisioner spec values Deprecated: This Machine generator function can be removed when v1beta1 migration has completed.
func NewConditions ¶ added in v0.30.0
func NewConditions(conds apis.Conditions) apis.Conditions
func NewFromNode ¶
NewFromNode converts a node into a pseudo-Machine using known values from the node Deprecated: This Machine generator function can be removed when v1beta1 migration has completed.
func NewFromNodeClaim ¶ added in v0.30.0
func NewKubeletConfiguration ¶ added in v0.30.0
func NewKubeletConfiguration(kc *v1beta1.KubeletConfiguration) *v1alpha5.KubeletConfiguration
func NewMachineTemplateRef ¶ added in v0.30.0
func NewMachineTemplateRef(ncr *v1beta1.NodeClassReference) *v1alpha5.MachineTemplateRef
func NodeEventHandler ¶ added in v0.27.1
func NodeEventHandler(c client.Client) handler.EventHandler
NodeEventHandler is a watcher on v1.Node that maps Nodes to Machines based on provider ids and enqueues reconcile.Requests for the Machines
func NodeForMachine ¶ added in v0.27.1
func NodeForMachine(ctx context.Context, c client.Client, machine *v1alpha5.Machine) (*v1.Node, error)
NodeForMachine is a helper function that takes a v1alpha5.Machine and attempts to find the matching v1.Node by its providerID This function will return errors if:
- No v1.Nodes match the v1alpha5.Machine providerID
- Multiple v1.Nodes match the v1alpha5.Machine providerID
func PodEventHandler ¶ added in v0.29.1
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 Machines
func ProvisionerEventHandler ¶ added in v0.29.1
func ProvisionerEventHandler(c client.Client) handler.EventHandler
ProvisionerEventHandler is a watcher on v1alpha5.Machine that maps Provisioner to Machines based on the v1alpha5.ProvsionerNameLabelKey and enqueues reconcile.Requests for the NodeClaim
Types ¶
type DuplicateNodeError ¶ added in v0.27.1
type DuplicateNodeError struct {
ProviderID string
}
DuplicateNodeError is an error returned when multiple v1.Nodes are found matching the passed providerID
func (*DuplicateNodeError) Error ¶ added in v0.27.1
func (e *DuplicateNodeError) Error() string
type NodeNotFoundError ¶ added in v0.27.1
type NodeNotFoundError struct {
ProviderID string
}
NodeNotFoundError is an error returned when no v1.Nodes are found matching the passed providerID
func (*NodeNotFoundError) Error ¶ added in v0.27.1
func (e *NodeNotFoundError) Error() string