Commit Graph

28 Commits

Author SHA1 Message Date
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
Alexander Wels
6dce12f090
Move CRDS from apiextensions v1beta1 to v1. (#1307)
* Move CRDS from apiextensions v1beta1 to v1.
Ensure that our code based schema validation matches the types in the api.

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

* Ran go mod tidy and vendor in attempt to see if we could use newer runtime controller, but our go version too old.
Addressed review comments.

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

* Addressed more review comments and fixed k8s-1.18 functional test failing.

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

* Remove categories 'all' from cluster scoped CRDs

Signed-off-by: Alexander Wels <awels@redhat.com>
2020-08-01 01:01:50 +02:00
Bartosz Rybacki
df81550666
Feature gates (#1283)
* Extracted reconcileUploadProxyUrl

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Add FeatureGates to CDIConfig CR

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* POC of FeatureGates

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Remove FeatureGates from spec in CDIConfig, add correct handling of communication errors

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Removed feature gate from DataVolume.

This will be added when actually the first featureGate will be used to toggle a feature.

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Update to v1beta after rebase

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Create a featuregates package

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Rename first featureGate to HonorWaitForFirstConsumerEnabled

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* return error from feature gates api

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
2020-07-16 05:31:41 +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
Michael Henriksen
1b5c5fe0a9
use kubernetes openapi generator (#1222)
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2020-06-03 22:47:35 +02:00
Alexander Wels
c707e781a9
Add conditions to DataVolume and add condition annotation to PVCs (#1194)
* Add conditions to DataVolume and add condition annotation to PVCs

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

* Added reason codes to conditions
Updated functional tests to use reason codes
Fixed broken functional test.

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

* Added last transition time
Added documentation

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

* Switch to conditions slice from conditions pointer slice.

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

* Add heartbeat time for conditions.
Renamed AnnRunningCondition to AnnLastTerminationMessage
Only update reason/message on heartbeat or state change.

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

* Rename heartBeat to heartbeat
Re-factor datavolume-conditions to properly update heartbeat time.

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

* renamed AnnRunningConditionReason to AnnLastTerminationReason

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

* Revert lastTerminatedMessage/Reason rename
Added separate AnnScratchBoundCondition/Message/Reason for scratch space

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

* Update bound condition to take scratch or source PVC status into consideration.
Update running condition to take source pod status into consideration

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

* Addressed comments in review.

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

* Properly get scratch space pvc phase.

Signed-off-by: Alexander Wels <awels@redhat.com>
2020-05-12 23:39:23 +02:00
Bartosz Rybacki
4605cf1dc2
Add a field to DataVolume to track the number of retries/pod restarts (#1155)
* Add a field to DataVolume to track the number of retries/pod restarts

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Add a field to DataVolume to track the number of retries/pod restarts

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Make RESTARTS non-empty on DataVolume (shows as as 0 'zero')

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Test reporting restarts on DataVolume when importing.

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Fix tests

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Code review fixes

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>

* Restart Count status test for upload and clone controller

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
2020-03-30 23:17:49 +02: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
Michael Henriksen
e24237031a
add CDIConfig to swagger (#1127)
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2020-02-26 23:28:53 +01:00
Michael Henriksen
102ce2e78c
Uninstall strategy and blocking webhook (#1118)
* 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>
2020-02-21 05:34:50 +01:00
Michael Henriksen
99f8af5b86 k8s client upgrade to 1.16 (#1079)
* initial client upgrade to 1.16

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

* fix Route detection in OpenShift

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2020-01-14 13:43:17 +01:00
Michael Henriksen
97c23cfa5a remove DOCKER_REPO from operator (#1022)
* remove DOCKER_REPO from operator

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

* make generate and update CDI schema

Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
2019-11-14 02:59:16 +01:00
Alexander Wels
45eecea14e
Added conditions to match the HCO requirements. (#910)
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-08-28 18:36:44 -04:00
Michael Henriksen
5682c55875 fix vendoring (#864)
* fix vendoring

* update kubevirtci version
2019-06-25 08:46:19 -04:00
Artyom Lukianov
5be897c3bb Generate new clientset compatable with k8s-1.13.4 2019-05-16 09:38:37 +03:00
Alexander Wels
306174f817 Ran make generate.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-05-03 15:38:35 -04:00
Michael Henriksen
680e223277 allow for override of registry and tag in CDI object 2019-04-19 10:58:12 -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
Michael Henriksen
49a740d7ba make CDIConfig client cluster scoped and fix occasional crash 2019-03-04 18:54:58 -05:00
Michael Henriksen
717ceaa919 add ability for user to specify certs for import from registry 2019-02-18 09:06:46 -05:00
Michael Henriksen
6dd108400d add ready condition 2019-01-16 20:22:14 -05:00
Michael Henriksen
27d6a606a8 cleanup resources made by controller when uninstalling and flush out status 2019-01-16 20:22:14 -05:00
Alexander Wels
9d221452d4 Make data volume status optional.
Signed-off-by: Alexander Wels <awels@redhat.com>
2019-01-16 10:43:34 -05: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
2a0cd800b5 CDI operator CRD 2019-01-08 15:52:41 -05:00
tavni
c245fe2ae6 Adding DataVolume support for unpacking imported archive
Signed-off-by: tavni <tavni@redhat.com>
2019-01-08 15:10:02 +02:00
Michael Henriksen
a446598399 remove python client generation 2018-12-03 08:31:29 -05:00
Michael Henriksen
80f8dcf8d8 swagger/apidoc/python client generation 2018-12-03 08:31:28 -05:00