Documentation ¶
Index ¶
- type CommandExecutor
- type DefaultMachineFactory
- type Machine
- func (m *Machine) Address() string
- func (m *Machine) Create(ctx gocontext.Context) error
- func (m *Machine) Delete() error
- func (m *Machine) DrainNodeIfNeeded(wrkldClstr workloadcluster.WorkloadCluster) (time.Duration, error)
- func (m *Machine) Exists() bool
- func (m *Machine) GenerateProviderID() (string, error)
- func (m *Machine) GetVMNotReadyReason() (reason string, message string)
- func (m *Machine) IsBootstrapped() bool
- func (m *Machine) IsBootstrappedWithSSH() bool
- func (m *Machine) IsLiveMigratable() (bool, string, string, error)
- func (m *Machine) IsReady() bool
- func (m *Machine) IsTerminal() (bool, string, error)
- func (m *Machine) SupportsCheckingIsBootstrapped() bool
- type MachineFactory
- type MachineInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutor ¶
type DefaultMachineFactory ¶
type DefaultMachineFactory struct { }
DefaultMachineFactory is the default implementation of MachineFactory
func (DefaultMachineFactory) NewMachine ¶
func (defaultMachineFactory DefaultMachineFactory) NewMachine(ctx *context.MachineContext, client client.Client, namespace string, sshKeys *ssh.ClusterNodeSshKeys) (MachineInterface, error)
NewMachine creates a new kubevirt.machine
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
Machine implement a service for managing the KubeVirt VM hosting a kubernetes node.
func NewMachine ¶
func NewMachine(ctx *context.MachineContext, client client.Client, namespace string, sshKeys *ssh.ClusterNodeSshKeys) (*Machine, error)
NewMachine returns a new Machine service for the given context.
func (*Machine) DrainNodeIfNeeded ¶ added in v0.1.8
func (m *Machine) DrainNodeIfNeeded(wrkldClstr workloadcluster.WorkloadCluster) (time.Duration, error)
func (*Machine) GenerateProviderID ¶
GenerateProviderID generates the KubeVirt provider ID to be used for the NodeRef
func (*Machine) GetVMNotReadyReason ¶ added in v0.1.9
func (*Machine) IsBootstrapped ¶
IsBootstrapped checks if the VM is bootstrapped with Kubernetes.
func (*Machine) IsBootstrappedWithSSH ¶ added in v0.1.7
IsBootstrappedWithSSH checks if the VM is bootstrapped with Kubernetes using SSH strategy.
func (*Machine) IsLiveMigratable ¶ added in v0.1.9
IsLiveMigratable reports back the live-migratability state of the VM: Status, Reason and Message
func (*Machine) IsTerminal ¶
IsTerminal Reports back if the VM is either being requested to terminate or is terminated in a way that it will never recover from.
func (*Machine) SupportsCheckingIsBootstrapped ¶
SupportsCheckingIsBootstrapped checks if we have a method of checking that this bootstrapper has completed.
type MachineFactory ¶
type MachineFactory interface { // NewMachine returns a new Machine service for the given context. NewMachine(ctx *context.MachineContext, client client.Client, namespace string, sshKeys *ssh.ClusterNodeSshKeys) (MachineInterface, error) }
type MachineInterface ¶
type MachineInterface interface { // Create creates a new VM for this machine. Create(ctx gocontext.Context) error // Delete deletes VM for this machine. Delete() error // Exists checks if the VM has been provisioned already. Exists() bool // IsReady checks if the VM is ready IsReady() bool // IsLiveMigratable reports back the live-migratability state of the VM: Status, Reason and Message IsLiveMigratable() (bool, string, string, error) // Address returns the IP address of the VM. Address() string // SupportsCheckingIsBootstrapped checks if we have a method of checking // that this bootstrapper has completed. SupportsCheckingIsBootstrapped() bool // IsBootstrapped checks if the VM is bootstrapped with Kubernetes. IsBootstrapped() bool // GenerateProviderID generates the KubeVirt provider ID to be used for the NodeRef GenerateProviderID() (string, error) // IsTerminal reports back if a VM is in a permanent terminal state IsTerminal() (bool, string, error) DrainNodeIfNeeded(workloadcluster.WorkloadCluster) (time.Duration, error) // GetVMUnscheduledReason returns the reason and message for the condition, if the VM is not ready GetVMNotReadyReason() (string, string) }