v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const GroupName = "kubevirt.io"

GroupName is the group name use in this package

Variables

View Source
var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion is group version used to register these objects

View Source
var MigrationGroupVersionKind = schema.GroupVersionKind{Group: GroupName, Version: GroupVersion.Version, Kind: "Migration"}
View Source
var VMReplicaSetGroupVersionKind = schema.GroupVersionKind{Group: GroupName, Version: GroupVersion.Version, Kind: "VirtualMachineReplicaSet"}
View Source
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

func (Address) SwaggerDoc() map[string]string

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

func (Affinity) SwaggerDoc() map[string]string

type Alias

type Alias struct {
	Name string `json:"name"`
}

func (Alias) SwaggerDoc

func (Alias) SwaggerDoc() map[string]string

type BIOS

type BIOS struct {
}

TODO <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader>

func (BIOS) SwaggerDoc

func (BIOS) SwaggerDoc() map[string]string

type Ballooning

type Ballooning struct {
	Model string `json:"model"`
}

func (Ballooning) SwaggerDoc

func (Ballooning) SwaggerDoc() map[string]string

type BandWidth

type BandWidth struct {
}

func (BandWidth) SwaggerDoc

func (BandWidth) SwaggerDoc() map[string]string

type Boot

type Boot struct {
	Dev string `json:"dev"`
}

func (Boot) SwaggerDoc

func (Boot) SwaggerDoc() map[string]string

type BootMenu

type BootMenu struct {
	Enabled bool  `json:"enabled,omitempty"`
	Timeout *uint `json:"timeout,omitempty"`
}

func (BootMenu) SwaggerDoc

func (BootMenu) SwaggerDoc() map[string]string

type BootOrder

type BootOrder struct {
	Order uint `json:"order"`
}

func (BootOrder) SwaggerDoc

func (BootOrder) SwaggerDoc() map[string]string

type Channel

type Channel struct {
	Type   string         `json:"type"`
	Source ChannelSource  `json:"source,omitempty"`
	Target *ChannelTarget `json:"target,omitempty"`
}

func (Channel) SwaggerDoc

func (Channel) SwaggerDoc() map[string]string

type ChannelSource

type ChannelSource struct {
	Mode string `json:"mode"`
	Path string `json:"path"`
}

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 Clock

type Clock struct {
}

func (Clock) SwaggerDoc

func (Clock) 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

func (Console) SwaggerDoc() map[string]string

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

func (Devices) SwaggerDoc() map[string]string

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

func (Disk) SwaggerDoc() map[string]string

type DiskAuth

type DiskAuth struct {
	Username string      `json:"username"`
	Secret   *DiskSecret `json:"secret,omitempty"`
}

func (DiskAuth) SwaggerDoc

func (DiskAuth) SwaggerDoc() map[string]string

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

type DiskSecret struct {
	Type  string `json:"type"`
	Usage string `json:"usage"`
}

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

type DiskSourceHost struct {
	Name string `json:"name"`
	Port string `json:"port,omitempty"`
}

func (DiskSourceHost) SwaggerDoc

func (DiskSourceHost) SwaggerDoc() map[string]string

type DiskTarget

type DiskTarget struct {
	Bus    string `json:"bus,omitempty"`
	Device string `json:"dev"`
}

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

type Entry struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (Entry) SwaggerDoc

func (Entry) SwaggerDoc() map[string]string

type FilterRef

type FilterRef struct {
	Filter string `json:"filter"`
}

func (FilterRef) SwaggerDoc

func (FilterRef) SwaggerDoc() map[string]string

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

func (Graphics) SwaggerDoc() map[string]string

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

func (Interface) SwaggerDoc() map[string]string

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

func (LinkState) SwaggerDoc() map[string]string

type Listen

type Listen struct {
	Type    string `json:"type"`
	Address string `json:"address,omitempty"`
	Network string `json:"network,omitempty"`
}

func (Listen) SwaggerDoc

func (Listen) SwaggerDoc() map[string]string

type Loader

type Loader struct {
}

TODO <bios useserial='yes' rebootTimeout='0'/>

func (Loader) SwaggerDoc

func (Loader) SwaggerDoc() map[string]string

type MAC

type MAC struct {
	MAC string `json:"address"`
}

func (MAC) SwaggerDoc

func (MAC) SwaggerDoc() map[string]string

type Memory

type Memory struct {
	Value uint   `json:"value"`
	Unit  string `json:"unit"`
}

func (Memory) SwaggerDoc

func (Memory) SwaggerDoc() map[string]string

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 NewMigrationReferenceFromName

func NewMigrationReferenceFromName(namespace string, name string) *Migration

func NewMinimalMigration

func NewMinimalMigration(name string, vmName string) *Migration

TODO validate that this is correct

func NewMinimalMigrationWithNS

func NewMinimalMigrationWithNS(namespace string, name string, vmName string) *Migration

func (*Migration) DeepCopy added in v0.0.3

func (in *Migration) DeepCopy() *Migration

func (*Migration) DeepCopyInto added in v0.0.3

func (in *Migration) DeepCopyInto(out *Migration)

func (*Migration) DeepCopyObject added in v0.0.3

func (in *Migration) DeepCopyObject() runtime.Object

func (*Migration) GetObjectMeta

func (m *Migration) GetObjectMeta() metav1.Object

Required to satisfy ObjectMetaAccessor interface

func (Migration) SwaggerDoc

func (Migration) SwaggerDoc() map[string]string

func (*Migration) UnmarshalJSON

func (m *Migration) UnmarshalJSON(data []byte) error

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 Model

type Model struct {
	Type string `json:"type"`
}

func (Model) SwaggerDoc

func (Model) SwaggerDoc() map[string]string

type NVRam

type NVRam struct {
	NVRam    string `json:"nvRam,omitempty"`
	Template string `json:"template,omitempty"`
}

func (NVRam) SwaggerDoc

func (NVRam) SwaggerDoc() map[string]string

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

func (OS) SwaggerDoc() map[string]string

type OSType

type OSType struct {
	OS      string `json:"os"`
	Arch    string `json:"arch,omitempty"`
	Machine string `json:"machine,omitempty"`
}

func (OSType) SwaggerDoc

func (OSType) SwaggerDoc() map[string]string

type RandomGenerator

type RandomGenerator struct {
}

func (RandomGenerator) SwaggerDoc

func (RandomGenerator) SwaggerDoc() map[string]string

type ReadOnly

type ReadOnly struct{}

func (ReadOnly) SwaggerDoc

func (ReadOnly) SwaggerDoc() map[string]string

type SMBios

type SMBios struct {
	Mode string `json:"mode"`
}

func (SMBios) SwaggerDoc

func (SMBios) SwaggerDoc() map[string]string

type Serial

type Serial struct {
	Type   string        `json:"type"`
	Target *SerialTarget `json:"target,omitempty"`
}

func (Serial) SwaggerDoc

func (Serial) SwaggerDoc() map[string]string

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 NewSpice

func NewSpice(namespace string, vmName string) *Spice

func (*Spice) DeepCopy added in v0.0.3

func (in *Spice) DeepCopy() *Spice

func (*Spice) DeepCopyInto added in v0.0.3

func (in *Spice) DeepCopyInto(out *Spice)

func (*Spice) DeepCopyObject added in v0.0.3

func (in *Spice) DeepCopyObject() runtime.Object

func (Spice) SwaggerDoc

func (Spice) SwaggerDoc() map[string]string

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

func (SpiceInfo) SwaggerDoc() map[string]string

type SyncEvent

type SyncEvent string
const (
	Created    SyncEvent = "Created"
	Deleted    SyncEvent = "Deleted"
	Started    SyncEvent = "Started"
	Stopped    SyncEvent = "Stopped"
	SyncFailed SyncEvent = "SyncFailed"
	Resumed    SyncEvent = "Resumed"
)

func (SyncEvent) String

func (s SyncEvent) String() string

type SysInfo

type SysInfo struct {
	Type      string  `json:"type"`
	System    []Entry `json:"system"`
	BIOS      []Entry `json:"bios"`
	BaseBoard []Entry `json:"baseBoard"`
}

func (SysInfo) SwaggerDoc

func (SysInfo) SwaggerDoc() map[string]string

type Timer

type Timer struct {
	Name       string `json:"name"`
	TickPolicy string `json:"tickPolicy,omitempty"`
	Present    string `json:"present,omitempty"`
}

func (Timer) SwaggerDoc

func (Timer) SwaggerDoc() map[string]string

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

func (VMSpec) SwaggerDoc() map[string]string

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

func (VMStatus) SwaggerDoc() map[string]string

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

func (Video) SwaggerDoc() map[string]string

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 NewVM

func NewVM(name string, uid types.UID) *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 (*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 (*VirtualMachineReplicaSetList) DeepCopyInto added in v0.0.3

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

func (Watchdog) SwaggerDoc added in v0.1.0

func (Watchdog) SwaggerDoc() map[string]string

Jump to

Keyboard shortcuts

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