ClusterVirtualImage
Scope: Cluster
Version: v1alpha2
Describes a virtual disk image that can be used as a data source for new VirtualDisks or an installation image (iso) to be mounted in VirtualMachines directly. This resource type is available for all namespaces in the cluster.
This resource cannot be modified once it has been created.
With this resource in the cluster, a container image is created and stored in a dedicated Deckhouse Virtualization Container Registry (DVCR).
- apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- metadata
- spec
Required value
- spec.dataSource
Required value
Origin of the image.
- spec.dataSource.containerImage
Use an image stored in external container registry. Only registries with enabled TLS protocol are supported. To provide a custom Certificate Authority (CA) chain, use the
caBundle
field.- spec.dataSource.containerImage.caBundle
CA chain in Base64 format to verify the container registry.
Example:
caBundle: YWFhCg==
- spec.dataSource.containerImage.image
Required value
Path to the image in the container registry.
Pattern:
^(?P<name>(?:(?P<domain>(?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)/)?(?P<image>[a-z0-9_.-]+(?:/[a-z0-9_.-]+)*))(?::(?P<tag>[\w][\w.-]{0,127}))?(?:@(?P<digest>[A-Za-z][A-Za-z0-9]*(?:[+.-_][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,}))?$
Example:
image: registry.example.com/images/slackware:15
- spec.dataSource.containerImage.imagePullSecret
- spec.dataSource.containerImage.imagePullSecret.name
Name of the secret keeping container registry credentials.
- spec.dataSource.containerImage.imagePullSecret.namespace
Namespace where
imagePullSecret
is located.
- spec.dataSource.http
Fill the image with data from an external URL. The following schemas are supported:
- HTTP
- HTTPS
For HTTPS schema, there is an option to skip the TLS verification.
- spec.dataSource.http.caBundle
CA chain in Base64 format to verify the URL.
Example:
caBundle: YWFhCg==
- spec.dataSource.http.checksum
Checksum to verify integrity and consistency of the downloaded file. The file must match all specified checksums.
- spec.dataSource.http.checksum.md5
Pattern:
^[0-9a-fA-F]{32}$
Length:
32..32
Example:
md5: f3b59bed9f91e32fac1210184fcff6f5
- spec.dataSource.http.checksum.sha256
Pattern:
^[0-9a-fA-F]{64}$
Length:
64..64
Example:
sha256: 78be890d71dde316c412da2ce8332ba47b9ce7a29d573801d2777e01aa20b9b5
- spec.dataSource.http.url
Required value
URL of the file for creating an image. The following file formats are supported:
- qcow2
- vmdk
- vdi
- iso
- raw The file can be compressed into an archive in one of the following formats:
- gz
- xz
Pattern:
^http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$
Example:
url: https://mirror.example.com/images/slackware-15.qcow.gz
- spec.dataSource.objectRef
Use an existing VirtualImage, ClusterVirtualImage, or VirtualDisk resource to create an image.
- spec.dataSource.objectRef.kind
Required value
Kind of the existing VirtualImage, ClusterVirtualImage, or VirtualDisk resource.
Allowed values:
ClusterVirtualImage
,VirtualImage
,VirtualDisk
- spec.dataSource.objectRef.name
Required value
Name of the existing VirtualImage, ClusterVirtualImage, or VirtualDisk resource.
- spec.dataSource.objectRef.namespace
Namespace where the VirtualImage or VirtualDisk resource is located.
- spec.dataSource.type
Required value
The following image sources are available for creating an image:
HTTP
: From a file published on an HTTP/HTTPS service at a given URL.ContainerImage
: From another image stored in a container registry.ObjectRef
: From an existing resource.Upload
: From data uploaded by the user via a special interface.
Allowed values:
HTTP
,ContainerImage
,ObjectRef
,Upload