infrastructure

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 30 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 JobProvisioner added in v0.9.6

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

func (*JobProvisioner) Cleanup added in v0.9.6

func (*JobProvisioner) Provision added in v0.9.6

func (p *JobProvisioner) Provision(ctx context.Context) error

type Provisioner

type Provisioner interface {
	Provision(ctx context.Context) error
	Cleanup(ctx context.Context, mode RemoteMachineMode) error
}

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
)

type SSHProvisioner added in v0.9.6

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

func (*SSHProvisioner) Cleanup added in v0.9.6

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 (*SSHProvisioner) Provision added in v0.9.6

func (p *SSHProvisioner) 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

Jump to

Keyboard shortcuts

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