machine

package
v0.0.0-...-655af17 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultBootstrapTokenTTL default ttl for bootstrap token
	DefaultBootstrapTokenTTL = 10 * time.Minute

	// MachineRegionLabelName as annotation name for a machine region
	MachineRegionLabelName = "machine.openshift.io/region"

	// MachineAZLabelName as annotation name for a machine AZ
	MachineAZLabelName = "machine.openshift.io/zone"

	// MachineInstanceStateAnnotationName as annotation name for a machine instance state
	MachineInstanceStateAnnotationName = "machine.openshift.io/instance-state"

	// MachineInstanceTypeLabelName as annotation name for a machine instance type
	MachineInstanceTypeLabelName = "machine.openshift.io/instance-type"

	MachineSetLabelName = "machine.openshift.io/cluster-api-machineset"
)

Variables

This section is empty.

Functions

func StubAzureCredentialsSecret

func StubAzureCredentialsSecret() *corev1.Secret

Types

type Actuator

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

Actuator is responsible for performing machine reconciliation.

func NewActuator

func NewActuator(params ActuatorParams) *Actuator

NewActuator returns an actuator.

func (*Actuator) Create

func (a *Actuator) Create(ctx context.Context, machine *machinev1.Machine) error

Create creates a machine and is invoked by the machine controller.

func (*Actuator) Delete

func (a *Actuator) Delete(ctx context.Context, machine *machinev1.Machine) error

Delete deletes a machine and is invoked by the Machine Controller.

func (*Actuator) Exists

func (a *Actuator) Exists(ctx context.Context, machine *machinev1.Machine) (bool, error)

Exists test for the existence of a machine and is invoked by the Machine Controller

func (*Actuator) Update

func (a *Actuator) Update(ctx context.Context, machine *machinev1.Machine) error

Update updates a machine and is invoked by the Machine Controller. If the Update attempts to mutate any immutable state, the method will error and no updates will be performed.

type ActuatorParams

type ActuatorParams struct {
	CoreClient                   controllerclient.Client
	EventRecorder                record.EventRecorder
	ReconcilerBuilder            func(scope *actuators.MachineScope) *Reconciler
	AzureWorkloadIdentityEnabled bool
}

ActuatorParams holds parameter information for Actuator.

type Reconciler

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

Reconciler are list of services required by cluster actuator, easy to create a fake

func NewReconciler

func NewReconciler(scope *actuators.MachineScope) *Reconciler

NewReconciler populates all the services based on input scope

func (*Reconciler) Create

func (s *Reconciler) Create(ctx context.Context) error

Create creates machine if and only if machine exists, handled by cluster-api

func (*Reconciler) CreateMachine

func (s *Reconciler) CreateMachine(ctx context.Context) error

CreateMachine creates machine if and only if machine exists, handled by cluster-api

func (*Reconciler) Delete

func (s *Reconciler) Delete(ctx context.Context) error

Delete reconciles all the services in pre determined order

func (*Reconciler) Exists

func (s *Reconciler) Exists(ctx context.Context) (bool, error)

Exists checks if machine exists

func (*Reconciler) Update

func (s *Reconciler) Update(ctx context.Context) error

Update updates machine if and only if machine exists, handled by cluster-api

Jump to

Keyboard shortcuts

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