Commit Graph

40 Commits

Author SHA1 Message Date
Matthew Arnold
dc6bad6473
Fill out VDDK data volume source. (#1320)
* Add support for a VDDK datasource to the controllers

This commit does not implement the VDDK datasource. It simply
adds the DataVolumeSourceVDDK type and adds support to the
datavolume and import controllers for it. The datasource itself
will need to be done in a follow-up.

Signed-off-by: Sam Lucidi <slucidi@redhat.com>

* Fix tests and clean up lint

Signed-off-by: Sam Lucidi <slucidi@redhat.com>

* Add DataVolumeSourceVDDK to the v1alpha1 api group

Signed-off-by: Sam Lucidi <slucidi@redhat.com>

* Install nbdkit.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add govmomi to vendor directory.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Integrate govmomi into build.

Incomplete! This allows 'find' and 'object' imports from govmomi, but
further dependencies may require more bazel tweaks later.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Create a container image just to hold the VDDK.

Mount the VDDK folder to /opt. Also copy the libxcrypt-compat RPM to
/opt for run-time installation as a temporary workaround for my
inability to install it at container creation time. Make VDDK optional
by storing a dummy file in its directory, so an empty VDDK directory
will not break the build.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Fill in VDDK data source.

Add the simplest possible VDDK data source: set up an nbdkit server with
the given VMware parameters, and copy data out using qemu-img.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add vddk to resource validation schema.

Stops "error validating data" messages.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Move libxcrypt-compat install out of VDDK image.

Requiring users to add this to the VDDK image is kind of onerous, so
move it straight into the importer image instead.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Generate BUILD.bazel for the rest of govmomi.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Get VDDK sidecar image from v2v-vmware ConfigMap.

Convention from https://github.com/kubevirt/web-ui-components/pull/534

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Reduce nbdkit startup timeout.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Update govmomi dependencies.

Cleans up 'inconsistent vendoring' errors.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Fix schema verification test.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Change disk.raw to disk.img.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add vCenter simulator for VDDK datasource tests.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Functional test with vcsim and dummy VDDK plugin.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Clean up lint errors.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Check kubevirt-hyperconverged namespace for VDDK.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add VDDK unit tests and API functional test.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Read a raw image for VDDK test plugin.

Have the fake VDDK test plugin for nbdkit read a raw image passed in
/opt/updates/nbdtest.img instead of returning fixed data.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add some documentation about VDDK data sources.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Remove unit test focus and trailing spaces.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Use updated build container image.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add some extra comments about VDDK fields.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Clarify VDDK ConfigMap a little more.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Clarify namespace for vddk-init sidecar.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Remove NodePort from vCenter simulator manifest.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Re-word explanations on VDDK source types.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Add VDDK to comment with types needing URL check.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Rebuild types.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Move AnnThumbprint to storage.import.vddk.thumbprint.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Remove run-time installation of libxcrypt-compat.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Remove fixed namespaces for vddk-init reference.

The importer now looks for the v2v-vmware ConfigMap in the current CDI
namespace instead of openshift-cnv/kubevirt-hyperconverged.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

* Find CDI install namespace from data volume test.

Signed-off-by: Matthew Arnold <marnold@redhat.com>

Co-authored-by: Sam Lucidi <slucidi@redhat.com>
2020-09-11 23:37:22 +02:00
Michael Henriksen
9e2c79b1e0
move api groups to v1beta1 (#1232)
* move upload.cdi.kubevirt.io API group to v1beta1

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>

* move core api to v1beta1

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>

* fix os-3.11 cluster sync and add functional tests for alpha api

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>

* change more occurences of v1alpha1

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>

* updates after rebase

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2020-07-10 15:47:38 +02:00
Sue Yoon
668a7f54de
Minor fix to a manifest example, import-kubevirt-block-datavolume (#1184)
Signed-off-by: isueyoon <sueyoon@protonmail.com>
2020-04-19 13:44:05 +02:00
Pedro Ibanez Requena
fad70f9fb6 fixing names issue as the image is the cirros and the names where referencing to fedora (#1011)
Signed-off-by: Pedro Ibáñez <pedro@redhat.com>
2019-11-08 07:57:12 -05:00
Alexander Wels
3f489cc2f0
Merge pull request #751 from awels/fix_example_links
Fix example links in datavolume documentation.
2019-04-24 08:02:12 -04:00
tavni
e9b6b4f501 Adding support to upload disk image to a Raw Block PV
Signed-off-by: tavni <tavni@redhat.com>
2019-04-17 10:27:24 +03:00
Alexander Wels
31db48f65c Fix example links in datavolume documentation.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-04-15 15:31:44 -04:00
tavni
e6665945bc Adding support to clone disk image from one Block PV to another
Signed-off-by: tavni <tavni@redhat.com>
2019-04-15 15:33:52 +03:00
tavni
d4c7b0be54 Adding support to import disk image into Block PV
Signed-off-by: tavni <tavni@redhat.com>
2019-03-28 11:43:56 +02:00
Michael Henriksen
1bec192217 update docs for https cert configuration 2019-03-15 14:08:45 -04:00
Mariusz Mazur
754f720601 Correct datavol src:registry example manifest 2019-03-08 16:08:38 +01:00
Alexander Wels
1854618522 Update examples to use data volumes everywhere.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-02-28 11:22:09 -05:00
Irit Goihman
e3a8efbdce add example manifest for CDI Config
Signed-off-by: Irit goihman <igoihman@redhat.com>
2019-02-24 10:23:35 +02:00
Michael Henriksen
717ceaa919 add ability for user to specify certs for import from registry 2019-02-18 09:06:46 -05:00
annastopel
b9edce9ef0 Import VM disk from ContainerDisk image 2019-02-12 21:11:39 +02:00
tavni
c245fe2ae6 Adding DataVolume support for unpacking imported archive
Signed-off-by: tavni <tavni@redhat.com>
2019-01-08 15:10:02 +02:00
Michael Henriksen
d95f5b4591 don't specify storage class in example dv manifest 2018-12-20 13:20:34 -05:00
Daniel Erez
bf9de5b585 manifests example: import registry image
Change-Id: I3cd19b512ff46e295ae4a093400c5cac9b189652
Signed-off-by: Daniel Erez <derez@redhat.com>
2018-12-19 15:04:18 +02:00
tavni
01b243a8f3 manifest/example/local-pv-allocation-claim.yaml fails on validation #565
Signed-off-by: tavni <tavni@redhat.com>
2018-12-09 16:12:54 +02:00
Fred Rolland
47c8fc63a1 Fix wrong annotation in documentation 2018-11-28 23:59:59 +02:00
tavni
aebc2b3e87 Add ability to create empty disk images #497
Signed-off-by: tavni <tavni@redhat.com>
2018-11-27 16:15:44 +02:00
Irit Goihman
3685aa851f fix upload-datavolume manifest 2018-11-15 11:56:11 +02:00
tavni
b9646dec05 Determine node where local PV is allocated
Signed-off-by: tavni <tavni@redhat.com>
2018-11-13 15:35:51 +02:00
Alexander Wels
4c762a8bab
Merge branch 'master' into cleaning 2018-11-01 08:07:28 -04:00
Alexander Wels
a5a82aa970 Report import progress with prometheus
- Added code report progress with prometheus

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-10-31 11:26:38 -04:00
tavni
d7dce90bcb Removing unnecessary code and update Const UPLOAD name #506
Signed-off-by: tavni <tavni@redhat.com>
2018-10-28 16:17:28 +02:00
Alexander Wels
1eaf3a5908
Update upload-datavolume.yaml 2018-10-16 08:49:02 -04:00
tavni
bb7a5bb4b2 Orchestrate upload using a DataVolume
Signed-off-by: tavni <tavni@redhat.com>
2018-10-16 07:40:50 +03:00
Alexander Wels
24296f1270 Add Data Volume documentation
Signed-off-by: Alexander Wels <awels@redhat.com>
2018-09-27 13:49:40 -04:00
Michael Henriksen
452e30bca7 add verification to functional test and change to shared pod phase annotation 2018-09-19 14:37:19 -04:00
Michael Henriksen
cd81879806 initial implementation of upload controller and upload server 2018-09-19 12:30:45 -04:00
David Vossel
3fad2c151b Update datavolume examples to use ReadWriteOnce for hostpath
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-09-12 12:53:55 -04:00
Adam Litke
1afffc682a doc: Add storage class to example PVC
Fixes #221.

Signed-off-by: Adam Litke <alitke@redhat.com>
2018-09-07 14:16:18 -04:00
tavni
37b245a2f3 DataVolume: Support Cloning 2018-08-02 23:52:04 +03:00
zvikorn
80b3180370 Host-assisted cloning integrated to CDI (#219)
* [WIP] Host-assisted cloning integrated to CDI

* changing back import from kubevirt.io to github.com/kubevirt

* [WIP] - changing code according feedback

* Applied comments

* changed PullPolicy

* applied comments

* minor fix for logging
2018-07-06 14:38:18 -05:00
David Vossel
7106bf73dc Conform with top level kubevirt github project (#198)
* Place cdi packages under the top level kubevirt.io project path

Signed-off-by: David Vossel <davidvossel@gmail.com>

* Change all references to cdi.io to cdi.kubevirt.io

Signed-off-by: David Vossel <davidvossel@gmail.com>

* Add go_import_path to travis config

Signed-off-by: David Vossel <davidvossel@gmail.com>

* update test package imports

Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-06-21 15:44:52 -07:00
jeff vance
e8233a3786 change cdi anno from to 2018-06-14 13:50:49 -07:00
David Vossel
9a9f19dcd6 datavolume controller
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-06-11 21:58:15 -04:00
Jon Cope
785424cd8f Refactor Controller to internally setup event handlers
Make CDI selector label a global constant

Parameterize selectorlabel

Handled nil selector case

Handel NewController error in testing, use constant importer tag

Changed informer factory back to un-filtered, fixed nil ptr error

removed labels, to be handled in a separate pr

To accomodate testing, NewController takes a pre-created Informer, not a factory

Add global constant for default resync

fix makefile bug

fix bug in deployent manifest
2018-04-26 15:34:35 -05:00
Jon Cope
93ab1e8fb6 Made deployment guide for concise 2018-03-23 12:46:23 -05:00