machine

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultProvider

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

func NewDefaultProvider

func NewDefaultProvider(_ context.Context, kubeClient client.Client) *DefaultProvider

func (*DefaultProvider) AddDeleteAnnotation

func (p *DefaultProvider) AddDeleteAnnotation(ctx context.Context, machine *capiv1beta1.Machine) error

AddDeleteAnnotation adds the Cluster API deletion annotation to a Machine resource and updates the API server. It returns an error if there is a failure.

func (*DefaultProvider) Get

func (p *DefaultProvider) Get(ctx context.Context, providerID string) (*capiv1beta1.Machine, error)

Get returns the Machine indicated by the supplied Provider ID or nil if not found. Because Get is used with a provider ID, it may return a Machine that does not have a label for node pool membership.

func (*DefaultProvider) IsDeleting

func (p *DefaultProvider) IsDeleting(machine *capiv1beta1.Machine) bool

IsDeleting returns true if the supplied Machine has a non-zero deletion timestamp.

func (*DefaultProvider) List

func (*DefaultProvider) RemoveDeleteAnnotation

func (p *DefaultProvider) RemoveDeleteAnnotation(ctx context.Context, machine *capiv1beta1.Machine) error

RemoveDeleteAnnotation removes the Cluster API deletion annotation from a Machine resource and updates the API server. It returns an error if there is a failure.

func (*DefaultProvider) Update

func (p *DefaultProvider) Update(ctx context.Context, machine *capiv1beta1.Machine) error

type Provider

type Provider interface {
	Get(context.Context, string) (*capiv1beta1.Machine, error)
	List(context.Context, *metav1.LabelSelector) ([]*capiv1beta1.Machine, error)
	IsDeleting(*capiv1beta1.Machine) bool
	AddDeleteAnnotation(context.Context, *capiv1beta1.Machine) error
	RemoveDeleteAnnotation(context.Context, *capiv1beta1.Machine) error
	Update(context.Context, *capiv1beta1.Machine) error
}

Jump to

Keyboard shortcuts

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