machine

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderIDPrefix           = "proxmox://"
	VirtualMachineInitializing = "VirtualMachineInitializing"

	VmConfigurationTimeout = time.Minute * 10
	VmMigrationTimeout     = time.Minute * 10
	VmCloneTimeout         = time.Minute * 5
	VmStartTimeout         = time.Minute * 10
	VmStopTimeout          = time.Minute * 10
	VmDeleteTimeout        = time.Minute * 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapSecret

type BootstrapSecret struct {
	RunCmd []string        `yaml:"runcmd"`
	Users  []BootstrapUser `yaml:"users,omitempty"`
	// TODO: Not sure why we need the underscore in the property name
	Write_Files []BootstrapSecretFile `yaml:"write_files"`
}

type BootstrapSecretFile

type BootstrapSecretFile struct {
	Path        string `yaml:"path"`
	Owner       string `yaml:"owner"`
	Permissions string `yaml:"permissions"`
	Content     string `yaml:"content"`
	Encoding    string `yaml:"encoding,omitempty"`
}

type BootstrapUser

type BootstrapUser struct {
	Name                string   `yaml:"name"`
	Lock_Passwd         bool     `yaml:"lock_passwd"`
	Sudo                string   `yaml:"sudo"`
	Groups              []string `yaml:"groups"`
	Ssh_Authorized_Keys []string `yaml:"ssh_authorized_keys"`
}

type Machine

type Machine struct {
	ProxmoxClient *proxmox.Client
	MachineScope  *scope.MachineScope
	ClusterScope  *scope.ClusterScope
	Logger        logr.Logger
	client.Client
	Recorder record.EventRecorder
}

Represents a requested Machine scope

func (*Machine) Reconcile

func (m *Machine) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

TODO: Remove a requirement for Cluster setup. Folks should be able to run ClusterAPI on a single proxmox instance

type RandomNodeGroupSelector

type RandomNodeGroupSelector struct{}

func (*RandomNodeGroupSelector) Select

func (rng *RandomNodeGroupSelector) Select(nodes proxmox.NodeStatuses) (*proxmox.NodeStatus, error)

type Selector

type Selector interface {
	Select(nodes proxmox.NodeStatuses) (*proxmox.NodeStatus, error)
}

Jump to

Keyboard shortcuts

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