clusterapi

package
v2.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldEvacuateNode

func ShouldEvacuateNode(machine *Machine) bool

ShouldEvacuateNode returns true if the machine is being deleted

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cl client.Client) *Client

func NewClientForConfig

func NewClientForConfig(cfg *rest.Config) (*Client, error)

func (*Client) AllowMachineDrain

func (cl *Client) AllowMachineDrain(ctx context.Context, machine *Machine) error

AllowMachineDrain removes the annotation that prevents draining the Node.

func (*Client) AllowMachineTermination

func (cl *Client) AllowMachineTermination(ctx context.Context, machine *Machine) error

AllowMachineTermination removes the annotation that prevents removal of the Node.

func (*Client) GetMachineForNode

func (cl *Client) GetMachineForNode(ctx context.Context, node *corev1.Node) (*Machine, error)

GetMachineForNode tries to get the Machine that controls the Node. Returns "nil, nil" if: * ClusterAPI is not deployed in this cluster * the Node is not managed by ClusterAPI * the Machine could not be found

func (*Client) PreventMachineDeletion

func (cl *Client) PreventMachineDeletion(ctx context.Context, machine *Machine) error

PreventMachineDeletion sets hooks that prevent ClusterAPI from terminating the node and thus the Satellite. The hooks are only set when the Machine is not already in the process of being deleted.

type Machine

type Machine = clusterapiv1beta1.Machine

Jump to

Keyboard shortcuts

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