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 Virtuals
directly. This resource type is available for all namespaces in the cluster.
This resource cannot be modified once it has been created.
A container image is created under the hood of this resource, which is 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
An origin of the image.
- spec.dataSource.containerImage
Use an image stored in external container registry. Only TLS enabled registries are supported. Use caBundle field to provide custom CA chain if needed.
- spec.dataSource.containerImage.caBundle
The CA chain in base64 format to verify the container registry.
Example:
caBundle: YWFhCg==
- spec.dataSource.containerImage.image
Required value
The container registry address of an image.
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
A name of the secret containing registry credentials.
- spec.dataSource.containerImage.imagePullSecret.namespace
A namespace where imagePullSecret is located.
- spec.dataSource.http
Fill the image with data from some external url. Supported schemas are:
- http
- https
For https schema there is an option to skip TLS verification.
- spec.dataSource.http.caBundle
The CA chain in base64 format to verify the url.
Example:
caBundle: YWFhCg==
- spec.dataSource.http.checksum
A checksum of the file, provided by the url, to verify if it was downloaded correctly or wasn’t changed. The file should 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
The http url with an image. The following formats are supported:
- qcow2
- vmdk
- vdi
- iso
- raw these formats can also be compressed with 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
orVirtualDisk
to create an image.- spec.dataSource.objectRef.kind
Required value
A kind of existing
VirtualImage
,ClusterVirtualImage
orVirtualDisk
.Allowed values:
ClusterVirtualImage
,VirtualImage
,VirtualDisk
- spec.dataSource.objectRef.name
Required value
A name of existing
VirtualImage
,ClusterVirtualImage
orVirtualDisk
. - spec.dataSource.objectRef.namespace
A namespace where
VirtualImage
orVirtualDisk
is located.
- spec.dataSource.type
Required value
The type of an origin of the image. Options are:
HTTP
— create an image from a file published on http/https service at a given urlContainerImage
— create the image from image stored in container registry.ObjectRef
— fill the disk from another existing resource.Upload
— fill the image with data, uploaded by user via the special interface.
Allowed values:
HTTP
,ContainerImage
,ObjectRef
,Upload