cdi-operator

by QuenchWorks

Helm chartv0.0.1App 1.66.1Apache-2.0Verified publisher

KubeVirt Containerized Data Importer (CDI) through its operator: DataVolumes import disk images from HTTP(S), S3 or a registry into PVCs, take uploads and clone volumes. The operator deploys the CDI controller, API server and upload proxy from a CDI resource. All seven component images are QuenchWorks-built from source, nonroot, CVE-gated, pinned by digest and cosign-signed.

About this chart

Quenchworks cdi-operator

The KubeVirt Containerized Data Importer 1.66.1 through its operator. CDI fills PVCs with disk images: a DataVolume names a source (HTTP(S), S3, GCS, a container registry, an upload, or another PVC) and CDI imports it, converting to a raw disk image with qemu-img. KubeVirt VMs boot from those PVCs, but CDI works without KubeVirt too.

All seven component images are QuenchWorks-built from source (nonroot, CVE-gated at build, pinned by digest, cosign-signed): cdi-operator, cdi-controller, cdi-apiserver, cdi-uploadproxy, and the per-DataVolume cdi-importer (with nbdkit built from source), cdi-uploadserver and cdi-cloner.

Install

helm install cdi oci://ghcr.io/quenchworks/charts/cdi-operator -n cdi --create-namespace
kubectl wait cdi cdi --for=condition=Available --timeout=10m

The chart installs the CDI CRD, the operator and a CDI resource; the operator then deploys the controller, API server and upload proxy in the same namespace. CDI is one per cluster.

Import a disk image

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: my-disk
spec:
  source:
    http:
      url: https://example.com/images/disk.qcow2   # qcow2, raw or iso, optionally .gz or .xz
  storage:
    resources:
      requests:
        storage: 10Gi

With the default HonorWaitForFirstConsumer feature gate and a WaitForFirstConsumer storage class, the import starts when a pod uses the PVC.

Values

KeyDefaultNotes
images.<component>.repository, .digestQuenchWorks imagesall seven pinned by digest
cdi.createtruecreate the CDI resource that deploys CDI
cdi.specfeature gate HonorWaitForFirstConsumer, linux node selectorsthe CDI resource's spec, as written
verbosity1klog level of the CDI components
resources100m / 150Mi requeststhe operator only

Notes

  • Uninstall in two steps: kubectl delete cdi cdi (the operator removes CDI and the resource's finalizer), then helm uninstall. The CRD stays, as Helm leaves crds/ in place.
  • HTTP imports go through scratch space: CDI adds a scratch PVC from the same storage class, so that class needs room for a second copy during the import.
  • VMware (VDDK) imports are not supported: they need VMware's proprietary VDDK library.
  • The oVirt and OpenStack populators run from the importer image, as upstream ships them.

Deploy cdi-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cdi-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcdi-operator is pinned at v0.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply