Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
- Constants
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- type BlockDeviceVolume
- type FileMapping
- type Image
- type ImageSpec
- type ImageStatus
- type Kernel
- type KernelSpec
- type KernelStatus
- type OCIImageSource
- type Pool
- type PoolDevice
- type PoolDeviceType
- type PoolSpec
- type PoolStatus
- type Runtime
- type SSH
- type VM
- func (in *VM) DeepCopy() *VM
- func (in *VM) DeepCopyInto(out *VM)
- func (in *VM) DeepCopyObject() runtime.Object
- func (vm *VM) ObjectPath() string
- func (vm *VM) OverlayFile() string
- func (vm *VM) Running() bool
- func (vm *VM) SetImage(image *Image)
- func (vm *VM) SetKernel(kernel *Kernel)
- func (vm *VM) SnapshotDev() string
- type VMImageSpec
- type VMKernelSpec
- type VMNetworkSpec
- type VMSandboxSpec
- type VMSpec
- type VMStatus
- type VMStorageSpec
- type Volume
- type VolumeMount
Constants ¶
const ( KindImage runtime.Kind = "Image" KindKernel runtime.Kind = "Kernel" KindVM runtime.Kind = "VM" )
const (
// GroupName is the group name use in this package
GroupName = "ignite.weave.works"
)
Variables ¶
var ( // SchemeBuilder the schema builder SchemeBuilder = runtime.NewSchemeBuilder( addKnownTypes, ) AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{ Group: GroupName, Version: runtime.APIVersionInternal, }
SchemeGroupVersion is group version used to register these objects
Functions ¶
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
Types ¶
type BlockDeviceVolume ¶
type BlockDeviceVolume struct {
Path string `json:"path"`
}
BlockDeviceVolume defines a block device on the host
func (*BlockDeviceVolume) DeepCopy ¶
func (in *BlockDeviceVolume) DeepCopy() *BlockDeviceVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceVolume.
func (*BlockDeviceVolume) DeepCopyInto ¶
func (in *BlockDeviceVolume) DeepCopyInto(out *BlockDeviceVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileMapping ¶
FileMapping defines mappings between files on the host and VM
func (*FileMapping) DeepCopy ¶
func (in *FileMapping) DeepCopy() *FileMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileMapping.
func (*FileMapping) DeepCopyInto ¶
func (in *FileMapping) DeepCopyInto(out *FileMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Image ¶
type Image struct { runtime.TypeMeta `json:",inline"` // runtime.ObjectMeta is also embedded into the struct, and defines the human-readable name, and the machine-readable ID // Name is available at the .metadata.name JSON path // ID is available at the .metadata.uid JSON path (the Go type is k8s.io/apimachinery/pkg/types.UID, which is only a typed string) runtime.ObjectMeta `json:"metadata"` Spec ImageSpec `json:"spec"` Status ImageStatus `json:"status"` }
Image represents a cached OCI image ready to be used with Ignite +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Image) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Image) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Image) ObjectPath ¶
ObjectPath returns the directory where this Image's data is stored
type ImageSpec ¶
type ImageSpec struct {
OCI meta.OCIImageRef `json:"oci"`
}
ImageSpec declares what the image contains
func (*ImageSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (*ImageSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageStatus ¶
type ImageStatus struct { // OCISource contains the information about how this OCI image was imported OCISource OCIImageSource `json:"ociSource"` }
ImageStatus defines the status of the image
func (*ImageStatus) DeepCopy ¶
func (in *ImageStatus) DeepCopy() *ImageStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus.
func (*ImageStatus) DeepCopyInto ¶
func (in *ImageStatus) DeepCopyInto(out *ImageStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Kernel ¶
type Kernel struct { runtime.TypeMeta `json:",inline"` // runtime.ObjectMeta is also embedded into the struct, and defines the human-readable name, and the machine-readable ID // Name is available at the .metadata.name JSON path // ID is available at the .metadata.uid JSON path (the Go type is k8s.io/apimachinery/pkg/types.UID, which is only a typed string) runtime.ObjectMeta `json:"metadata"` Spec KernelSpec `json:"spec"` Status KernelStatus `json:"status"` }
Kernel is a serializable object that caches information about imported kernels This file is stored in /var/lib/firecracker/kernels/{oci-image-digest}/metadata.json +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Kernel) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kernel.
func (*Kernel) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Kernel) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Kernel) ObjectPath ¶
ObjectPath returns the directory where this Kernel's data is stored
type KernelSpec ¶
type KernelSpec struct {
OCI meta.OCIImageRef `json:"oci"`
}
KernelSpec describes the properties of a kernel
func (*KernelSpec) DeepCopy ¶
func (in *KernelSpec) DeepCopy() *KernelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelSpec.
func (*KernelSpec) DeepCopyInto ¶
func (in *KernelSpec) DeepCopyInto(out *KernelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KernelStatus ¶
type KernelStatus struct { Version string `json:"version"` OCISource OCIImageSource `json:"ociSource"` }
KernelStatus describes the status of a kernel
func (*KernelStatus) DeepCopy ¶
func (in *KernelStatus) DeepCopy() *KernelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelStatus.
func (*KernelStatus) DeepCopyInto ¶
func (in *KernelStatus) DeepCopyInto(out *KernelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OCIImageSource ¶
type OCIImageSource struct { // ID defines the source's content ID (e.g. the canonical OCI path or Docker image ID) ID *meta.OCIContentID `json:"id"` // Size defines the size of the source in bytes Size meta.Size `json:"size"` }
OCIImageSource specifies how the OCI image was imported. It is the status variant of OCIImageClaim
func (*OCIImageSource) DeepCopy ¶
func (in *OCIImageSource) DeepCopy() *OCIImageSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIImageSource.
func (*OCIImageSource) DeepCopyInto ¶
func (in *OCIImageSource) DeepCopyInto(out *OCIImageSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pool ¶
type Pool struct { runtime.TypeMeta `json:",inline"` Spec PoolSpec `json:"spec"` Status PoolStatus `json:"status"` }
Pool defines device mapper pool database This file is managed by the snapshotter part of Ignite, and the file (existing as a singleton) is present at /var/lib/firecracker/snapshotter/pool.json +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Pool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pool.
func (*Pool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pool) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PoolDevice ¶
type PoolDevice struct { Size meta.Size `json:"size"` Parent meta.DMID `json:"parent"` // Type specifies the type of the contents of the device Type PoolDeviceType `json:"type"` // MetadataPath points to the JSON/YAML file with metadata about this device // This is most often of the format /var/lib/firecracker/{type}/{id}/metadata.json MetadataPath string `json:"metadataPath"` }
PoolDevice defines one device in the pool
func (*PoolDevice) DeepCopy ¶
func (in *PoolDevice) DeepCopy() *PoolDevice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolDevice.
func (*PoolDevice) DeepCopyInto ¶
func (in *PoolDevice) DeepCopyInto(out *PoolDevice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolDeviceType ¶
type PoolDeviceType string
const ( PoolDeviceTypeImage PoolDeviceType = "Image" PoolDeviceTypeResize PoolDeviceType = "Resize" PoolDeviceTypeKernel PoolDeviceType = "Kernel" PoolDeviceTypeVM PoolDeviceType = "VM" )
type PoolSpec ¶
type PoolSpec struct { // MetadataSize specifies the size of the pool's metadata MetadataSize meta.Size `json:"metadataSize"` // DataSize specifies the size of the pool's data DataSize meta.Size `json:"dataSize"` // AllocationSize specifies the smallest size that can be allocated at a time AllocationSize meta.Size `json:"allocationSize"` // MetadataPath points to the file where device mapper stores all metadata information // Defaults to constants.SNAPSHOTTER_METADATA_PATH MetadataPath string `json:"metadataPath"` // DataPath points to the backing physical device or sparse file (to be loop mounted) for the pool // Defaults to constants.SNAPSHOTTER_DATA_PATH DataPath string `json:"dataPath"` }
PoolSpec defines the Pool's specification
func (*PoolSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolSpec.
func (*PoolSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolStatus ¶
type PoolStatus struct { // The Devices array needs to contain pointers to accommodate "holes" in the mapping // Where devices have been deleted, the pointer is nil Devices []*PoolDevice `json:"devices"` }
PoolStatus defines the Pool's current status
func (*PoolStatus) DeepCopy ¶
func (in *PoolStatus) DeepCopy() *PoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolStatus.
func (*PoolStatus) DeepCopyInto ¶
func (in *PoolStatus) DeepCopyInto(out *PoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Runtime ¶
type Runtime struct {
ID string `json:"id"`
}
Runtime specifies the VM's runtime information
func (*Runtime) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runtime.
func (*Runtime) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SSH ¶
SSH specifies different ways to connect via SSH to the VM SSH uses a custom marshaller/unmarshaller. If generate is true, it marshals to true (a JSON bool). If PublicKey is set, it marshals to that string.
func (*SSH) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSH.
func (*SSH) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VM ¶
type VM struct { runtime.TypeMeta `json:",inline"` // runtime.ObjectMeta is also embedded into the struct, and defines the human-readable name, and the machine-readable ID // Name is available at the .metadata.name JSON path // ID is available at the .metadata.uid JSON path (the Go type is k8s.io/apimachinery/pkg/types.UID, which is only a typed string) runtime.ObjectMeta `json:"metadata"` Spec VMSpec `json:"spec"` Status VMStatus `json:"status"` }
VM represents a virtual machine run by Firecracker These files are stored in /var/lib/firecracker/vm/{vm-id}/metadata.json +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VM) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VM.
func (*VM) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VM) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VM) ObjectPath ¶
ObjectPath returns the directory where this VM's data is stored
func (*VM) OverlayFile ¶
OverlayFile returns the path to the overlay.dm file for the VM. TODO: This will be removed once we have the new snapshotter in place.
func (*VM) SnapshotDev ¶
SnapshotDev returns the path where the (legacy) DM snapshot exists
type VMImageSpec ¶
type VMImageSpec struct {
OCI meta.OCIImageRef `json:"oci"`
}
func (*VMImageSpec) DeepCopy ¶
func (in *VMImageSpec) DeepCopy() *VMImageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImageSpec.
func (*VMImageSpec) DeepCopyInto ¶
func (in *VMImageSpec) DeepCopyInto(out *VMImageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMKernelSpec ¶
type VMKernelSpec struct { OCI meta.OCIImageRef `json:"oci"` CmdLine string `json:"cmdLine,omitempty"` }
func (*VMKernelSpec) DeepCopy ¶
func (in *VMKernelSpec) DeepCopy() *VMKernelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMKernelSpec.
func (*VMKernelSpec) DeepCopyInto ¶
func (in *VMKernelSpec) DeepCopyInto(out *VMKernelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMNetworkSpec ¶
type VMNetworkSpec struct {
Ports meta.PortMappings `json:"ports,omitempty"`
}
func (*VMNetworkSpec) DeepCopy ¶
func (in *VMNetworkSpec) DeepCopy() *VMNetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMNetworkSpec.
func (*VMNetworkSpec) DeepCopyInto ¶
func (in *VMNetworkSpec) DeepCopyInto(out *VMNetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMSandboxSpec ¶ added in v0.7.0
type VMSandboxSpec struct {
OCI meta.OCIImageRef `json:"oci"`
}
VMSandboxSpec is the spec of the sandbox used for the VM.
func (*VMSandboxSpec) DeepCopy ¶ added in v0.7.0
func (in *VMSandboxSpec) DeepCopy() *VMSandboxSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSandboxSpec.
func (*VMSandboxSpec) DeepCopyInto ¶ added in v0.7.0
func (in *VMSandboxSpec) DeepCopyInto(out *VMSandboxSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMSpec ¶
type VMSpec struct { Image VMImageSpec `json:"image"` Sandbox VMSandboxSpec `json:"sandbox"` Kernel VMKernelSpec `json:"kernel"` CPUs uint64 `json:"cpus"` Memory meta.Size `json:"memory"` DiskSize meta.Size `json:"diskSize"` // TODO: Implement working omitempty without pointers for the following entries // Currently both will show in the JSON output as empty arrays. Making them // pointers requires plenty of nil checks (as their contents are accessed directly) // and is very risky for stability. APIMachinery potentially has a solution. Network VMNetworkSpec `json:"network,omitempty"` Storage VMStorageSpec `json:"storage,omitempty"` // This will be done at either "ignite start" or "ignite create" time // TODO: We might revisit this later CopyFiles []FileMapping `json:"copyFiles,omitempty"` // SSH specifies how the SSH setup should be done // nil here means "don't do anything special" // If SSH.Generate is set, Ignite will generate a new SSH key and copy it in to authorized_keys in the VM // Specifying a path in SSH.Generate means "use this public key" // If SSH.PublicKey is set, this struct will marshal as a string using that path // If SSH.Generate is set, this struct will marshal as a bool => true SSH *SSH `json:"ssh,omitempty"` }
VMSpec describes the configuration of a VM
func (*VMSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSpec.
func (*VMSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMStatus ¶
type VMStatus struct { Running bool `json:"running"` Runtime *Runtime `json:"runtime,omitempty"` StartTime *runtime.Time `json:"startTime,omitempty"` IPAddresses meta.IPAddresses `json:"ipAddresses,omitempty"` Image OCIImageSource `json:"image"` Kernel OCIImageSource `json:"kernel"` }
VMStatus defines the status of a VM
func (*VMStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMStatus.
func (*VMStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMStorageSpec ¶
type VMStorageSpec struct { Volumes []Volume `json:"volumes,omitempty"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` }
VMStorageSpec defines the VM's Volumes and VolumeMounts
func (*VMStorageSpec) DeepCopy ¶
func (in *VMStorageSpec) DeepCopy() *VMStorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMStorageSpec.
func (*VMStorageSpec) DeepCopyInto ¶
func (in *VMStorageSpec) DeepCopyInto(out *VMStorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Volume ¶
type Volume struct { Name string `json:"name"` BlockDevice *BlockDeviceVolume `json:"blockDevice,omitempty"` }
Volume defines named storage volume
func (*Volume) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeMount ¶
VolumeMount defines the mount point for a named volume inside a VM
func (*VolumeMount) DeepCopy ¶
func (in *VolumeMount) DeepCopy() *VolumeMount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMount.
func (*VolumeMount) DeepCopyInto ¶
func (in *VolumeMount) DeepCopyInto(out *VolumeMount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +k8s:openapi-gen=true +k8s:conversion-gen=github.com/weaveworks/ignite/pkg/apis/ignite
|
+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +k8s:openapi-gen=true +k8s:conversion-gen=github.com/weaveworks/ignite/pkg/apis/ignite |
+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +k8s:openapi-gen=true +k8s:conversion-gen=github.com/weaveworks/ignite/pkg/apis/ignite
|
+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +k8s:openapi-gen=true +k8s:conversion-gen=github.com/weaveworks/ignite/pkg/apis/ignite |