machine

package
v0.27.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventHandler added in v0.27.1

func EventHandler(ctx context.Context, c client.Client) handler.EventHandler

EventHandler is a watcher on v1alpha5.Machine that maps Machines to Nodes based on provider ids and enqueues reconcile.Requests for the Nodes

func IgnoreDuplicateNodeError added in v0.27.1

func IgnoreDuplicateNodeError(err error) error

func IgnoreNodeNotFoundError added in v0.27.1

func IgnoreNodeNotFoundError(err error) error

func IsDuplicateNodeError added in v0.27.1

func IsDuplicateNodeError(err error) bool

func IsNodeNotFoundError added in v0.27.1

func IsNodeNotFoundError(err error) bool

func New

func New(node *v1.Node, provisioner *v1alpha5.Provisioner) *v1alpha5.Machine

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 NewFromNode

func NewFromNode(node *v1.Node) *v1alpha5.Machine

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 NodeEventHandler added in v0.27.1

func NodeEventHandler(ctx context.Context, 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:

  1. No v1.Nodes match the v1alpha5.Machine providerID
  2. Multiple v1.Nodes match the v1alpha5.Machine providerID

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL