cdi-operator
by QuenchWorks
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
| Key | Default | Notes |
|---|---|---|
images.<component>.repository, .digest | QuenchWorks images | all seven pinned by digest |
cdi.create | true | create the CDI resource that deploys CDI |
cdi.spec | feature gate HonorWaitForFirstConsumer, linux node selectors | the CDI resource's spec, as written |
verbosity | 1 | klog level of the CDI components |
resources | 100m / 150Mi requests | the operator only |
Notes
- Uninstall in two steps:
kubectl delete cdi cdi(the operator removes CDI and the resource's finalizer), thenhelm uninstall. The CRD stays, as Helm leavescrds/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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcdi-operator is pinned at v0.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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