VirtualImage

Scope: Namespaced
Version: v1alpha2

This resource describes a virtual disk image or installation image (iso) that can be used as a data source for new VirtualDisks or can be mounted in Virtuals.

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 registy (DVCR) or PVC, into which the data from the source is filled.

  • apiVersion
    string

    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
    string

    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
    object
  • spec
    object

    Required value

    • spec.dataSource
      object

      Required value

      • spec.dataSource.containerImage
        object

        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
          string

          The CA chain in base64 format to verify the container registry.

          Example:

          caBundle: YWFhCg==
          
        • spec.dataSource.containerImage.image
          string

          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
          object
          • spec.dataSource.containerImage.imagePullSecret.name
            string

            A name of the secret containing registry credentials which must be located in the same namespace.

      • spec.dataSource.http
        object

        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
          string

          The CA chain in base64 format to verify the url.

          Example:

          caBundle: YWFhCg==
          
        • spec.dataSource.http.checksum
          object

          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
            string

            Pattern: ^[0-9a-fA-F]{32}$

            Length: 32..32

            Example:

            md5: f3b59bed9f91e32fac1210184fcff6f5
            
          • spec.dataSource.http.checksum.sha256
            string

            Pattern: ^[0-9a-fA-F]{64}$

            Length: 64..64

            Example:

            sha256: 78be890d71dde316c412da2ce8332ba47b9ce7a29d573801d2777e01aa20b9b5
            
        • spec.dataSource.http.url
          string

          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
        object

        Use an existing VirtualImage, ClusterVirtualImage or VirtualDisk to create an image.

        • spec.dataSource.objectRef.kind
          string

          Required value

          A kind of existing VirtualImage, ClusterVirtualImage or VirtualDisk.

          Allowed values: ClusterVirtualImage, VirtualImage, VirtualDisk

        • spec.dataSource.objectRef.name
          string

          Required value

          A name of existing VirtualImage, ClusterVirtualImage or VirtualDisk.

      • spec.dataSource.type
        string

        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 url
        • ContainerImage — 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

    • spec.persistentVolumeClaim
      object

      Settings for creating PVCs to store the image with storage type ‘PersistentVolumeClaim’.

      • spec.persistentVolumeClaim.storageClassName
        string

        The name of the StorageClass required by the claim. More info — https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1

        When creating image with storage type ‘PersistentVolumeClaim’, the user can specify the required StorageClass to create the image, or not explicitly, in which case the default StorageClass will be used.

    • spec.storage
      string

      Required value

      Storage type to store the image for current virtualization setup.

      • ContainerRegistry — use a dedicated deckhouse virtualization container registry (DVCR). In this case, images will be downloaded and injected to a container, then pushed to a DVCR (shipped with the virtualization module).
      • PersistentVolumeClaim - use a Persistent Volume Claim (PVC).
      • Kubernetes - Deprecated: Use of this value is discouraged and may be removed in future versions. Use PersistentVolumeClaim instead.

      Default: "ContainerRegistry"

      Allowed values: ContainerRegistry, Kubernetes, PersistentVolumeClaim