* Add support for external openshift cluster, in particular CRC.
make cluster-sync, and functional tests should all work.
Added documentation on how to enable CRC to work.
Signed-off-by: Alexander Wels <awels@redhat.com>
* Updates based on review.
Signed-off-by: Alexander Wels <awels@redhat.com>
* Changes based on review comments:
- removed registry in favor of making people use an external registry.
- added ceph for external provider.
Signed-off-by: Alexander Wels <awels@redhat.com>
* Fix review comments
Signed-off-by: Alexander Wels <awels@redhat.com>
* Update kubevirtci.
Changes default KUBEVIRT_PROVIDER to k8s-1.18 that works, the previous
CDI-specific change was wrong and got overridden by another
'make generate'.
Removes ocp and okd kubevirtci providers.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* GC okd-4.1 and okd-4.3 cluster-sync logic.
These lanes were removed from kubevirtci.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* 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>
* Make the k8s-1.18 lane the default
This is so we can remove the k8s-1.15 lane.
We don't run this lane in CI.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Remove k8s-1.16 cluster-sync support.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Remove k8s-1.15 cluster-sync support.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Update documentation regarding default KUBEVIRT_PROVIDERs
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Update kubevirtci
This adds a k8s-1.18 lane, among other things.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Add cluster-sync support for k8s-1.18
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* move from alpha to beta snapshot API
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* fix broken clone tests
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* don't generate snapshot client
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* Implement local web server to mimic flawed servers
http://cdi-bad-webserver.cdi/flaky/filename will return a 503
"unavailable" error to most requests.
http://cdi-bad-webserver.cdi/forbidden-HEAD/filename will return
a 403 "Forbidden" error on HEAD requests.
In both those cases, we validate that we still eventually succeed
in creating a datavolume.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Add the imageio server to the manual test setup instructions.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Add missing bad-webserver.yaml.in (forgot to git add)
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Make "flaky" bad-webserver reproducibly flaky.
9 failures followed by a success.
Switch to port 9090, os-3.11 disallows using privileged ports,
and we don't have a reason to prefer port 80.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Provide polarion test IDs
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Make flaky test server fail less frequently.
The exponential backoff makes 10 retries very slow.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Tolerate being installed on a namespace that isn't "cdi"
Assume that we are in the same namespace as cdi-file-host, and
use that namespace in the URL.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* Use AfterEach to cleanup datavolumes after test.
Suggested by Alexander Wels.
Signed-off-by: Maya Rashish <mrashish@redhat.com>
* update kubevirtci to 0b941ea5dc647d3aea6f6a6fff95563d6ce0445e
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* make sure SELinux permissions correct for hpp
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* fix permission issue with clone source pods and k8s-1.17 provider
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* Make sure all CDI crds have structural schemas
Signed-off-by: Alexander Wels <awels@redhat.com>
* Removed unneeded apiVersion, Kind, Metadata from validation
Signed-off-by: Alexander Wels <awels@redhat.com>
* Add loopback device container
Add code to create pv vg and lvm
Add ember csi lvm based provisioner.
Signed-off-by: Alexander Wels <awels@redhat.com>
* import/export
Signed-off-by: Alexander Wels <awels@redhat.com>
* Address PR comments.
Switch deployment to pod for loopback device
Sleep 1 instead of 60 to allow kubernetes easier way of killing pod.
Instead of embercsi master, grab one that works from known repo.
Signed-off-by: Alexander Wels <awels@redhat.com>
* Finish loopback pod instead of looping it.
Signed-off-by: Alexander Wels <awels@redhat.com>
* Update datavolume controller to use runtime controller library
Signed-off-by: Alexander Wels <awels@redhat.com>
* Update smart clone controller to use controller runtime library
Signed-off-by: Alexander Wels <awels@redhat.com>
* Mark smart cloned cloned PVCs are k8s.io/CloneOf
Signed-off-by: Alexander Wels <awels@redhat.com>
* Removed unused informer factories.
Fixed naming of controller from import to smart clone.
Ignore not found error on delete.
Signed-off-by: Alexander Wels <awels@redhat.com>
* Only delete snapshot if pvc is bound
Signed-off-by: Alexander Wels <awels@redhat.com>
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>
* webhook to block deletion of datavolumes for BlockUninstallIfWorkloadsExist uninstallStrategy
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* fix apiserver permissions and tighten up cdi delete webhook functional test
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* fix cdi delete webhook for older k8s versions that don't send the object
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* cleanup webhooks and apiservices on upgrade
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* have to wait for cdi configmap to be garbage collected
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* do dry run deletes for datavolume protection webhook
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* * Initial upgrade support
* - Detect from reconcile loop that it is uograde flow
* - Set ObeservedVersion to target when upgrade is finished
* - Delete unused objects at the end of upgrade
* * opertor controller unit test - detect upgrade
* cdi upgrade unit tests
* - verify upgrade flow is detected when version is updated
* - verify on upgrade objects are updated
* - verify on upgrade unused objects are deleted
* * optimize cleanuoUnusedResourses function
* fix logging error
* * CR fixes
* remove unused methods in unit tests
* use reflect.DeepEqual to compare runtime.Objects in unit test
* check DeletionTimeStamp before entering upgrade
* * uit tests - CR is deleted during/before upgrade
* * CR fixes:
* - invoke Deletion callbacks before and after resource deletion on clenaupUnusedResourse function
* - when looking for object to delete - search not only by name but by namespace as well
* * delete unused resources of previous version is CDI CRF is marked for deletion during upgrade
* add unit test for this case
* * should not start upgrade if versions are identical
* * add unit tests to verify there is no upgrade on identical versions
* CR fix - return error
* don't think we have to explicitly cleanup old resources when CDI deleted during upgrade
* refactor code and properly handle deleting resources on upgrade
* reconcile loop now does three way merge to better handle upgrade
* cluster-sync/install.sh - contains all supported installation techniques
and a install_cdi method that derives the technique based on CDI_INSTALL variable
- operator manifests
- OLM manifests
* per provider there is cluster-sync/${PROVIDER}/install.sh that has the settting for CDI_INSTALL
for specific provider
* default technique is CDI installation via operator
* Add make tagret docker-olm-catalog
* Add build-olm-catalog script that builds tree expected by operator-registry.
* add catalogsource manifest to deploy operator registry per provider
* os
* k8s
* update olm documentation with opertor-registry deployment
Now using OKD 4.1.2 instead of 4.1.0.
k8s-1.13.3 and os-3.11.0-crio now using latest version of local volume provisioner:v2.3.2
Signed-off-by: Alexander Wels <awels@redhat.com>