Data Import Service for kubernetes, designed with kubevirt in mind.
Go to file
Alexander Wels 0773572e5d
Refactored provider infra structure (#831)
* Remove a flaky part of the test that didn't add value.

Signed-off-by: Alexander Wels <awels@redhat.com>

Updated k8s image to latest.
Refactored cluster up to allow for adding more providers easily.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Updated k8s image to latest.
Refactored cluster up to allow for adding more providers easily.
Enable OKD 4.1 provider

Signed-off-by: Alexander Wels <awels@redhat.com>
2019-06-13 14:29:42 -04:00
.github Issue and PR templates for PROW 2018-09-10 08:57:20 -04:00
api/openapi-spec Generate new clientset compatable with k8s-1.13.4 2019-05-16 09:38:37 +03:00
assets CDI operator OLM integration: 2019-05-01 13:54:28 +03:00
automation Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
cluster-sync Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
cluster-up Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
cmd datavolume_test: malicious qcow2 images 2019-06-04 12:53:08 +03:00
doc Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
hack Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
manifests fix host:port not allowed in insecure registry configmap 2019-05-29 17:05:55 -04:00
pkg increase uploadproxy route timeout (#854) 2019-06-13 13:06:56 -04:00
tests functional test for upload 2019-06-11 09:59:25 +03:00
tools datavolume_test: malicious qcow2 images 2019-06-04 12:53:08 +03:00
vendor smart-clone 2019-05-20 11:04:10 +03:00
.gitignore Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
.travis.yml Revert user change. 2019-05-01 12:16:41 -04:00
CONTRIBUTING.md Add CONTRIBUTING.md 2019-01-09 15:39:16 -05:00
doc.go Fix a bunch of go score card issues. 2019-05-06 16:52:03 -04:00
glide.lock smart-clone 2019-05-20 11:04:10 +03:00
glide.yaml smart-clone 2019-05-20 11:04:10 +03:00
LICENSE Add Apache V2 license (#379) 2018-08-28 14:50:21 -07:00
Makefile Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
README.md Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04:00
stdci.yaml Refactored provider infra structure (#831) 2019-06-13 14:29:42 -04: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 -s 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/import-kubevirt-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. The development tools include a version of kubectl that you can use to communicate with the cluster. A wrapper script to communicate with the cluster can be invoked using ./cluster-up/kubectl.sh.

$ 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-up/kubectl.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