Data Import Service for kubernetes, designed with kubevirt in mind.
Go to file
2019-04-03 14:11:42 +03:00
.github Issue and PR templates for PROW 2018-09-10 08:57:20 -04:00
api/openapi-spec make CDIConfig client cluster scoped and fix occasional crash 2019-03-04 18:54:58 -05:00
automation update k8s image to 1.13.3 and enable ceph 2019-03-27 11:41:35 +02:00
cluster Merge pull request #724 from igoihman/replace-k8s-version 2019-03-28 18:09:19 -04:00
cmd Adding support to import disk image into Block PV 2019-03-28 11:43:56 +02:00
doc Fixing issue 737 - update import-block-pv.md 2019-04-02 10:32:24 +03:00
hack Merge pull request #724 from igoihman/replace-k8s-version 2019-03-28 18:09:19 -04:00
manifests Adding support to import disk image into Block PV 2019-03-28 11:43:56 +02:00
pkg Fix for isue #1690415 - CDI appends 'source pod' to a label and may fail on error that label must not be longer than 63 characters 2019-04-03 14:11:42 +03:00
tests Merge branch 'master' into func-test-fix 2019-04-01 19:40:07 -04:00
tools add copies the flags after flags parse 2019-03-07 23:20:34 +09:00
vendor update vendor excuting glide 2019-03-06 23:23:44 +09:00
.gitignore this file shouldn't be here 2019-02-05 13:16:58 -05:00
.travis.yml update go to 1.11.5 2019-02-27 09:29:19 -05:00
CONTRIBUTING.md Add CONTRIBUTING.md 2019-01-09 15:39:16 -05:00
doc.go add a random go file to satisfy dep package manager 2019-02-13 10:17:08 -08:00
glide.lock update vendor excuting glide 2019-03-06 23:23:44 +09:00
glide.yaml update glide.yaml 2019-03-05 23:26:03 +09:00
LICENSE Add Apache V2 license (#379) 2018-08-28 14:50:21 -07:00
Makefile Adding support to import disk image into Block PV 2019-03-28 11:43:56 +02:00
README.md Update README 2019-03-04 09:17:29 -07:00
stdci.yaml update k8s image to 1.13.3 and enable ceph 2019-03-27 11:41:35 +02:00

Containerized Data Importer

Build Status Go Report Card Coverage Status Licensed under Apache License version 2.0

Containerized-Data-Importer (CDI) is a persistent storage management add-on for Kubernetes. It's primary goal is to provide a declarative way to build Virtual Machine Disks on PVCs for Kubevirt VMs

CDI works with standard core Kubernetes resources and is storage device agnostic, while its primary focus is to build disk images for Kubevirt, it's also useful outside of a Kubevirt context to use for initializing your Kubernetes Volumes with data.

Introduction

Kubernetes extension to populate PVCs with VM images

CDI provides the ability to populate PVCs with VM images upon creation. Multiple image formats and sources are supported:

Current supported Image formats

  • .tar
  • .gz
  • .xz
  • .img
  • .iso
  • .qcow2

Current supported image endpoints

  • http
  • S3
  • local directory

DataVolumes

CDI also includes a CRD, that provides an object of type DataVolume. The DataVolume is an abstraction on top of the standard Kubernetes PVC and can be used to automate creation and population of a PVC for consumption in a Kubevirt VM.

Deploy it

Deploying the CDI controller is straightforward. In this document the default namespace is used, but in a production setup a protected namespace that is inaccessible to regular users should be used instead.

$ export VERSION=$(curl https://github.com/kubevirt/containerized-data-importer/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*")
$ kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$VERSION/cdi-operator.yaml
$ kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$VERSION/cdi-operator-cr.yaml

Use it

Create a DataVolume and populate it with data from an http source

$ kubectl create -f https://raw.githubusercontent.com/kubevirt/containerized-data-importer/$VERSION/manifests/example/datavolume.yaml

There are quite a few examples in the example manifests, check them out as a reference to create DataVolumes from additional sources like registries, S3 and your local system.

Hack it

CDI includes a self contained development and test environment. We use Docker to build, and we provide a simple way to get a test cluster up and running on your laptop.

$ mkdir $GOPATH/src/kubevirt.io && cd $GOPATH/src/kubevirt.io
$ git clone https://github.com/kubevirt/containerized-data-importer && cd containerized-data-importer
$ make cluster-up
$ make cluster-sync
$ ./cluster/kubect.sh .....

Connect with us

We'd love to hear from you, reach out on Github via Issues or Pull Requests!

Hit us up on Slack, under the Kubernetes Virtualization channel

Shoot us an email at: kubevirt-dev@googlegroups.com

More details

  1. Hacking details
  2. Design docs
  3. Kubevirt documentation