Commit Graph

47 Commits

Author SHA1 Message Date
Alexander Wels
a3f26adc1b Change the prometheus label used by cdi.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-04-17 10:55:58 -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
Alexander Wels
d1b7842a90 Resize on upload.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-03-08 21:51:05 -05:00
Alexander Wels
1e46004ad2 Scratch space retry framework logic.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-03-07 14:54:08 -05:00
Michael Henriksen
62f1e77f66 change INSECURE_REGISTRY to INSECURE_TLS because may want to have insecure hosts for http import 2019-02-25 20:12:56 -05:00
Michael Henriksen
3892a7310d add configmap for insecure regestries 2019-02-25 20:12:56 -05:00
Irit Goihman
1691fe1b39 create cdi config with config controller
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
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
Idan Shaby
3d9a42629e Support archived content import
This patch adds the ability to import and extract an archived content
from a tar file directly onto the target PVC.
That is, a tar file is expanded while keeping file ownership,
permissions, and tree structure identical to the source.

Signed-off-by: Idan Shaby <ishaby@redhat.com>
2018-11-28 09:41:10 +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
260d4fa8e0 Automatically resize image to fit the requested PVC.
Combined code from PR#489 and PR#490 by
@gites and
@danielerez
Added some tests and rebased on current master.

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-11-20 15:40:13 -05:00
Alexander Wels
70666e5946 Add source and contentType annotations
Signed-off-by: Alexander Wels <awels@redhat.com>
2018-11-14 12:20:26 -05: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
Daniel Erez
512cabf2e6 Fix typos in common.go
Fixed a couple of typos in common.go file.

```release-note
NONE
```

Change-Id: I88e911ef85879f32dcd8f8685dc7b71495cd50fe
Signed-off-by: Daniel Erez <derez@redhat.com>
2018-10-31 13:09:45 +02:00
Michael Henriksen
5eeee34e83 refactorings from rebase 2018-09-19 12:30:46 -04:00
Michael Henriksen
762cf6860d api server create explicit key for signing 2018-09-19 12:30:46 -04:00
Michael Henriksen
cd81879806 initial implementation of upload controller and upload server 2018-09-19 12:30:45 -04:00
David Vossel
4466862aa1 Add CDI apiserver component
Signed-off-by: David Vossel <davidvossel@gmail.com>
2018-09-19 12:30:45 -04:00
John Griffith
c455577cca Fix lint errors on common package (#449)
This change just updates the common package to pass golint.  Of course
that has some reaching implications into other packages with renaming of
constants.

I've intentionally kept this patch set to the bare minimum for the lint
test, I do think that we should put some effort into our use of
constants (especially those in common.go) in the future.

Ideally we'd declare constants where they're used, and we wouldn't
export them if they don't need to be.  There are some in here that
are only used in one or two packages, and that can be cleaned up pretty
easily however it's likely that there might be plans to use them
elsewhere in the future.
2018-09-10 09:14:09 -04: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
danielerez
9f72eeec40 common: fixed key constants capitalization (#412)
Fixed capitalization to correalte with other constants in the file.
2018-09-05 09:32:43 -07:00
Alexander Wels
363572626d cloner image uses ENTRYPOINT instead of hard coded path (#375)
- Updated controller to use ENTRYPOINT (no cmd) instead of /bin/sh
- Updated Dockerfile to set path to /usr/bin/cloner_startup.sh instead of /tmp
- Updated Dockerfile to use ENTRYPOINT.

Fixed issue #374

Signed-off-by: Alexander Wels <awels@redhat.com>
2018-08-27 18:35:13 -07:00
Jeff Vance
42a6fa1714
bug in , lots of formatting (#378) 2018-08-27 17:04:50 -07:00
John Griffith
8ca745b700 Run gofmt on our directories (#370)
Just do a simple `gofmt -s -w` on pkg, tests and controller directories
to fix the misc space/tab mixes and some other ez formatting issues.
2018-08-23 15:31:14 -07:00
Atul Bhosale
6e280690e5 [277] Change the name of the cloner startup script (#278)
* Change the name of the cloner startup script

* Change the name of the cloner startup script
2018-07-30 11:11:12 -07:00
Jon Cope
8f953afd96 Add dynamic manifest generation
Adds go templated controller manifest

Adds make targets for template generation

Removes hard coded version values

Enables template generation and publishing in CI
2018-07-24 16:19:20 -05:00
tavni
b804b7bd7d Fixing PodAffinity by changing TopologyKey value and adding 'namespaces'
field
2018-07-18 14:59:51 +03:00
Jeff Vance
bef00927a4
compute original size for .iso files (#227)
* [wip] iso size

* refactor Size()

* rm extensions and orig qemu code

* rm debugging, call appendReader

* rebase

* fix qemu unit test fails
2018-07-09 17:43:43 -07:00
Jon Cope
bcf269413d gofmt'd cmd, pkg, and test dirs (no change in cmd) 2018-07-06 14:45:10 -05: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
jeff vance
0066a96055 Update Version 2018-06-14 15:15:23 -07:00
Jon Cope
b12ad6149b Set version v0.5.0, Fix build lib go command 2018-06-14 14:06:13 -05:00
Jonathan Cope
4ab093c0fe
Revert "Update Version" (#208) 2018-06-14 12:08:07 -05:00
Jon Cope
92052e0445 Update Version 2018-06-13 11:49:03 -05:00
Jon Cope
5b6ceb0b14 [ci skip] Revert "Update Version"
This reverts commit 2d91d56240.
2018-06-04 18:04:37 -05:00
Jon Cope
2d91d56240 Update Version 2018-06-04 17:48:34 -05:00
Jon Cope
96e9897180 add 'v' 2018-05-23 10:03:53 -05:00
Jon Cope
81e3f07025 Set versions to latest existing image versions 2018-05-23 09:49:03 -05:00
jeff vance
a835a15f26 add log verbosity 2018-05-14 15:35:36 -07:00
Jon Cope
5dea5526ed Default pull policies to IfNotPreset unless env var is set
Fix testing, change env var & constant name
2018-04-30 10:43:25 -05:00
Scott Creeley
9e671dfb57 add cdi label to pvc 2018-04-27 12:53:07 -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
29b5b849e8 Add version number to project 2018-04-19 13:40:24 -05:00
jeff vance
cfeae65502 refactor unit tests 2018-04-06 13:08:08 -07:00
jeff vance
d0906c4ff1 add common pkg and fix some err msgs to be more consistent 2018-02-27 13:11:42 -08:00