Commit Graph

9 Commits

Author SHA1 Message Date
akalenyu
f58f83feeb
Add sourceRef support for VolumeSnapshot sources (#2582)
Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2023-03-03 16:53:55 +00:00
Arnon Gilboa
bfe30a8964
Split and refactor DV controller (#2483)
- Split the huge DV controller into smaller op-specific DV controllers -
  import, clone, upload
- Add common watch-adding function so each controller watches only its
  relevant DVs
- Refactor the common Reconcile() to use interface DataVolumeReconciler
  implemented by each controller
- Move all functions, structs, consts to the relevant controller
- Split the utests per controller

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-12-22 01:03:15 +00:00
Arnon Gilboa
a222359dc6
Adapt DataImportCron and DataSource to DV GC (#2441)
* Adapt DataImportCron and DataSource to DV GC

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add DIC test for GC

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-10-20 20:55:47 +01:00
Arnon Gilboa
b85cd7332f
Update DataSource LastTransitionTime when populated PVC is updated (#2381)
* Update DataSource LastTransitionTime when populated source PVC is updated

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add Source field to DataSourceStatus

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-08-05 18:22:19 +01:00
akalenyu
4d4ad12df5
Only list Ingresses/Routes in CDI namespace instead of cluster level (#2371)
* Only list Ingresses/Routes in CDI namespace instead of cluster level

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Change the way we initialize cache for cdi controller

This gives us flexibility to cache only exactly what we need.
The error that led me to this was that we were attempting to Watch()
Routes/Ingresses which is basically caching all namespaces. We only want to cache the CDI namespace for those.
Source/feature from https://github.com/kubernetes-sigs/controller-runtime/issues/1708

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2022-08-01 22:12:47 +02:00
Arnon Gilboa
cebf78b7d9
Log UID of DataImportCron, DataSource & DataVolume (#2203)
* Log UID of DataImportCron, DataSource & DataVolume

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-03-25 11:33:20 +01:00
Arnon Gilboa
81fa12ed38
Add DataImportCron ImageStream tag support (#2117)
* Add DataImportCron ImageStream tag support

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Fix storageClass possible nil deref

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Change DataSource indexer key separator

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Add DataImportCron ImageStream tag utest

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-01-25 13:05:05 +01:00
Arnon Gilboa
148793b1d6
Update DataSource Ready condition on DV update (#2095)
* Update DataSource Ready condition on DV update

Added the DataSource controller a DV watch, so whenever a DataSource
referred DV/PVC is created/updated/deleted, the DataSource Ready status
condition is updated accordingly.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* Use field indexer for DV watch

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>

* CR fixes

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-01-19 02:11:40 +01:00
Arnon Gilboa
d77abc3fa9
Add DataSource controller to update the Ready condition (#2085)
even when there is no DataImportCron associated

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
2022-01-06 21:06:23 +01:00