* update k8s libs to 1.26.
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* remove some checks in log messages, they're redundant, and the format has changed
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* use 1.26 lib function `CheckVolumeModeMismatches` and `CheckAccessModes`
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
---------
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* Google Cloud Storage Importer
This is a Google Cloud Storage importer for CDI
Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>
* Fix auto-generated swagger and openapi
Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>
* GCS Importer General Fixes
Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>
* Moving back gcs-secret.txt
Moving file back to imageDir to fix unit testing.
Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>
---------
Signed-off-by: Marcelo Parisi <marcelo@feitoza.com.br>
Co-authored-by: Marcelo Parisi <marcelo@dev-box.corp.feitoza.com.br>
DV status can now be updated only by UpdateStatus() and no more by
Update(), so regular users cannot update status without special
permission. In addition, updating just the status would not update
the generation of the object, so we’ll have less “object has been
modified” errors in the reconcile loops.
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
There should be no state shared between sync() and updateStatus().
updateStatus() should stand on it's own, and come to it's own
conclusions based on what it observes. It is okay if it is "late to the
party" and does not observe the latest changes in sync(). It will
eventually converge. This is what kubevirt does.
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
* function should return dataVolumeSyncResult, take *dataVolumeSyncResult as a parameter
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* checkStaticVolume implemetation for import DataVolume
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* upload support for checkStaticVolume
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* checkStaticVolume for clone datavolumes
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* checkStaticVolume for snapshot clone
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* checkStaticVolume for external populator source
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* tignten up static volume check
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* expand functional test to compare creation timestamps
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* updates from code review mostly add md5 verification to test and refacto common index creation
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* webhook changes, allow clone source DataVolumes (with special annotations)
even if source does not exist or user has no permission
BUT no token is added so this is really just for the static/prepopulate cases
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
---------
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
* API for VolumeSnapshot clone source
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
* Refactor doCrossNamespaceClone to get rid of some source PVC assumptions
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
* Refactor isCrossNamespaceClone to get rid of some some source PVC assumptions
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
* Clone from VolumeSnapshot source controller
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
* Func tests for cloning from volumesnapshot source
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
* Extend cross ns clone token mechanism for VolumeSnapshot cloning
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
* Validate source volumesnapshot on create
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
---------
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
Now that we update status in the end of a loop regardless of err,
it is important that we have the PVC in place for that.
Otherwise, if we fail at cleanup/prepare, syncRes.pvc is nil,
and we get false status updates like the following:
```bash
NAMESPACE NAME PHASE PROGRESS RESTARTS
default cloned-target-dv Succeeded N/A 23s
default cloned-target-dv Pending N/A 23s
default cloned-target-dv Pending N/A 23s
default cloned-target-dv Pending N/A 23s
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
golden-ns golden-snap-source Bound pvc-63ed1368-9f84-44ce-8b4b-7e9e3c4574f4 8Gi RWO rook-ceph-block 5m59s
(Target got deleted)
```
This results in a nasty bug where the target PVC simply disappears.
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
Right now if cleanup finishes succesfully we just keep going
on in the reconcile loop, even though deletion timestamp is set
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
We are introducing cloning from snapshot soon as a new controller,
as part of those efforts, it was identified to be beneficial to have this split.
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>