Commit Graph

132 Commits

Author SHA1 Message Date
zvikorn
7dd334121c Creating blank disk on a block device (#962)
Signed-off-by: tavni <tavni@redhat.com>
2019-09-18 19:06:02 -04:00
Michael Henriksen
834b85ecbf Network clone (#897)
* network cloning

* fix clone progress
2019-08-01 16:01:25 -04:00
Alexander Wels
9e4c3de198
Pass provisionOnNode annotation to PVC if on data volume. (#899)
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-07-30 13:12:33 -04:00
Michael Henriksen
ec52c85a25 Validating webhook and token authorization for PVC cloning (#869)
* baseline refactoring of webhook package

* datavolume clone validation webhook

* rename datavolumes/clone-init to datavolumes/source

* add RBAC doc

* updates from review

* make clone permission check exportable function

* force dumb cloning in in functional test
2019-07-09 14:02:31 -04:00
Alexander Wels
d3a522051b Send more useful error messages from pods up to the controlling objects.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-05-29 07:51:15 -04:00
tavni
2b8e82540c Adding code to not allow importing from registry when contenType is archive
Signed-off-by: tavni <tavni@redhat.com>
2019-05-22 16:31:58 +03:00
Daniel Erez
5b3109a324 smart-clone
Changes and flow:

* datavolume-controller:
- When clone pvc is requested and smart-clone is applicable -> Create a new VolumeSnapshot.

* Introduced smart-clone-controller:
- Listens to VolumeSnapshot changes and create a new PVC based on the snapshot.
- Upon PVC successful creation, deletes the snapshot for cleaning up.

Change-Id: I369fc92e72edb8a2cf584c8cb916795415f9d6e0
Signed-off-by: Daniel Erez <derez@redhat.com>
Co-authored-by: Fred Rolland <frolland@redhat.com>
2019-05-20 11:04:10 +03:00
Alexander Wels
b3cccf00af Unable to get progress metrics is not an error.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-04-12 13:16:01 -04:00
Alexander Wels
6270b80b31 Update Datavolume status to include progress
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-04-02 11:34:00 -04:00
Y.Horie
c9104059fb move to klog from glog 2019-03-05 13:33:20 +09:00
j-griffith
30c0e1b814 Delete importer pod on pvc delete request
Related to issue #525, we have a similar situation when using PVCs
without DataVolumes.  The user requests a PVC with CDI Importer
annotations, if the Importer POD is in a fail/retry loop and the user
requests deletion of the PVC the PVC will be stuck in terminating
waiting for the user to forcibly delete the running Import POD.

This PR adds a check for PVC delete in the import controller and
will delete the POD explicitly if it sees a PVC delete request.  This
will also be picked up for Import DataVolumes, so we can remove the
extra checks that were previously added in the DV controller.

fixes #649
fixes #525
2019-02-20 13:43:09 -07:00
Michael Henriksen
717ceaa919 add ability for user to specify certs for import from registry 2019-02-18 09:06:46 -05:00
Michael Henriksen
9039d84750 fix for issue #636: can't create/delete/create the same datavolume 2019-02-06 11:29:45 -05:00
Michael Henriksen
85d76e0b08 rename datavolumecontroller to core 2019-01-08 15:52:41 -05: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
Daniel Erez
573374b831 Import vm disk from docker registry
As a user, I want to specify a registry source to pre-populate my PV with a VM disk image.

* Using skopeo[1] cli to copy image from docker registry.
* Extracting image layers (tar files) into data folder.
* Cleaning up .wh. files and remove corresponding files.
* Supporting docker registries such as: docker hub, quay, etc.

[1] https://github.com/containers/skopeo

Change-Id: Ib4e20bb7be842ebaabeb925202402791827edfd3
Signed-off-by: Daniel Erez <derez@redhat.com>
Co-authored-by: Fred Rolland <frolland@redhat.com>
2018-11-29 01:15:01 +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
Alexander Wels
676b4ec133 Fix some flaky tests.
Signed-off-by: Alexander Wels <awels@redhat.com>
2018-11-20 09:23:37 -05:00
j-griffith
cd88a3d8b7 Check orphaned DataVolume PVCs for PODs
This change adds an extra check to deleted Data Volume PVCs and makes
sure that we explicitly delete any associated POD objects that they
owned regardless of their phase.

GH Issue #525
2018-11-17 09:46:26 -07: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
irit.go
52453a989a add events to DataVolume controller 2018-10-16 18:01:07 +03: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
c06a74c50c Add SecretRef for HTTP data source.
Signed-off-by: Alexander Wels <awels@redhat.com>
2018-09-19 07:36:10 -04:00
tavni
ce22c48834 CDI controller code dedupe
Signed-off-by: tavni <tavni@redhat.com>
2018-09-17 19:44:09 +03:00
Alexander Wels
50301653fb <!-- Thanks for sending a pull request! Here are some tips for you:
1. Follow the instructions for writing a release note from k8s: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

**What this PR does / why we need it**:
This PR fixes an issue where the Data Volume Phase was not being updated properly where the source was a PVC instead of HTTP

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #455

**Special notes for your reviewer**:

**Release note**:
<!--  Write your release note:
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
2. If no release note is required, just write "NONE".
-->
```release-note
NONE
```
**

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-09-14 15:35:21 -04:00
David Vossel
7908038b94 Ensure expectation keys are deleted when object is deleted from cluster (#433)
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-09-07 08:38:28 -04:00
John Griffith
9468ba94c7 Fix golint errors on pkg directory (#414)
Note we are intentionally skipping test files for now, golint
pkg/controller... will skip them, so I'll skip them to.
2018-09-05 12:17:38 -07:00
John Griffith
69709bf863 Update no annotation PVC import test. (#403) (#408)
- Set verbosity on controller to 3 to enable simpler tests.

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-09-05 11:10:24 -07:00
tavni
37b245a2f3 DataVolume: Support Cloning 2018-08-02 23:52:04 +03:00
David Vossel
fdb1b27467 Single Queue and Expectations (#249)
* Pull in expectations code from kubevirt

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

* add expectations to datavolume controller

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

* Refactor importer pod to use single queue and expectations

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

* update utils tests to use single queue

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

* re-introduce import controller test suite

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

* make clone controllers pass after utils refactor

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

* Use log level constants in cdi controllers

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

* Remove useless shadow variables in expectations pkg

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

* required changes to get owner references working with openshift 1.10

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

* update functional tests to work with importer controller refactor

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

* Rename AnnImportPVC to LabelImportPvc in order to reflect its use

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

* Add comment about expectations code

Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-07-30 12:09:15 -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
David Vossel
9a9f19dcd6 datavolume controller
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-06-11 21:58:15 -04:00