machine

package
v0.0.0-...-03e4ed8 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const NodeNameEnvVar = "NODE_NAME"

Variables

This section is empty.

Functions

func AddWithActuator

func AddWithActuator(mgr manager.Manager, actuator Actuator) error

Types

type Actuator

type Actuator interface {
	// Create the machine.
	Create(context.Context, *clusterv1.Cluster, *clusterv1.Machine) error
	// Delete the machine. If no error is returned, it is assumed that all dependent resources have been cleaned up.
	Delete(context.Context, *clusterv1.Cluster, *clusterv1.Machine) error
	// Update the machine to the provided definition.
	Update(context.Context, *clusterv1.Cluster, *clusterv1.Machine) error
	// Checks if the machine currently exists.
	Exists(context.Context, *clusterv1.Cluster, *clusterv1.Machine) (bool, error)
}

/ Actuator Actuator controls machines on a specific infrastructure. All methods should be idempotent unless otherwise specified.

var DefaultActuator Actuator

type ReconcileMachine

type ReconcileMachine struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileMachine reconciles a Machine object

func (*ReconcileMachine) Reconcile

func (r *ReconcileMachine) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Machine object and makes changes based on the state read and what is in the Machine.Spec +kubebuilder:rbac:groups=cluster.k8s.io,resources=machines,verbs=get;list;watch;create;update;patch;delete

type TestActuator

type TestActuator struct {
	BlockOnCreate   bool
	BlockOnDelete   bool
	BlockOnUpdate   bool
	BlockOnExists   bool
	CreateCallCount int64
	DeleteCallCount int64
	UpdateCallCount int64
	ExistsCallCount int64
	ExistsValue     bool
	Lock            sync.Mutex
	// contains filtered or unexported fields
}

func (*TestActuator) Create

func (*TestActuator) Delete

func (*TestActuator) Exists

func (*TestActuator) Unblock

func (a *TestActuator) Unblock()

func (*TestActuator) Update

func (a *TestActuator) Update(ctx context.Context, c *v1alpha1.Cluster, machine *v1alpha1.Machine) error

Jump to

Keyboard shortcuts

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