Commit Graph

34 Commits

Author SHA1 Message Date
Tomasz Barański
536af6b1ad
Replace skopeo (#1322)
* Updated dependencies
Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>

* Replace skopeo with containers API.

This commit removes dependence on skopeo (binary) and uses containers
API. By doing that we're able to opimize the use of storage (scratch)
space, storage I/O and download bandwith.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>

* Fixing rebase - dependencies kerfuffle.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>

* Handling docker-format images as well as OCI.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>

* Fix for missing code-generator module.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>

* Remove regex, image file in registry images are matched by a path
prefix.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>

* Added nginx proxy in front of docker registry for a rate-limited access.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>
2020-08-22 05:52:00 +02:00
Michael Henriksen
75f4fd6f2f
update k8s deps to 18.6 and controller runtime to 0.6.2 (#1330)
* update k8s deps to 1.18.6 and controller runtime to 0.6.2

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

* remove building code generators from docker image.  This way the k8s ligray version only has to be updated in go.mod

Do more stuff in the bazel container.  Faster and better interop

Fix unit tests

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

* make format

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

* remove unnecessary rsync

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

* redo code generator dep management

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

* builder uses go modules

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2020-08-07 14:09:52 +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
Alexander Wels
b98e0a89c1
Add https qcow2 endpoint test to exercize the scratch space recreation logic. (#1217)
Signed-off-by: Alexander Wels <awels@redhat.com>
2020-05-29 13:37:32 +02:00
Alexander Wels
c02157bdad
Don't annotate pvc/dvs with provisionOnNode as it causes a race with the kubernetes scheduler. (#1157)
Signed-off-by: Alexander Wels <awels@redhat.com>
2020-03-26 17:55:47 +01:00
Piotr Kliczewski
78cee6d166
Imageio - new import data source (#1042)
This PR introduces new import data source to fetch disks from ovirt
and store them in storage available in the cluster. It uses ovirt-sdk
to check whether the this is there, the size of the disk and it obtains
signed ticket which allows to get the disk using ovirt-imageio-proxy.

In order to use it a user needs to create configmap with ovirt api
certificate and secret with ovirt engine user and password. Both are
required and validated by webhook. In order to start import process
we need to post following definition:

---
apiVersion: cdi.kubevirt.io/v1alpha1
kind: DataVolume
metadata:
  name: "imageio-dv"
spec:
  source:
      imageio:
         url: "<engine-api-endpoint>"
         secretRef: "<secret-name-containing-engine-credentials>"
         certConfigMap: "<configmap-name-containing-engine-api-certificate>"
         diskId: "<disk-id-which-we-want-to-import>"
  pvc:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: "64Mi"
---

Signed-off-by: Piotr Kliczewski <piotr.kliczewski@gmail.com>
2020-03-19 19:49:44 +01:00
Alexander Wels
d5dc5a03c8
Increase test timeouts to account for slower CI (#1125)
Signed-off-by: Alexander Wels <awels@redhat.com>
2020-02-26 14:08:52 +01:00
Fred Rolland
c493ee4103 Increase DV state timeout for multiple clone tests (#988)
Signed-off-by: Fred Rolland <frolland@redhat.com>
2019-10-07 18:35:47 -04:00
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
Alexander Wels
b3bf364b23
Add block versions of cloning functional tests. (#926)
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-08-20 07:19:18 -04:00
John Griffith
5c8877911c Fallback to Fedora29 minimal for images (#915)
The newer version of qemu-img (3.1.0) that ships in Fedora 30 has issues
with streaming conversions whereby it hangs during the conversion
process.  Rather than try to force a downgrade of qemu when building
images instead, let's try reverting back to Fedora29 minimal which has
qemu-img version  3.0.0.

This issue has also exposed the fact that we aren't performing any
testing against streaming external images, we're only testing against
images that we've pulled in to our test infrastucture.  So add a
functional test that builds a DataVolume directly from the cirros site.

set dv test back to expectin prlimit failure
2019-08-16 11:18:21 -04:00
Daniel Erez
f878e9d43d Added support for hostpath-provisioner in functional tests: (#912)
Introduced 'AddProvisionOnNodeToAnn' func for adding
'kubevirt.io/provisionOnNode' annotaion when hostpath-provisioner
is the default storage class.
pvc -> NewPVCDefinition and datavolume -> CreateDataVolumeFromDefinition:
invoke 'AddProvisionOnNodeToAnn' when needed.

Change-Id: Iaa5abb0aaa7eb4a9dd710bcfadb3b1ad58916d79
Signed-off-by: Daniel Erez <derez@redhat.com>
2019-08-08 16:12:16 -04:00
Alexander Wels
4193d67b84
Update ref_id in QCOW tests (#871) (#863)
Signed-off-by: Daniel Erez <derez@redhat.com>
Signed-off-by: Fred Rolland <frolland@redhat.com>
Co-authored-by: Daniel Erez <derez@redhat.com>
2019-08-07 16:29:54 -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
dc4d22dc5d
Allow specifying block storage class. (#815)
Fix node selection functional test

Signed-off-by: Alexander Wels <awels@redhat.com>
2019-06-28 08:22:56 -04:00
Daniel Erez
0a90bfb4d0 datavolume_test: tar archive import
Added positive and negative functional tests for
importing tar archive files.

Change-Id: I584ab0e2ae4572a6300cb531ce5f9c02c4449d2b
Signed-off-by: Daniel Erez <derez@redhat.com>
Signed-off-by: Fred Rolland <frolland@redhat.com>
Co-authored-by: Fred Rolland <frolland@redhat.com>
2019-06-06 11:30:03 +03:00
Daniel Erez
c9625162c1 datavolume_test: malicious qcow2 images
Added functional tests to ensure that malicious
qcow2 images are being rejected. I.e. the creation
of import datavolume should fail when converted to raw.

Change-Id: I3372105fdcd28b8e01811d7e6752f04f5dba9e0d
Signed-off-by: Daniel Erez <derez@redhat.com>
Signed-off-by: Fred Rolland <frolland@redhat.com>
Co-authored-by: Fred Rolland <frolland@redhat.com>
2019-06-04 12:53:08 +03:00
Alexander Wels
f40c16b25b Randomize cdi namespace in tests.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-05-14 10:55:42 -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
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
08ce3ad394 https cert configuration 2019-03-05 18:15:33 -05:00
annastopel
b9edce9ef0 Import VM disk from ContainerDisk image 2019-02-12 21:11:39 +02:00
annastopel
cb80249a7f BugFix: cdi importer fails to import from registry when run in unpriviledged container 2019-02-06 21:17:57 +02:00
Michael Henriksen
5e2ed1b97b initial oerator implementation 2019-01-16 20:22:14 -05:00
annastopel
c33aacb813 test dataVolume with import from registry source
1. Add integration test between DataVolume and import from registry features
2. Add fix for OS environment: set max.user_namespaces for all cluster nodes
2019-01-10 14:14:52 +02:00
Michael Henriksen
85d76e0b08 rename datavolumecontroller to core 2019-01-08 15:52:41 -05:00
tavni
f4bb5e531e Adding more functional tests for blank-raw-image, PV allocation on specific
node and upload disk image features.

Signed-off-by: tavni <tavni@redhat.com>
2018-12-20 13:32:54 +02:00
Daniel Erez
a60c498da4 datavolume: remove a duplicate comment
Remove a duplicate comment from 'NewDataVolumeWithPVCImport' func.

Change-Id: I4ed96ce593303e40309a03dbed648979b66200a9
Signed-off-by: Daniel Erez <derez@redhat.com>
2018-11-24 19:31:49 +02: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
Alexander Wels
995ebf39e7 Increase e2e test timeouts.
Signed-off-by: Alexander Wels <awels@redhat.com>
2018-11-02 11:31:45 -04:00
j-griffith
0a84e2fa8c Add lint checks to remaining go src directories
This finishes up the last of the golint implementation, with the
addition of the cmd, tests and tools directories we are now running
golint tests on all of the current go source files in the project.

This change adds all the little fixes (mostly just commenting and
naming) and also enables the new diretories in the lint test that we
gate on.
2018-09-29 08:35:21 -06:00
Jeff Vance
7f01fbf6c5 pr 'make format' (#442) 2018-09-07 07:21:52 -04:00
David Vossel
d84ba95e75 Clone functional tests for DataVolume (#384)
* Make generic function for populating and verifying pvc data

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

* Add DataVolume PVC source functional tests

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

* Make DataVolume PVC variable consistent with other sources

Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-08-31 08:39:50 -04:00
David Vossel
d8588cb51d Initial DataVolume functional tests for import jobs (#328)
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-08-28 14:45:20 -04:00