v1alpha1

package
v0.0.0-...-e507620 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The image file does not yet exist
	VirtimagefilePending = "Pending"
	// The image file exists
	VirtimagefileAvailable = "Available"
	// The image file failed to create
	VirtimagefileFailed = "Failed"
)
View Source
const (
	VirtimagefileStreamUpload   = "Upload"
	VirtimagefileStreamDownload = "Download"
	VirtimagefileStreamBoth     = "Both"
)
View Source
const (
	VirtimagerepoReady   = "Ready"
	VirtimagerepoFailed  = "Failed"
	VirtimagerepoOffline = "Offline"
)
View Source
const (
	VirtnodeReady   = "Ready"
	VirtnodeFailed  = "Failed"
	VirtnodeOffline = "Offline"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Virtimagefile

type Virtimagefile struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ObjectMeta `json:"metadata"`

	Spec   VirtimagefileSpec   `json:"spec"`
	Status VirtimagefileStatus `json:"status"`
}

Virtimagefile defines info about a node able to run KVM guests

func (*Virtimagefile) GetObjectKind

func (ni *Virtimagefile) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*Virtimagefile) GetObjectMeta

func (ni *Virtimagefile) GetObjectMeta() v1.Object

Required to satisfy ObjectMetaAccessor interface

type VirtimagefileAccessMode

type VirtimagefileAccessMode string
const (
	VirtimagefileReadWriteOnce VirtimagefileAccessMode = "ReadWriteOnce"
	VirtimagefileReadeOnlyMany VirtimagefileAccessMode = "ReadOnlyMany"
	VirtimagefileReadWriteMany VirtimagefileAccessMode = "ReadWriteMany"
)

type VirtimagefileList

type VirtimagefileList struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ListMeta `json:"metadata"`

	Items []*Virtimagefile `json:"items"`
}

VirtimagefileList is a list of Virtimagefiles.

func (*VirtimagefileList) GetListMeta

func (ni *VirtimagefileList) GetListMeta() v1.List

Required to satisfy ListMetaAccessor interface

func (*VirtimagefileList) GetObjectKind

func (ni *VirtimagefileList) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

type VirtimagefilePhase

type VirtimagefilePhase string

type VirtimagefileSpec

type VirtimagefileSpec struct {
	// Name of Virtimagerepo resource that owns this
	RepoName string `json:"repoName"`

	// Name of Virtimagefile resource that backs this
	BackingImageFile string `json:"backingImageFile"`

	AccessMode VirtimagefileAccessMode `json:"accessMode"`

	// Logical size of disk payload
	Capacity uint64 `json:"capacity"`

	Stream VirtimagefileStream `json:"stream"`
}

VirtimagefileSpec holds specification parameters of a Virtimagefile deployment.

type VirtimagefileStatus

type VirtimagefileStatus struct {
	Phase VirtimagefilePhase `json:"phase"`

	// Physical usage of the file on underlying storage
	// - May be less than length if the file is sparse
	// - May be greater than length if the FS has
	//   pre-emptively reserved extra blocks for future
	//   size growth
	Usage uint64 `json:"usage"`

	// Reported length of the file on underlying storage
	Length uint64 `json:"length"`

	// Current logical capacity - may different from spec
	// capacity if a resize is pending
	Capacity uint64 `json:"capacity"`
}

type VirtimagefileStream

type VirtimagefileStream struct {
	// Name of a 'secret' object providing an access
	// control token to grant permission for upload
	// or download of the content
	TokenSecret string `json:"tokenSecret"`

	AccessMode VirtimagefileStreamAccessMode `json:"accessMode"`
}

type VirtimagefileStreamAccessMode

type VirtimagefileStreamAccessMode string

type Virtimagerepo

type Virtimagerepo struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ObjectMeta `json:"metadata"`

	Spec   VirtimagerepoSpec   `json:"spec"`
	Status VirtimagerepoStatus `json:"status"`
}

Virtimagerepo defines a Virtimagerepo deployment.

func (*Virtimagerepo) GetObjectKind

func (ni *Virtimagerepo) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*Virtimagerepo) GetObjectMeta

func (ni *Virtimagerepo) GetObjectMeta() v1.Object

Required to satisfy ObjectMetaAccessor interface

type VirtimagerepoList

type VirtimagerepoList struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ListMeta `json:"metadata"`

	Items []*Virtimagerepo `json:"items"`
}

VirtimagerepoList is a list of Virtimagerepos.

func (*VirtimagerepoList) GetListMeta

func (ni *VirtimagerepoList) GetListMeta() v1.List

Required to satisfy ListMetaAccessor interface

func (*VirtimagerepoList) GetObjectKind

func (ni *VirtimagerepoList) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

type VirtimagerepoPhase

type VirtimagerepoPhase string

type VirtimagerepoSpec

type VirtimagerepoSpec struct {
	// Name of a PesistentVolumeClaim in the same namespace as the Virtimagerepo
	ClaimName string `json:"claimName"`

	// Force image format type
	Format string `json:"format"`

	Preallocate bool `json:"preallocate"`

	JobWorkers uint8 `json:"jobWorkers"`
}

VirtimagerepoSpec holds specification parameters of a Virtimagerepo deployment.

type VirtimagerepoStatus

type VirtimagerepoStatus struct {
	Phase VirtimagerepoPhase `json:"phase"`
	// Physical size of the underlying filesystem
	Capacity uint64 `json:"capacity"`
	// Total size currently allocated to images
	Allocation uint64 `json:"allocation"`
	// Total size that is committed to serving images
	// ie if all sparse images grew to their max permitted
	// size this is what would be consumed
	Commitment uint64 `json:"committment"`
}

type Virtmachine

type Virtmachine struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ObjectMeta     `json:"metadata"`
	Spec        VirtmachineSpec   `json:"spec"`
	Status      VirtmachineStatus `json:"status"`
}

Virtmachine defines a Virtmachine deployment.

func (*Virtmachine) GetObjectKind

func (ni *Virtmachine) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*Virtmachine) GetObjectMeta

func (ni *Virtmachine) GetObjectMeta() v1.Object

Required to satisfy ObjectMetaAccessor interface

type VirtmachineBoot

type VirtmachineBoot struct {
	// 'direct' or 'firmware'
	Type string `json:"type"`

	// Only if Type == 'direct'
	Kernel     *VirtmachineStorage `json:"kernel,omitempty"`
	Ramdisk    *VirtmachineStorage `json:"ramdisk,omitempty"`
	KernelArgs string              `json:"kernel_args,omitempty"`

	Firmware *VirtmachineFirmware `json:"firmware"`
}

type VirtmachineCPU

type VirtmachineCPU struct {
	Count    int                     `json:"count"`
	Mode     string                  `json:"string"`
	Model    string                  `json:"string"`
	Features []VirtmachineCPUFeature `json:"features"`
}

type VirtmachineCPUFeature

type VirtmachineCPUFeature struct {
	Name string `json:"name"`
	// 'force', 'require', 'optional', 'disable', 'forbid'
	Policy string `json:"policy"`
}

type VirtmachineConsole

type VirtmachineConsole struct {
	// 'serial', 'virtio'
	Type string `json:"type"`
}

type VirtmachineDeviceList

type VirtmachineDeviceList struct {
	Disks    []*VirtmachineDisk    `json:"disk"`
	Consoles []*VirtmachineConsole `json:"console"`
	Video    []*VirtmachineVideo   `json:"video"`
}

type VirtmachineDisk

type VirtmachineDisk struct {
	// 'disk', 'cdrom', etc
	Device    string                  `json:"device"`
	Source    *VirtmachineStorage     `json:"source"`
	BootIndex int                     `json:"bootindex"`
	Encrypt   *VirtmachineDiskEncrypt `json:"encrypt"`
}

type VirtmachineDiskEncrypt

type VirtmachineDiskEncrypt struct {
	Passphrase string `json:"passphrase"`
}

type VirtmachineDiskSource

type VirtmachineDiskSource struct {
	Name        string `json:"name"`
	BackingName string `json:"name"`
}

type VirtmachineFirmware

type VirtmachineFirmware struct {
	// 'efi' or 'bios'
	Type string `json:"type,omitempty"`
}

type VirtmachineHardware

type VirtmachineHardware struct {
	// Hypervisor type (libvirt: /domain/@type)
	Type    string            `json:"type"`
	Arch    string            `json:"arch"`
	Machine string            `json:"machine"`
	Boot    VirtmachineBoot   `json:"boot"`
	Memory  VirtmachineMemory `json:"memory"`

	CPU VirtmachineCPU `json:"cpu"`

	Topology VirtmachineTopology `json:"topology"`

	Devices VirtmachineDeviceList `json:"devices"`
}

type VirtmachineList

type VirtmachineList struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ListMeta `json:"metadata"`

	Items []*Virtmachine `json:"items"`
}

VirtmachineList is a list of Virtmachines.

func (*VirtmachineList) GetListMeta

func (ni *VirtmachineList) GetListMeta() v1.List

Required to satisfy ListMetaAccessor interface

func (*VirtmachineList) GetObjectKind

func (ni *VirtmachineList) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

type VirtmachineMemory

type VirtmachineMemory struct {
	// Size of DIMMs currently plugged in MB
	Initial int `json:"initial"`
	// Maximum size to allow hotplug DIMMs in MB
	Maximum int `json:"maximum"`

	// Total number of DIMM slots - must be a
	// divisor of both Present and Maximum
	Slots int `json:"slots"`
}

type VirtmachineSpec

type VirtmachineSpec struct {
	// The hardware desired to be applied the running instance
	Hardware VirtmachineHardware `json:"hardware"`
}

VirtmachineSpec holds specification parameters of a Virtmachine deployment.

type VirtmachineStatus

type VirtmachineStatus struct {
	// The hardware currently applied to the running instance
	Hardware VirtmachineHardware `json:"hardware"`
}

type VirtmachineStorage

type VirtmachineStorage struct {
	PersistentVolume *VirtmachineStoragePersistentVolume `json:"persistentVolume"`
	ImageFile        *VirtmachineStorageImageFile        `json:"imageFile"`
}

type VirtmachineStorageImageFile

type VirtmachineStorageImageFile struct {
	FileName string `json:"fileName"`
}

The guest will use a local image file associated with resource whose k8s name is 'FileName' - nb this is *not* file path on disk - this is the TPR resource name

type VirtmachineStoragePersistentVolume

type VirtmachineStoragePersistentVolume struct {
	ClaimName string `json:"claimName"`
}

The guest will be directly connected to the raw persistent storage volume listed, assuming QEMU has a network client for the storage protocol refered to.

type VirtmachineTopology

type VirtmachineTopology struct {
	Nodes   int `json:"nodes,omitempty"`
	Sockets int `json:"sockets,omitempty"`
	Cores   int `json:"cores,omitempty"`
	Threads int `json:"threads,omitempty"`
}

type VirtmachineVideo

type VirtmachineVideo struct {
	// 'vga', 'cirrus', 'qxl', 'virtio', 'vmvga'
	Type string `json:"type"`
	VRam int    `json:"vram"`
}

type Virtnode

type Virtnode struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ObjectMeta `json:"metadata"`

	Status VirtnodeStatus `json:"status"`
	Spec   VirtnodeSpec   `json:"spec"`
}

Virtnode defines info about a node able to run KVM guests

func (*Virtnode) GetObjectKind

func (ni *Virtnode) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*Virtnode) GetObjectMeta

func (ni *Virtnode) GetObjectMeta() v1.Object

Required to satisfy ObjectMetaAccessor interface

type VirtnodeCPU

type VirtnodeCPU struct {
	Avail int `json:"avail"`
	Used  int `json:"used"`
}

type VirtnodeGuest

type VirtnodeGuest struct {
	Hypervisor string `json:"hypervisor"`
	Arch       string `json:"arch"`
	Type       string `json:"type"`

	Machines []string `json:"machines"`
}

type VirtnodeList

type VirtnodeList struct {
	v1.TypeMeta `json:",inline"`
	Metadata    v1.ListMeta `json:"metadata"`

	Items []*Virtnode `json:"items"`
}

VirtnodeList is a list of Virtnodes.

func (*VirtnodeList) GetListMeta

func (ni *VirtnodeList) GetListMeta() v1.List

Required to satisfy ListMetaAccessor interface

func (*VirtnodeList) GetObjectKind

func (ni *VirtnodeList) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

type VirtnodeMemory

type VirtnodeMemory struct {
	PageSize int    `json:"pagesize"`
	Present  uint64 `json:"present"`
	Used     uint64 `json:"used"`
}

type VirtnodeNUMACell

type VirtnodeNUMACell struct {
	CPU    VirtnodeCPU      `json:"cpu"`
	Memory []VirtnodeMemory `json:"memory"`
}

type VirtnodePhase

type VirtnodePhase string

type VirtnodeResources

type VirtnodeResources struct {
	NUMACells []VirtnodeNUMACell `json:"cells"`
}

type VirtnodeSpec

type VirtnodeSpec struct {
	UUID      string            `json:"uuid"`
	Arch      string            `json:"arch"`
	Guests    []VirtnodeGuest   `json:"guests"`
	Resources VirtnodeResources `json:"resources"`
}

VirtnodeSpec holds specification parameters of a Virtnode deployment.

type VirtnodeStatus

type VirtnodeStatus struct {
	Phase VirtnodePhase `json:"phase"`
}

Jump to

Keyboard shortcuts

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