infrastructure

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPooledMachineNotFound = fmt.Errorf("free pooled machine not found")

Functions

This section is empty.

Types

type ClusterController

type ClusterController struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*ClusterController) Reconcile

func (r *ClusterController) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)

func (*ClusterController) SetupWithManager

func (r *ClusterController) SetupWithManager(mgr ctrl.Manager) error

type Provisioner

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

func (*Provisioner) Cleanup added in v0.8.0

func (p *Provisioner) Cleanup(_ context.Context, mode RemoteMachineMode) error

Cleanup cleans up a machine The provisioning process is as follows: 1. Open SSH connection to the machine 2. Stops k0s 3. Removes node from etcd 4. Runs k0s reset

func (*Provisioner) Provision

func (p *Provisioner) Provision(_ context.Context) error

Provision provisions a new machine The provisioning process is as follows: 1. Open SSH connection to the machine 2. Execute the bootstrap script 3. Check sentinel file at /run/cluster-api/bootstrap-success.complete 4. success

type RemoteMachineController

type RemoteMachineController struct {
	client.Client
	Scheme     *runtime.Scheme
	ClientSet  *kubernetes.Clientset
	RESTConfig *rest.Config
}

func (*RemoteMachineController) Reconcile

func (r *RemoteMachineController) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)

func (*RemoteMachineController) SetupWithManager

func (r *RemoteMachineController) SetupWithManager(mgr ctrl.Manager) error

type RemoteMachineMode added in v0.8.0

type RemoteMachineMode int
const (
	RemoteMachineFinalizer = "remotemachine.k0smotron.io/finalizer"

	ModeController RemoteMachineMode = iota
	ModeWorker
	ModeNonK0s
)

Jump to

Keyboard shortcuts

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