Commit Graph

25 Commits

Author SHA1 Message Date
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
Artyom Lukianov
11321ae7e9 Set klog flags before flags parsing
Looks like before some of imports used glog package that set all flags
under init() method, but after dependencies code stopped to run glog
init() method on container creation, so we need to set flags from klog
and parse flags in the right order.
2019-05-16 09:38:37 +03:00
Irit goihman
2bf542705b remove label from ingress informer
Signed-off-by: Irit goihman <igoihman@redhat.com>
2019-04-26 15:40:40 +03:00
Alexander Wels
d2ca78bec3 Use CDIConfig for scratch storage class.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-03-21 15:37:07 -04:00
u5surf
6a2a36e1fd add copies the flags after flags parse 2019-03-07 23:20:34 +09:00
Y.Horie
0c90e9c901 fix conflict 2019-03-05 23:23:04 +09:00
Y.Horie
09819e8158
Merge branch 'master' into issue-687 2019-03-05 23:05:05 +09:00
Y.Horie
c9104059fb move to klog from glog 2019-03-05 13:33:20 +09:00
Michael Henriksen
49a740d7ba make CDIConfig client cluster scoped and fix occasional crash 2019-03-04 18:54:58 -05:00
Michael Henriksen
99ef385101 remove upload proxy init container 2019-03-01 10:30:17 -05:00
Michael Henriksen
931985658b add ready check to cdi controller and have upload proxy wait for it and the apiserver 2019-03-01 10:20:58 -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
7170ba40f6 update kubernetes client/tools to 1.12.4 and controller runtime to 0.1.9 2019-01-08 16:10:30 -05:00
Michael Henriksen
8d618f4707 leader election for cdi controller 2018-12-06 08:34:04 -05: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
Michael Henriksen
24d4e65a42 refactoring post rebase 2018-09-19 12:30:46 -04:00
Michael Henriksen
6ae444d661 have upload controller create cert for upload proxy and configure upload proxy to get key/cert from secret 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
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
zvikorn
d394d2de78 [WIP] CDI: expectations and single queue - cloning refactoring (#325)
[WIP] CDI: expectations and single queue - cloning refactoring

Adding 'expectPodCreate' call before creating target pod

minor change

Adding 'expectPodCreate' call before creating target pod

updating according feedback

Adding cloner unit test

code updates

Signed-off-by: tavni <tavni@redhat.com>

more updates

Signed-off-by: tavni <tavni@redhat.com>

minor change for util_test.go

Signed-off-by: tavni <tavni@redhat.com>

updating unit tests

Signed-off-by: tavni <tavni@redhat.com>

finished unit test for cloning refactoring

Signed-off-by: tavni <tavni@redhat.com>

rebase

Signed-off-by: tavni <tavni@redhat.com>

updating unit test after rebase

Signed-off-by: tavni <tavni@redhat.com>

gofmt errors

Signed-off-by: tavni <tavni@redhat.com>
2018-08-29 10:11:05 -07:00
Jeff Vance
42a6fa1714
bug in , lots of formatting (#378) 2018-08-27 17:04:50 -07: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
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
Jonathan Cope
75f2086cd8 Refactor makefile into scripts (#246)
* Use bash scripts to handle build workflow in docker containers

Added working docker builder/runner

Added _out to gitignore, stub script files

Added build and test scripts

small tweaks

Remove install opt, no need and create perm issues

Do func test for 'test' recipe, add non-docker option

Added QoL recipe alias, refactored test and build loops

centralized dockerfiles under hack/build/docker, renamed check/pre-check to format

Prefixed cmd/cdi- to main func files, added clean up scipt

simplified controller and importer dockerfiles, removed os/arch from bin name

DOCKER=1 - use docker

Travis and makefile changes

Don't go vet project in 'all' target (error in generated code), finished image builds

Small optimization to cdi-cloner image build

renamed build-images to build-docker; added make image aliases

testing version.sh

travis script calls new make targets, dropped version func (overly engineered for what we need)

deleted shift-tag.sh because it's just bad practice

Fix travis sed command

release :latest on PR merge

* Functional test refactoring

Removed test output files

renamed file vars to reflect purpose

Condensed test table definition, create tmp dir per test iteration

Refactored convertion funcs to write to a given directory, changed datastream test to create a temp dir and pass to file conversion, removed unused func

use randAlpahNum for tmp dir suffix, pepper in debug code

Must copy source file to tmp dir, then gzip/xzip, added debug code, package URL is deforming the file:// path by treating path[0] element as the server root

Fixed xz, gzip, tar, and noop test file generation; added copy of src to test dir if not present

Fixed typo in qemu-img cmd

Removed commented out line

* Added vet make target, updated hack/README

Make recipe call vet recipe

Updated hack/README

Makefile alias fix, clean all bin and _out except .gitignore, reverted 'vet' go_opt behavior

pulled 'vet' references from readme until it is fixed later

Don't delete the entire repo if _out doesn't exist,

* Moved clone script to cmd/ to make build flow smoother, now copy Dockerfiles to respective _out/cmd/* dirs for building container, delete old.Makefile

* Solidify build scripts

Text typos and comment additions

change cp glob to Dockerfile

Added push target to push images to non-kubevirt repo, updated README

Added license blocks, updated README with make vars, deleted empty script files

Added license to Makefile

Tweaked travis.yaml, removed version file (unused)

Fixed source paths

Fixing travis script sourcing

Moved shebang to line 1

Fixed shfmt install

Changed cloner script path in format.sh

Filter our vendor and pkg/client on go vet

Fix shfmt install in container, containerized clean target

Re-added Z opt to bind-mount

removed duplicate source line

Fix shfmt var expansion

formatting

Add non-docker cleanup optino
2018-07-20 09:25:53 -07:00