Documentation ¶
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Condition
- type ConditionType
- type ExportManifestType
- type ExportVolumeFormat
- type VirtualMachineExport
- type VirtualMachineExportLink
- type VirtualMachineExportLinks
- type VirtualMachineExportList
- type VirtualMachineExportManifest
- type VirtualMachineExportPhase
- type VirtualMachineExportSpec
- type VirtualMachineExportStatus
- type VirtualMachineExportVolume
- type VirtualMachineExportVolumeFormat
Constants ¶
const ( App = "virt-exporter" DefaultDurationTTL = 2 * time.Hour )
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: export.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Condition ¶
type Condition struct { Type ConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` // +optional // +nullable LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` // +optional // +nullable LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // +optional Reason string `json:"reason,omitempty"` // +optional Message string `json:"message,omitempty"` }
Condition defines conditions
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Condition) SwaggerDoc ¶
type ConditionType ¶
type ConditionType string
ConditionType is the const type for Conditions
const ( // ConditionReady is the "ready" condition type ConditionReady ConditionType = "Ready" // ConditionPVC is the condition of the PVC we are exporting ConditionPVC ConditionType = "PVCReady" // ConditionVolumesCreated is the condition to see if volumes are created from volume snapshots ConditionVolumesCreated ConditionType = "VolumesCreated" )
type ExportManifestType ¶ added in v0.59.0
type ExportManifestType string
const ( // AllManifests returns all manifests except for the token secret AllManifests ExportManifestType = "all" // AuthHeader returns a CDI compatible secret containing the token as an Auth header AuthHeader ExportManifestType = "auth-header-secret" )
type ExportVolumeFormat ¶
type ExportVolumeFormat string
const ( // KubeVirtRaw is the volume in RAW format KubeVirtRaw ExportVolumeFormat = "raw" // KubeVirtGZ is the volume in gzipped RAW format. KubeVirtGz ExportVolumeFormat = "gzip" // Dir is an uncompressed directory, which points to the root of a PersistentVolumeClaim, exposed using a FileServer https://pkg.go.dev/net/http#FileServer Dir ExportVolumeFormat = "dir" // ArchiveGz is a tarred and gzipped version of the root of a PersistentVolumeClaim ArchiveGz ExportVolumeFormat = "tar.gz" )
type VirtualMachineExport ¶
type VirtualMachineExport struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VirtualMachineExportSpec `json:"spec"` // +optional Status *VirtualMachineExportStatus `json:"status,omitempty"` }
VirtualMachineExport defines the operation of exporting a VM source +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineExport) DeepCopy ¶
func (in *VirtualMachineExport) DeepCopy() *VirtualMachineExport
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExport.
func (*VirtualMachineExport) DeepCopyInto ¶
func (in *VirtualMachineExport) DeepCopyInto(out *VirtualMachineExport)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineExport) DeepCopyObject ¶
func (in *VirtualMachineExport) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (VirtualMachineExport) SwaggerDoc ¶
func (VirtualMachineExport) SwaggerDoc() map[string]string
type VirtualMachineExportLink ¶
type VirtualMachineExportLink struct { // Cert is the public CA certificate base64 encoded Cert string `json:"cert"` // Volumes is a list of available volumes to export // +listType=map // +listMapKey=name // +optional Volumes []VirtualMachineExportVolume `json:"volumes,omitempty"` // Manifests is a list of available manifests for the export // +listType=map // +listMapKey=type // +optional Manifests []VirtualMachineExportManifest `json:"manifests,omitempty"` }
VirtualMachineExportLink contains a list of volumes available for export, as well as the URLs to obtain these volumes
func (*VirtualMachineExportLink) DeepCopy ¶
func (in *VirtualMachineExportLink) DeepCopy() *VirtualMachineExportLink
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportLink.
func (*VirtualMachineExportLink) DeepCopyInto ¶
func (in *VirtualMachineExportLink) DeepCopyInto(out *VirtualMachineExportLink)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportLink) SwaggerDoc ¶
func (VirtualMachineExportLink) SwaggerDoc() map[string]string
type VirtualMachineExportLinks ¶
type VirtualMachineExportLinks struct { // +optional Internal *VirtualMachineExportLink `json:"internal,omitempty"` // +optional External *VirtualMachineExportLink `json:"external,omitempty"` }
VirtualMachineExportLinks contains the links that point the exported VM resources
func (*VirtualMachineExportLinks) DeepCopy ¶
func (in *VirtualMachineExportLinks) DeepCopy() *VirtualMachineExportLinks
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportLinks.
func (*VirtualMachineExportLinks) DeepCopyInto ¶
func (in *VirtualMachineExportLinks) DeepCopyInto(out *VirtualMachineExportLinks)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportLinks) SwaggerDoc ¶
func (VirtualMachineExportLinks) SwaggerDoc() map[string]string
type VirtualMachineExportList ¶
type VirtualMachineExportList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` // +listType=atomic Items []VirtualMachineExport `json:"items"` }
VirtualMachineExportList is a list of VirtualMachineExport resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineExportList) DeepCopy ¶
func (in *VirtualMachineExportList) DeepCopy() *VirtualMachineExportList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportList.
func (*VirtualMachineExportList) DeepCopyInto ¶
func (in *VirtualMachineExportList) DeepCopyInto(out *VirtualMachineExportList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineExportList) DeepCopyObject ¶
func (in *VirtualMachineExportList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (VirtualMachineExportList) SwaggerDoc ¶
func (VirtualMachineExportList) SwaggerDoc() map[string]string
type VirtualMachineExportManifest ¶ added in v0.59.0
type VirtualMachineExportManifest struct { // Type is the type of manifest returned Type ExportManifestType `json:"type"` // Url is the url of the endpoint that returns the manifest Url string `json:"url"` }
VirtualMachineExportManifest contains the type and URL of the exported manifest
func (*VirtualMachineExportManifest) DeepCopy ¶ added in v0.59.0
func (in *VirtualMachineExportManifest) DeepCopy() *VirtualMachineExportManifest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportManifest.
func (*VirtualMachineExportManifest) DeepCopyInto ¶ added in v0.59.0
func (in *VirtualMachineExportManifest) DeepCopyInto(out *VirtualMachineExportManifest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportManifest) SwaggerDoc ¶ added in v0.59.0
func (VirtualMachineExportManifest) SwaggerDoc() map[string]string
type VirtualMachineExportPhase ¶
type VirtualMachineExportPhase string
VirtualMachineExportPhase is the current phase of the VirtualMachineExport
const ( // Pending means the Virtual Machine export is pending Pending VirtualMachineExportPhase = "Pending" // Ready means the Virtual Machine export is ready Ready VirtualMachineExportPhase = "Ready" // Terminated means the Virtual Machine export is terminated and no longer available Terminated VirtualMachineExportPhase = "Terminated" // Skipped means the export is invalid in a way so the exporter pod cannot start, and we are skipping creating the exporter server pod. Skipped VirtualMachineExportPhase = "Skipped" )
type VirtualMachineExportSpec ¶
type VirtualMachineExportSpec struct { Source corev1.TypedLocalObjectReference `json:"source"` // +optional // TokenSecretRef is the name of the custom-defined secret that contains the token used by the export server pod TokenSecretRef *string `json:"tokenSecretRef,omitempty"` // ttlDuration limits the lifetime of an export // If this field is set, after this duration has passed from counting from CreationTimestamp, // the export is eligible to be automatically deleted. // If this field is omitted, a reasonable default is applied. // +optional TTLDuration *metav1.Duration `json:"ttlDuration,omitempty"` }
VirtualMachineExportSpec is the spec for a VirtualMachineExport resource
func (*VirtualMachineExportSpec) DeepCopy ¶
func (in *VirtualMachineExportSpec) DeepCopy() *VirtualMachineExportSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportSpec.
func (*VirtualMachineExportSpec) DeepCopyInto ¶
func (in *VirtualMachineExportSpec) DeepCopyInto(out *VirtualMachineExportSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportSpec) SwaggerDoc ¶
func (VirtualMachineExportSpec) SwaggerDoc() map[string]string
type VirtualMachineExportStatus ¶
type VirtualMachineExportStatus struct { // +optional Phase VirtualMachineExportPhase `json:"phase,omitempty"` // +optional Links *VirtualMachineExportLinks `json:"links,omitempty"` // +optional // TokenSecretRef is the name of the secret that contains the token used by the export server pod TokenSecretRef *string `json:"tokenSecretRef,omitempty"` // The time at which the VM Export will be completely removed according to specified TTL // Formula is CreationTimestamp + TTL TTLExpirationTime *metav1.Time `json:"ttlExpirationTime,omitempty"` // +optional // ServiceName is the name of the service created associated with the Virtual Machine export. It will be used to // create the internal URLs for downloading the images ServiceName string `json:"serviceName,omitempty"` // +optional // VirtualMachineName shows the name of the source virtual machine if the source is either a VirtualMachine or // a VirtualMachineSnapshot. This is mainly to easily identify the source VirtualMachine in case of a // VirtualMachineSnapshot VirtualMachineName *string `json:"virtualMachineName,omitempty"` // +optional // +listType=atomic Conditions []Condition `json:"conditions,omitempty"` }
VirtualMachineExportStatus is the status for a VirtualMachineExport resource
func (*VirtualMachineExportStatus) DeepCopy ¶
func (in *VirtualMachineExportStatus) DeepCopy() *VirtualMachineExportStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportStatus.
func (*VirtualMachineExportStatus) DeepCopyInto ¶
func (in *VirtualMachineExportStatus) DeepCopyInto(out *VirtualMachineExportStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportStatus) SwaggerDoc ¶
func (VirtualMachineExportStatus) SwaggerDoc() map[string]string
type VirtualMachineExportVolume ¶
type VirtualMachineExportVolume struct { // Name is the name of the exported volume Name string `json:"name"` // +listType=map // +listMapKey=format // +optional Formats []VirtualMachineExportVolumeFormat `json:"formats,omitempty"` }
VirtualMachineExportVolume contains the name and available formats for the exported volume
func (*VirtualMachineExportVolume) DeepCopy ¶
func (in *VirtualMachineExportVolume) DeepCopy() *VirtualMachineExportVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportVolume.
func (*VirtualMachineExportVolume) DeepCopyInto ¶
func (in *VirtualMachineExportVolume) DeepCopyInto(out *VirtualMachineExportVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportVolume) SwaggerDoc ¶
func (VirtualMachineExportVolume) SwaggerDoc() map[string]string
type VirtualMachineExportVolumeFormat ¶
type VirtualMachineExportVolumeFormat struct { // Format is the format of the image at the specified URL Format ExportVolumeFormat `json:"format"` // Url is the url that contains the volume in the format specified Url string `json:"url"` }
VirtualMachineExportVolumeFormat contains the format type and URL to get the volume in that format
func (*VirtualMachineExportVolumeFormat) DeepCopy ¶
func (in *VirtualMachineExportVolumeFormat) DeepCopy() *VirtualMachineExportVolumeFormat
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineExportVolumeFormat.
func (*VirtualMachineExportVolumeFormat) DeepCopyInto ¶
func (in *VirtualMachineExportVolumeFormat) DeepCopyInto(out *VirtualMachineExportVolumeFormat)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VirtualMachineExportVolumeFormat) SwaggerDoc ¶
func (VirtualMachineExportVolumeFormat) SwaggerDoc() map[string]string