Commit Graph

84 Commits

Author SHA1 Message Date
Alexander Wels
f2657d5927
Set secondary GID of user on import and upload pods to be 107 (qemu) … (#1148)
* Set secondary GID of user on import and upload pods to be 107 (qemu) for kubevirt content type.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Fix broken unit tests on upload.

Signed-off-by: Alexander Wels <awels@redhat.com>

* Add import and clone test.

Signed-off-by: Alexander Wels <awels@redhat.com>
2020-03-26 14:33:48 +01:00
Alexander Wels
1d48514c2b
Use controller runtime library for upload controller (#1085)
Signed-off-by: Alexander Wels <awels@redhat.com>
2020-03-03 15:30:56 +01:00
Alexander Wels
17db2920b1
Update clone controller to use runtime library. (#1075)
Signed-off-by: Alexander Wels <awels@redhat.com>

Co-authored-by: Michael Henriksen <mhenriks@redhat.com>
2020-02-14 23:04:46 +01:00
Alexander Wels
9a2b514365
Add async endpoint for upload that closes connection immediately after transfer completes and then continues background processing. (#1095)
Signed-off-by: Alexander Wels <awels@redhat.com>
2020-02-12 16:17:26 +01:00
Michael Henriksen
bd4c4c950b
cert rotation (#1091)
* initial cert rotation controller

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

* fix typo

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2020-02-03 23:36:58 +01:00
Woohyung Han
2adcc80f95 Fix to create temporary pod with default resource quota (#1055)
If we create a temporary pod in the namespace which has
resource quota, `must specify quota` error occurs. Fix to
create temporary pod with default resource quota.

Co-authored-by: hyoung-90 <ssarang520@gmail.com>
Co-authored-by: Woohyung Han <woohhan@gmail.com>
Signed-off-by: anencore94 <anencore94@kaist.ac.kr>

Co-authored-by: anencore94 <37469330+anencore94@users.noreply.github.com>
Co-authored-by: hyoung-90 <58063867+hyoung-90@users.noreply.github.com>
2020-01-09 17:43:14 +01:00
Alexander Wels
d4a4ece09b Requeue on failure like sample k8s controller (#1015)
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-11-12 13:21:15 +01:00
Michael Henriksen
66a1c8c996 Unique client cert per clone source pod (#987)
* unique cert per clone source pod

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

* upload controller shouldn't cache certs

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

* fix test variable names

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2019-10-09 15:10:55 -04:00
Michael Henriksen
834b85ecbf Network clone (#897)
* network cloning

* fix clone progress
2019-08-01 16:01:25 -04:00
Michael Henriksen
490ffe498e watch extension-apiserver-authentication configmap and refresh client CAs when updates occur 2019-05-20 21:32:20 -04:00
Artyom Lukianov
40325745d0 Copy triple package from client-go repository
This package droped from client-go 1.13.4, so until
we will have find some good alternatives, we can use local copy.
2019-05-16 09:38:37 +03:00
Alexander Wels
630a23ef23 Fix a bunch of go score card issues.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-05-06 16:52:03 -04:00
Alexander Wels
afe77c3514 Allow missing storage class for scratch space, if none exists, create scratch PVC without SC
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-03-27 11:41:15 -04: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
Alexander Wels
1e46004ad2 Scratch space retry framework logic.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-03-07 14:54:08 -05:00
Y.Horie
c9104059fb move to klog from glog 2019-03-05 13:33:20 +09: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
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
db9e9eb115 force delete upload pod if not completed and pvc deleted 2018-10-18 12:02:55 -04:00
j-griffith
371e5c2ba0 Set pod restart policy to "OnFailure" and cleanup
This patch does two things:
1. We modify the restar policy from never to "OnFailure" for the
    Importer (we already did this for Upload, and we don't want to do it yet
    for the Clone pods)
2. Upon succesful completion delete our worker pods
    We're not doing this on failed pods right now because in general an
    admin will likely want to inspect the pod to see why it failed.

The first question someone will likely ask is "well what about a node
failure", well in the case of a node failure for CDI we have a bigger
outstanding issue remaining to figure out how to deal with volume
connections.  We can't just simply reschedule the job.
2018-10-09 08:25:22 -06:00
Michael Henriksen
af654b4fca change *.cert to *.crt to be consistent with tls secrets creaed by kubectl. also made tls optional on uploadproxy. 2018-09-20 09:25:38 -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
6c8c32fab8 initial apiserver and upload proxy unit tests 2018-09-19 12:30:46 -04:00
Michael Henriksen
b806786da1 refactoring and unit tests 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
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
3d5927d30a incorporate some review comments 2018-09-19 12:30:46 -04:00
Michael Henriksen
fd432593ae don't create UploadTokens for pvcs that don't have the upload annotation or upload server pods are not 'Running' 2018-09-19 12:30:45 -04:00
Michael Henriksen
28d349f660 minor refactoring and fix lint failure 2018-09-19 12:30:45 -04:00
Michael Henriksen
8910df8cee real tls cert validation 2018-09-19 12:30:45 -04:00
Michael Henriksen
62330f2f34 proxy implemented again and disabled signature checking 2018-09-19 12:30:45 -04:00
Michael Henriksen
1cbabdc8cf refactor key/cert storage to just use secrets 2018-09-19 12:30:45 -04:00
Michael Henriksen
59e0af3485 tls for upload server 2018-09-19 12:30:45 -04:00
Michael Henriksen
cd81879806 initial implementation of upload controller and upload server 2018-09-19 12:30:45 -04:00