Documentation
¶
Index ¶
- Constants
- Variables
- func PrepareVMNodeAntiAffinitySelectorRequirement(vm *VirtualMachine) k8sv1.NodeSelectorRequirement
- func UpdateAntiAffinityFromVMNode(pod *k8sv1.Pod, vm *VirtualMachine) *k8sv1.Affinity
- type Address
- type Affinity
- type Alias
- type BIOS
- type Ballooning
- type BandWidth
- type Boot
- type BootMenu
- type BootOrder
- type Channel
- type ChannelSource
- type ChannelTarget
- type Clock
- type CloudInitDataSourceNoCloud
- type CloudInitSpec
- type Console
- type ConsoleTarget
- type Devices
- type Disk
- type DiskAuth
- type DiskDriver
- type DiskSecret
- type DiskSource
- type DiskSourceHost
- type DiskTarget
- type DomainSpec
- type Entry
- type FilterRef
- type Graphics
- type Interface
- type InterfaceSource
- type InterfaceTarget
- type LinkState
- type Listen
- type Loader
- type MAC
- type Memory
- type Migration
- type MigrationEvent
- type MigrationHostInfo
- type MigrationList
- func (in *MigrationList) DeepCopy() *MigrationList
- func (in *MigrationList) DeepCopyInto(out *MigrationList)
- func (in *MigrationList) DeepCopyObject() runtime.Object
- func (ml *MigrationList) GetListMeta() meta.List
- func (ml *MigrationList) GetObjectKind() schema.ObjectKind
- func (MigrationList) SwaggerDoc() map[string]string
- func (ml *MigrationList) UnmarshalJSON(data []byte) error
- type MigrationPhase
- type MigrationSpec
- type MigrationStatus
- type Model
- type NVRam
- type OS
- type OSType
- type RandomGenerator
- type ReadOnly
- type SMBios
- type Serial
- type SerialTarget
- type Spice
- type SpiceInfo
- type SyncEvent
- type SysInfo
- type Timer
- type VMCondition
- type VMGraphics
- type VMPhase
- type VMReplicaSetCondition
- type VMReplicaSetConditionType
- type VMReplicaSetSpec
- type VMReplicaSetStatus
- type VMSelector
- type VMSpec
- type VMStatus
- type VMTemplateSpec
- type Video
- type VirtualMachine
- func NewMinimalVM(vmName string) *VirtualMachine
- func NewMinimalVMWithNS(namespace string, vmName string) *VirtualMachine
- func NewVM(name string, uid types.UID) *VirtualMachine
- func NewVMReferenceFromName(name string) *VirtualMachine
- func NewVMReferenceFromNameWithNS(namespace string, name string) *VirtualMachine
- func (in *VirtualMachine) DeepCopy() *VirtualMachine
- func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine)
- func (in *VirtualMachine) DeepCopyObject() runtime.Object
- func (v *VirtualMachine) GetObjectKind() schema.ObjectKind
- func (v *VirtualMachine) GetObjectMeta() metav1.Object
- func (v *VirtualMachine) IsFinal() bool
- func (v *VirtualMachine) IsReady() bool
- func (v *VirtualMachine) IsRunning() bool
- func (VirtualMachine) SwaggerDoc() map[string]string
- func (v *VirtualMachine) UnmarshalJSON(data []byte) error
- type VirtualMachineConditionType
- type VirtualMachineList
- func (in *VirtualMachineList) DeepCopy() *VirtualMachineList
- func (in *VirtualMachineList) DeepCopyInto(out *VirtualMachineList)
- func (in *VirtualMachineList) DeepCopyObject() runtime.Object
- func (vl *VirtualMachineList) GetListMeta() meta.List
- func (vl *VirtualMachineList) GetObjectKind() schema.ObjectKind
- func (VirtualMachineList) SwaggerDoc() map[string]string
- func (vl *VirtualMachineList) UnmarshalJSON(data []byte) error
- type VirtualMachineReplicaSet
- func (in *VirtualMachineReplicaSet) DeepCopy() *VirtualMachineReplicaSet
- func (in *VirtualMachineReplicaSet) DeepCopyInto(out *VirtualMachineReplicaSet)
- func (in *VirtualMachineReplicaSet) DeepCopyObject() runtime.Object
- func (v *VirtualMachineReplicaSet) GetObjectKind() schema.ObjectKind
- func (v *VirtualMachineReplicaSet) GetObjectMeta() metav1.Object
- func (VirtualMachineReplicaSet) SwaggerDoc() map[string]string
- func (v *VirtualMachineReplicaSet) UnmarshalJSON(data []byte) error
- type VirtualMachineReplicaSetList
- func (in *VirtualMachineReplicaSetList) DeepCopy() *VirtualMachineReplicaSetList
- func (in *VirtualMachineReplicaSetList) DeepCopyInto(out *VirtualMachineReplicaSetList)
- func (in *VirtualMachineReplicaSetList) DeepCopyObject() runtime.Object
- func (vl *VirtualMachineReplicaSetList) GetListMeta() meta.List
- func (vl *VirtualMachineReplicaSetList) GetObjectKind() schema.ObjectKind
- func (VirtualMachineReplicaSetList) SwaggerDoc() map[string]string
- func (vl *VirtualMachineReplicaSetList) UnmarshalJSON(data []byte) error
- type Watchdog
Constants ¶
const ( AppLabel string = "kubevirt.io" DomainLabel string = "kubevirt.io/domain" VMUIDLabel string = "kubevirt.io/vmUID" NodeNameLabel string = "kubevirt.io/nodeName" MigrationUIDLabel string = "kubevirt.io/migrationUID" MigrationLabel string = "kubevirt.io/migration" )
const GroupName = "kubevirt.io"
GroupName is the group name use in this package
Variables ¶
var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion is group version used to register these objects
var MigrationGroupVersionKind = schema.GroupVersionKind{Group: GroupName, Version: GroupVersion.Version, Kind: "Migration"}
var VMReplicaSetGroupVersionKind = schema.GroupVersionKind{Group: GroupName, Version: GroupVersion.Version, Kind: "VirtualMachineReplicaSet"}
var VirtualMachineGroupVersionKind = schema.GroupVersionKind{Group: GroupName, Version: GroupVersion.Version, Kind: "VirtualMachine"}
GroupVersionKind
Functions ¶
func PrepareVMNodeAntiAffinitySelectorRequirement ¶ added in v0.0.4
func PrepareVMNodeAntiAffinitySelectorRequirement(vm *VirtualMachine) k8sv1.NodeSelectorRequirement
Given a VM, create a NodeSelectorTerm with anti-affinity for that VM's node. This is useful for the case when a migration away from a node must occur.
func UpdateAntiAffinityFromVMNode ¶ added in v0.0.4
func UpdateAntiAffinityFromVMNode(pod *k8sv1.Pod, vm *VirtualMachine) *k8sv1.Affinity
Given a VM, update all NodeSelectorTerms with anti-affinity for that VM's node. This is useful for the case when a migration away from a node must occur. This method returns the full Affinity structure updated the anti affinity terms
Types ¶
type Address ¶
type Address struct {
Type string `json:"type"`
Domain string `json:"domain"`
Bus string `json:"bus"`
Slot string `json:"slot"`
Function string `json:"function"`
}
func (Address) SwaggerDoc ¶
type Affinity ¶ added in v0.0.4
type Affinity struct {
// Host affinity support
NodeAffinity *k8sv1.NodeAffinity `json:"nodeAffinity,omitempty"`
}
Affinity groups all the affinity rules related to a VM
func (Affinity) SwaggerDoc ¶ added in v0.0.4
type BIOS ¶
type BIOS struct {
}
TODO <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader>
func (BIOS) SwaggerDoc ¶
type Ballooning ¶
type Ballooning struct {
Model string `json:"model"`
}
func (Ballooning) SwaggerDoc ¶
func (Ballooning) SwaggerDoc() map[string]string
type BootMenu ¶
type BootMenu struct {
Enabled bool `json:"enabled,omitempty"`
Timeout *uint `json:"timeout,omitempty"`
}
func (BootMenu) SwaggerDoc ¶
type Channel ¶
type Channel struct {
Type string `json:"type"`
Source ChannelSource `json:"source,omitempty"`
Target *ChannelTarget `json:"target,omitempty"`
}
func (Channel) SwaggerDoc ¶
type ChannelSource ¶
func (ChannelSource) SwaggerDoc ¶
func (ChannelSource) SwaggerDoc() map[string]string
type ChannelTarget ¶
type ChannelTarget struct {
Name string `json:"name,omitempty"`
Type string `json:"type"`
Address string `json:"address,omitempty"`
Port uint `json:"port,omitempty"`
}
func (ChannelTarget) SwaggerDoc ¶
func (ChannelTarget) SwaggerDoc() map[string]string
type CloudInitDataSourceNoCloud ¶ added in v0.0.3
type CloudInitDataSourceNoCloud struct {
// Reference to a k8s secret that contains NoCloud userdata
UserDataSecretRef string `json:"userDataSecretRef,omitempty"`
// The NoCloud cloud-init userdata as a base64 encoded string
UserDataBase64 string `json:"userDataBase64"`
// The NoCloud cloud-init metadata as a base64 encoded string
MetaDataBase64 string `json:"metaDataBase64,omitempty"`
}
http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
func (CloudInitDataSourceNoCloud) SwaggerDoc ¶ added in v0.0.3
func (CloudInitDataSourceNoCloud) SwaggerDoc() map[string]string
type CloudInitSpec ¶ added in v0.0.3
type CloudInitSpec struct {
// Nocloud DataSource
NoCloudData *CloudInitDataSourceNoCloud `json:"nocloud"`
}
Only one of the fields in the CloudInitSpec can be set
func (CloudInitSpec) SwaggerDoc ¶ added in v0.0.3
func (CloudInitSpec) SwaggerDoc() map[string]string
type Console ¶
type Console struct {
Type string `json:"type"`
Target *ConsoleTarget `json:"target,omitempty"`
}
func (Console) SwaggerDoc ¶
type ConsoleTarget ¶
type ConsoleTarget struct {
Type *string `json:"type,omitempty"`
Port *uint `json:"port,omitempty"`
}
func (ConsoleTarget) SwaggerDoc ¶
func (ConsoleTarget) SwaggerDoc() map[string]string
type Devices ¶
type Devices struct {
Emulator string `json:"emulator,omitempty"`
Interfaces []Interface `json:"interfaces,omitempty"`
Channels []Channel `json:"channels,omitempty"`
Video []Video `json:"video,omitempty"`
Graphics []Graphics `json:"graphics,omitempty"`
Ballooning *Ballooning `json:"memballoon,omitempty"`
Disks []Disk `json:"disks,omitempty"`
Serials []Serial `json:"serials,omitempty"`
Consoles []Console `json:"consoles,omitempty"`
Watchdog *Watchdog `json:"watchdog,omitempty"`
}
func (Devices) SwaggerDoc ¶
type Disk ¶
type Disk struct {
Device string `json:"device,omitempty"`
Snapshot string `json:"snapshot,omitempty"`
Type string `json:"type"`
Source DiskSource `json:"source,omitempty"`
Target DiskTarget `json:"target"`
Serial string `json:"serial,omitempty"`
Driver *DiskDriver `json:"driver,omitempty"`
ReadOnly *ReadOnly `json:"readOnly,omitempty"`
Auth *DiskAuth `json:"auth,omitempty"`
CloudInit *CloudInitSpec `json:"cloudinit,omitempty"`
}
func (Disk) SwaggerDoc ¶
type DiskAuth ¶
type DiskAuth struct {
Username string `json:"username"`
Secret *DiskSecret `json:"secret,omitempty"`
}
func (DiskAuth) SwaggerDoc ¶
type DiskDriver ¶
type DiskDriver struct {
Cache string `json:"cache,omitempty"`
ErrorPolicy string `json:"errorPolicy,omitempty"`
IO string `json:"io,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
}
func (DiskDriver) SwaggerDoc ¶
func (DiskDriver) SwaggerDoc() map[string]string
type DiskSecret ¶
func (DiskSecret) SwaggerDoc ¶
func (DiskSecret) SwaggerDoc() map[string]string
type DiskSource ¶
type DiskSource struct {
File string `json:"file,omitempty"`
StartupPolicy string `json:"startupPolicy,omitempty"`
Protocol string `json:"protocol,omitempty"`
Name string `json:"name,omitempty"`
Host *DiskSourceHost `json:"host,omitempty"`
}
func (DiskSource) SwaggerDoc ¶
func (DiskSource) SwaggerDoc() map[string]string
type DiskSourceHost ¶
func (DiskSourceHost) SwaggerDoc ¶
func (DiskSourceHost) SwaggerDoc() map[string]string
type DiskTarget ¶
func (DiskTarget) SwaggerDoc ¶
func (DiskTarget) SwaggerDoc() map[string]string
type DomainSpec ¶
type DomainSpec struct {
Memory Memory `json:"memory"`
Type string `json:"type"`
OS OS `json:"os"`
SysInfo *SysInfo `json:"sysInfo,omitempty"`
Devices Devices `json:"devices"`
Clock *Clock `json:"clock,omitempty"`
}
func NewMinimalDomainSpec ¶
func NewMinimalDomainSpec() *DomainSpec
func (DomainSpec) SwaggerDoc ¶
func (DomainSpec) SwaggerDoc() map[string]string
type Entry ¶
func (Entry) SwaggerDoc ¶
type FilterRef ¶
type FilterRef struct {
Filter string `json:"filter"`
}
func (FilterRef) SwaggerDoc ¶
type Graphics ¶
type Graphics struct {
AutoPort string `json:"autoPort,omitempty"`
DefaultMode string `json:"defaultMode,omitempty"`
Listen Listen `json:"listen,omitempty"`
PasswdValidTo string `json:"passwdValidTo,omitempty"`
Port int32 `json:"port,omitempty"`
TLSPort int `json:"tlsPort,omitempty"`
Type string `json:"type"`
}
func (Graphics) SwaggerDoc ¶
type Interface ¶
type Interface struct {
Address *Address `json:"address,omitempty"`
Type string `json:"type"`
Source InterfaceSource `json:"source"`
Target *InterfaceTarget `json:"target,omitempty"`
Model *Model `json:"model,omitempty"`
MAC *MAC `json:"mac,omitempty"`
BandWidth *BandWidth `json:"bandwidth,omitempty"`
BootOrder *BootOrder `json:"boot,omitempty"`
LinkState *LinkState `json:"link,omitempty"`
FilterRef *FilterRef `json:"filterRef,omitempty"`
Alias *Alias `json:"alias,omitempty"`
}
func (Interface) SwaggerDoc ¶
type InterfaceSource ¶
type InterfaceSource struct {
Network string `json:"network,omitempty"`
Device string `json:"device,omitempty"`
Bridge string `json:"bridge,omitempty"`
}
func (InterfaceSource) SwaggerDoc ¶
func (InterfaceSource) SwaggerDoc() map[string]string
type InterfaceTarget ¶
type InterfaceTarget struct {
Device string `json:"dev"`
}
func (InterfaceTarget) SwaggerDoc ¶
func (InterfaceTarget) SwaggerDoc() map[string]string
type LinkState ¶
type LinkState struct {
State string `json:"state"`
}
func (LinkState) SwaggerDoc ¶
type Listen ¶
type Listen struct {
Type string `json:"type"`
Address string `json:"address,omitempty"`
Network string `json:"network,omitempty"`
}
func (Listen) SwaggerDoc ¶
type Loader ¶
type Loader struct {
}
TODO <bios useserial='yes' rebootTimeout='0'/>
func (Loader) SwaggerDoc ¶
type Memory ¶
func (Memory) SwaggerDoc ¶
type Migration ¶
type Migration struct {
metav1.TypeMeta `json:",inline"`
ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MigrationSpec `json:"spec,omitempty" valid:"required"`
Status MigrationStatus `json:"status,omitempty"`
}
A Migration is a job that moves a Virtual Machine from one node to another
func NewMinimalMigration ¶
TODO validate that this is correct
func (*Migration) DeepCopyInto ¶ added in v0.0.3
func (*Migration) DeepCopyObject ¶ added in v0.0.3
func (*Migration) GetObjectMeta ¶
Required to satisfy ObjectMetaAccessor interface
func (Migration) SwaggerDoc ¶
func (*Migration) UnmarshalJSON ¶
type MigrationEvent ¶ added in v0.0.3
type MigrationEvent string
const ( StartedVirtualMachineMigration MigrationEvent = "MigrationStarted" SucceededVirtualMachineMigration MigrationEvent = "MigrationSucceeded" FailedVirtualMachineMigration MigrationEvent = "MigrationFailed" )
func (MigrationEvent) String ¶ added in v0.0.3
func (s MigrationEvent) String() string
type MigrationHostInfo ¶ added in v0.0.3
type MigrationHostInfo struct {
Slice string `json:"slice"`
Controller []string `json:"controller"`
PidNS string `json:"pidns"`
}
Host specific data, used by the migration controller to fetch host specific migration information from the target host
func (MigrationHostInfo) SwaggerDoc ¶ added in v0.0.3
func (MigrationHostInfo) SwaggerDoc() map[string]string
type MigrationList ¶
type MigrationList struct {
metav1.TypeMeta `json:",inline"`
ListMeta metav1.ListMeta `json:"metadata,omitempty"`
Items []Migration `json:"items"`
}
A list of Migrations
func (*MigrationList) DeepCopy ¶ added in v0.0.3
func (in *MigrationList) DeepCopy() *MigrationList
func (*MigrationList) DeepCopyInto ¶ added in v0.0.3
func (in *MigrationList) DeepCopyInto(out *MigrationList)
func (*MigrationList) DeepCopyObject ¶ added in v0.0.3
func (in *MigrationList) DeepCopyObject() runtime.Object
func (*MigrationList) GetListMeta ¶
func (ml *MigrationList) GetListMeta() meta.List
Required to satisfy ListMetaAccessor interface
func (*MigrationList) GetObjectKind ¶
func (ml *MigrationList) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
func (MigrationList) SwaggerDoc ¶
func (MigrationList) SwaggerDoc() map[string]string
func (*MigrationList) UnmarshalJSON ¶
func (ml *MigrationList) UnmarshalJSON(data []byte) error
type MigrationPhase ¶
type MigrationPhase string
const ( // Create Migration has been called but nothing has been done with it MigrationUnknown MigrationPhase = "" // Migration has been scheduled but no update on the status has been recorded MigrationRunning MigrationPhase = "Running" // Migration has completed successfully MigrationSucceeded MigrationPhase = "Succeeded" // Migration has failed. The Status structure of the associated Virtual Machine // Will indicate whether if the error was fatal. MigrationFailed MigrationPhase = "Failed" )
type MigrationSpec ¶
type MigrationSpec struct {
// Criterias for selecting the VM to migrate.
// For example
// selector:
// name: testvm
// will select the VM `testvm` for migration
Selector VMSelector `json:"selector"`
// Criteria to use when selecting the destination for the migration
// for example, to select by the hostname, specify `kubernetes.io/hostname: master`
// other possible choices include the hardware required to run the vm or
// or lableing of the nodes to indicate their roles in larger applications.
// examples:
// disktype: ssd,
// randomGenerator: /dev/random,
// randomGenerator: superfastdevice,
// app: mysql,
// licensedForServiceX: true
// Note that these selectors are additions to the node selectors on the VM itself and they must not exist on the VM.
// If they are conflicting with the VM, no migration will be started.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}
MigrationSpec is a description of a VM Migration For example "destinationNodeName": "testvm" will migrate a VM called "testvm" in the namespace "default"
func (MigrationSpec) SwaggerDoc ¶
func (MigrationSpec) SwaggerDoc() map[string]string
type MigrationStatus ¶
type MigrationStatus struct {
Phase MigrationPhase `json:"phase,omitempty"`
Instance *types.UID `json:"instance,omitempty"`
}
MigrationStatus is the last reported status of a VM Migratrion. Status may trail the actual state of a migration.
func (MigrationStatus) SwaggerDoc ¶
func (MigrationStatus) SwaggerDoc() map[string]string
type NVRam ¶
type NVRam struct {
NVRam string `json:"nvRam,omitempty"`
Template string `json:"template,omitempty"`
}
func (NVRam) SwaggerDoc ¶
type OS ¶
type OS struct {
Type OSType `json:"type"`
SMBios *SMBios `json:"smBIOS,omitempty"`
BootOrder []Boot `json:"bootOrder,omitempty"`
BootMenu *BootMenu `json:"bootMenu,omitempty"`
BIOS *BIOS `json:"bios,omitempty"`
}
func (OS) SwaggerDoc ¶
type OSType ¶
type OSType struct {
OS string `json:"os"`
Arch string `json:"arch,omitempty"`
Machine string `json:"machine,omitempty"`
}
func (OSType) SwaggerDoc ¶
type RandomGenerator ¶
type RandomGenerator struct {
}
func (RandomGenerator) SwaggerDoc ¶
func (RandomGenerator) SwaggerDoc() map[string]string
type Serial ¶
type Serial struct {
Type string `json:"type"`
Target *SerialTarget `json:"target,omitempty"`
}
func (Serial) SwaggerDoc ¶
type SerialTarget ¶
type SerialTarget struct {
Port *uint `json:"port,omitempty"`
}
func (SerialTarget) SwaggerDoc ¶
func (SerialTarget) SwaggerDoc() map[string]string
type Spice ¶
type Spice struct {
metav1.TypeMeta `json:",inline" ini:"-"`
ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty" ini:"-"`
Info SpiceInfo `json:"info,omitempty" valid:"required" ini:"virt-viewer"`
}
func (*Spice) DeepCopyInto ¶ added in v0.0.3
func (*Spice) DeepCopyObject ¶ added in v0.0.3
func (Spice) SwaggerDoc ¶
type SpiceInfo ¶
type SpiceInfo struct {
Type string `json:"type" ini:"type"`
Host string `json:"host" ini:"host"`
Port int32 `json:"port" ini:"port"`
Proxy string `json:"proxy,omitempty" ini:"proxy,omitempty"`
}
func (SpiceInfo) SwaggerDoc ¶
type SysInfo ¶
type SysInfo struct {
Type string `json:"type"`
System []Entry `json:"system"`
BIOS []Entry `json:"bios"`
BaseBoard []Entry `json:"baseBoard"`
}
func (SysInfo) SwaggerDoc ¶
type Timer ¶
type Timer struct {
Name string `json:"name"`
TickPolicy string `json:"tickPolicy,omitempty"`
Present string `json:"present,omitempty"`
}
func (Timer) SwaggerDoc ¶
type VMCondition ¶
type VMCondition struct {
Type VirtualMachineConditionType `json:"type"`
Status k8sv1.ConditionStatus `json:"status"`
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
func (VMCondition) SwaggerDoc ¶
func (VMCondition) SwaggerDoc() map[string]string
type VMGraphics ¶
type VMGraphics struct {
Type string `json:"type"`
Host string `json:"host"`
Port int32 `json:"port"`
}
func (VMGraphics) SwaggerDoc ¶
func (VMGraphics) SwaggerDoc() map[string]string
type VMPhase ¶
type VMPhase string
VMPhase is a label for the condition of a VM at the current time.
const ( //When a VM Object is first initialized and no phase, or Pending is present. VmPhaseUnset VMPhase = "" // Pending means the VM has been accepted by the system. Pending VMPhase = "Pending" // Either a target pod does not yet exist or a target Pod exists but is not yet scheduled and in running state. Scheduling VMPhase = "Scheduling" // A target pod was scheduled and the system saw that Pod in runnig state. // Here is where the responsibility of virt-controller ends and virt-handler takes over. Scheduled VMPhase = "Scheduled" // VMRunning means the pod has been bound to a node and the VM is started. Running VMPhase = "Running" // VMMigrating means the VM is currently migrated by a controller. Migrating VMPhase = "Migrating" // VMSucceeded means that the VM stopped voluntarily, e.g. reacted to SIGTERM or shutdown was invoked from // inside the VM. Succeeded VMPhase = "Succeeded" // VMFailed means that associated Pod is in failure state (exited with a non-zero exit code or was stopped by // the system). Failed VMPhase = "Failed" // VMUnknown means that for some reason the state of the VM could not be obtained, typically due // to an error in communicating with the host of the VM. Unknown VMPhase = "Unknown" )
These are the valid statuses of pods.
type VMReplicaSetCondition ¶ added in v0.0.3
type VMReplicaSetCondition struct {
Type VMReplicaSetConditionType `json:"type"`
Status k8sv1.ConditionStatus `json:"status"`
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
func (VMReplicaSetCondition) SwaggerDoc ¶ added in v0.0.3
func (VMReplicaSetCondition) SwaggerDoc() map[string]string
type VMReplicaSetConditionType ¶ added in v0.0.3
type VMReplicaSetConditionType string
const ( // VMReplicaSetReplicaFailure is added in a replica set when one of its vms // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors, // etc. or deleted due to kubelet being down or finalizers are failing. VMReplicaSetReplicaFailure VMReplicaSetConditionType = "ReplicaFailure" // VMReplicaSetReplicaPaused is added in a replica set when the replica set got paused by the controller. // After this condition was added, it is safe to remove or add vms by hand and adjust the replica count by hand. VMReplicaSetReplicaPaused VMReplicaSetConditionType = "ReplicaPaused" )
type VMReplicaSetSpec ¶ added in v0.0.3
type VMReplicaSetSpec struct {
// Number of desired pods. This is a pointer to distinguish between explicit
// zero and not specified. Defaults to 1.
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// Label selector for pods. Existing ReplicaSets whose pods are
// selected by this will be the ones affected by this deployment.
// +optional
Selector *metav1.LabelSelector `json:"selector,omitempty" valid:"required"`
// Template describes the pods that will be created.
Template *VMTemplateSpec `json:"template" valid:"required"`
// Indicates that the replica set is paused.
// +optional
Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
}
func (VMReplicaSetSpec) SwaggerDoc ¶ added in v0.0.3
func (VMReplicaSetSpec) SwaggerDoc() map[string]string
type VMReplicaSetStatus ¶ added in v0.0.3
type VMReplicaSetStatus struct {
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
// +optional
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
// The number of ready replicas for this replica set.
// +optional
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
Conditions []VMReplicaSetCondition `json:"conditions" optional:"true"`
}
func (VMReplicaSetStatus) SwaggerDoc ¶ added in v0.0.3
func (VMReplicaSetStatus) SwaggerDoc() map[string]string
type VMSelector ¶
type VMSelector struct {
// Name of the VM to migrate
Name string `json:"name" valid:"required"`
}
func (VMSelector) SwaggerDoc ¶
func (VMSelector) SwaggerDoc() map[string]string
type VMSpec ¶
type VMSpec struct {
// Domain is the actual libvirt domain.
Domain *DomainSpec `json:"domain,omitempty"`
// If labels are specified, only nodes marked with all of these labels are considered when scheduling the VM.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// If affinity is specifies, obey all the affinity rules
Affinity *Affinity `json:"affinity,omitempty"`
}
VMSpec is a description of a VM. Not to be confused with api.DomainSpec in virt-handler. It is expected that v1.DomainSpec will be merged into this structure.
func (VMSpec) SwaggerDoc ¶
type VMStatus ¶
type VMStatus struct {
// NodeName is the name where the VM is currently running.
NodeName string `json:"nodeName,omitempty"`
// MigrationNodeName is the node where the VM is live migrating to.
MigrationNodeName string `json:"migrationNodeName,omitempty"`
// Conditions are specific points in VM's pod runtime.
Conditions []VMCondition `json:"conditions,omitempty"`
// Phase is the status of the VM in kubernetes world. It is not the VM status, but partially correlates to it.
Phase VMPhase `json:"phase,omitempty"`
// Graphics represent the details of available graphical consoles.
Graphics []VMGraphics `json:"graphics" optional:"true"`
}
VMStatus represents information about the status of a VM. Status may trail the actual state of a system.
func (VMStatus) SwaggerDoc ¶
type VMTemplateSpec ¶ added in v0.0.3
type VMTemplateSpec struct {
ObjectMeta metav1.ObjectMeta `json:"metadata,omitempty"`
// VM Spec contains the VM specification.
Spec VMSpec `json:"spec,omitempty" valid:"required"`
}
func (VMTemplateSpec) SwaggerDoc ¶ added in v0.0.3
func (VMTemplateSpec) SwaggerDoc() map[string]string
type Video ¶
type Video struct {
Type string `json:"type"`
Heads *uint `json:"heads,omitempty"`
Ram *uint `json:"ram,omitempty"`
VRam *uint `json:"vRam,omitempty"`
VGAMem *uint `json:"vgaMem,omitempty"`
}
func (Video) SwaggerDoc ¶
type VirtualMachine ¶ added in v0.0.3
type VirtualMachine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// VM Spec contains the VM specification.
Spec VMSpec `json:"spec,omitempty" valid:"required"`
// Status is the high level overview of how the VM is doing. It contains information available to controllers and users.
Status VMStatus `json:"status,omitempty"`
}
VirtualMachine is *the* VM Definition. It represents a virtual machine in the runtime environment of kubernetes.
func NewMinimalVM ¶
func NewMinimalVM(vmName string) *VirtualMachine
func NewMinimalVMWithNS ¶
func NewMinimalVMWithNS(namespace string, vmName string) *VirtualMachine
func NewVMReferenceFromName ¶
func NewVMReferenceFromName(name string) *VirtualMachine
TODO Namespace could be different, also store it somewhere in the domain, so that we can report deletes on handler startup properly
func NewVMReferenceFromNameWithNS ¶
func NewVMReferenceFromNameWithNS(namespace string, name string) *VirtualMachine
func (*VirtualMachine) DeepCopy ¶ added in v0.0.3
func (in *VirtualMachine) DeepCopy() *VirtualMachine
func (*VirtualMachine) DeepCopyInto ¶ added in v0.0.3
func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine)
func (*VirtualMachine) DeepCopyObject ¶ added in v0.0.3
func (in *VirtualMachine) DeepCopyObject() runtime.Object
func (*VirtualMachine) GetObjectKind ¶ added in v0.0.3
func (v *VirtualMachine) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
func (*VirtualMachine) GetObjectMeta ¶ added in v0.0.3
func (v *VirtualMachine) GetObjectMeta() metav1.Object
Required to satisfy ObjectMetaAccessor interface
func (*VirtualMachine) IsFinal ¶ added in v0.0.3
func (v *VirtualMachine) IsFinal() bool
func (*VirtualMachine) IsReady ¶ added in v0.0.3
func (v *VirtualMachine) IsReady() bool
func (*VirtualMachine) IsRunning ¶ added in v0.0.3
func (v *VirtualMachine) IsRunning() bool
func (VirtualMachine) SwaggerDoc ¶ added in v0.0.3
func (VirtualMachine) SwaggerDoc() map[string]string
func (*VirtualMachine) UnmarshalJSON ¶ added in v0.0.3
func (v *VirtualMachine) UnmarshalJSON(data []byte) error
type VirtualMachineConditionType ¶ added in v0.0.4
type VirtualMachineConditionType string
const ( // VMReady means the pod is able to service requests and should be added to the // load balancing pools of all matching services. VirtualMachineReady VirtualMachineConditionType = "Ready" // If there happens any error while trying to synchronize the VM with the Domain, // this is reported as false. VirtualMachineSynchronized VirtualMachineConditionType = "Synchronized" )
These are valid conditions of VMs.
type VirtualMachineList ¶ added in v0.0.3
type VirtualMachineList struct {
metav1.TypeMeta `json:",inline"`
ListMeta metav1.ListMeta `json:"metadata,omitempty"`
Items []VirtualMachine `json:"items"`
}
VirtualMachineList is a list of VirtualMachines
func (*VirtualMachineList) DeepCopy ¶ added in v0.0.3
func (in *VirtualMachineList) DeepCopy() *VirtualMachineList
func (*VirtualMachineList) DeepCopyInto ¶ added in v0.0.3
func (in *VirtualMachineList) DeepCopyInto(out *VirtualMachineList)
func (*VirtualMachineList) DeepCopyObject ¶ added in v0.0.3
func (in *VirtualMachineList) DeepCopyObject() runtime.Object
func (*VirtualMachineList) GetListMeta ¶ added in v0.0.3
func (vl *VirtualMachineList) GetListMeta() meta.List
Required to satisfy ListMetaAccessor interface
func (*VirtualMachineList) GetObjectKind ¶ added in v0.0.3
func (vl *VirtualMachineList) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
func (VirtualMachineList) SwaggerDoc ¶ added in v0.0.3
func (VirtualMachineList) SwaggerDoc() map[string]string
func (*VirtualMachineList) UnmarshalJSON ¶ added in v0.0.3
func (vl *VirtualMachineList) UnmarshalJSON(data []byte) error
type VirtualMachineReplicaSet ¶ added in v0.0.3
type VirtualMachineReplicaSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// VM Spec contains the VM specification.
Spec VMReplicaSetSpec `json:"spec,omitempty" valid:"required"`
// Status is the high level overview of how the VM is doing. It contains information available to controllers and users.
Status VMReplicaSetStatus `json:"status,omitempty"`
}
VM is *the* VM Definition. It represents a virtual machine in the runtime environment of kubernetes.
func (*VirtualMachineReplicaSet) DeepCopy ¶ added in v0.0.3
func (in *VirtualMachineReplicaSet) DeepCopy() *VirtualMachineReplicaSet
func (*VirtualMachineReplicaSet) DeepCopyInto ¶ added in v0.0.3
func (in *VirtualMachineReplicaSet) DeepCopyInto(out *VirtualMachineReplicaSet)
func (*VirtualMachineReplicaSet) DeepCopyObject ¶ added in v0.0.3
func (in *VirtualMachineReplicaSet) DeepCopyObject() runtime.Object
func (*VirtualMachineReplicaSet) GetObjectKind ¶ added in v0.0.3
func (v *VirtualMachineReplicaSet) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
func (*VirtualMachineReplicaSet) GetObjectMeta ¶ added in v0.0.3
func (v *VirtualMachineReplicaSet) GetObjectMeta() metav1.Object
Required to satisfy ObjectMetaAccessor interface
func (VirtualMachineReplicaSet) SwaggerDoc ¶ added in v0.0.3
func (VirtualMachineReplicaSet) SwaggerDoc() map[string]string
func (*VirtualMachineReplicaSet) UnmarshalJSON ¶ added in v0.0.3
func (v *VirtualMachineReplicaSet) UnmarshalJSON(data []byte) error
type VirtualMachineReplicaSetList ¶ added in v0.0.3
type VirtualMachineReplicaSetList struct {
metav1.TypeMeta `json:",inline"`
ListMeta metav1.ListMeta `json:"metadata,omitempty"`
Items []VirtualMachineReplicaSet `json:"items"`
}
VMList is a list of VMs
func (*VirtualMachineReplicaSetList) DeepCopy ¶ added in v0.0.3
func (in *VirtualMachineReplicaSetList) DeepCopy() *VirtualMachineReplicaSetList
func (*VirtualMachineReplicaSetList) DeepCopyInto ¶ added in v0.0.3
func (in *VirtualMachineReplicaSetList) DeepCopyInto(out *VirtualMachineReplicaSetList)
func (*VirtualMachineReplicaSetList) DeepCopyObject ¶ added in v0.0.3
func (in *VirtualMachineReplicaSetList) DeepCopyObject() runtime.Object
func (*VirtualMachineReplicaSetList) GetListMeta ¶ added in v0.0.3
func (vl *VirtualMachineReplicaSetList) GetListMeta() meta.List
Required to satisfy ListMetaAccessor interface
func (*VirtualMachineReplicaSetList) GetObjectKind ¶ added in v0.0.3
func (vl *VirtualMachineReplicaSetList) GetObjectKind() schema.ObjectKind
Required to satisfy Object interface
func (VirtualMachineReplicaSetList) SwaggerDoc ¶ added in v0.0.3
func (VirtualMachineReplicaSetList) SwaggerDoc() map[string]string
func (*VirtualMachineReplicaSetList) UnmarshalJSON ¶ added in v0.0.3
func (vl *VirtualMachineReplicaSetList) UnmarshalJSON(data []byte) error
type Watchdog ¶ added in v0.1.0
type Watchdog struct {
// Defines what watchdog model to use, typically 'i6300esb'
Model string `json:"model"`
// The action to take. poweroff, reset, shutdown, pause, dump.
Action string `json:"action"`
}
Hardware watchdog device