containerized-data-importer/pkg/controller/common
alromeros 4c911fed27
Fix PVC deletion logic in populators (#3362)
* Fix PVC' deletion logic in CDI populators

This commit ensures that we only proceed with PVC' deletion after confirming that the target PVC is rebound.

Signed-off-by: Alvaro Romero <alromero@redhat.com>

* Refactor IsBound so we check PVC status instead of spec

PVC status should be the definitive source to know whether the PVC is bound or not. This commit updates our IsBound function to use status instead of spec.

It also updates unit tests and related code to match the new behavior.

Signed-off-by: Alvaro Romero <alromero@redhat.com>

* Add check for lost target PVC in populators

Signed-off-by: Alvaro Romero <alromero@redhat.com>

---------

Signed-off-by: Alvaro Romero <alromero@redhat.com>
2024-08-22 22:22:35 +02:00
..
BUILD.bazel GetActiveCDI() should return success if single resource in error state (#3080) 2024-01-25 00:16:06 +01:00
checkpoint-util.go Fix race condition in multi-stage import logic (#3348) 2024-07-25 23:15:10 +02:00
controller_suite_test.go Update to ginkgo v2 (#2788) 2023-07-26 02:35:55 +02:00
runtime-util.go Enable autoformatting linters (#3179) 2024-04-24 13:52:22 +02:00
util_test.go feat: Copy labels from source to DataSource (#3377) 2024-08-16 05:54:21 +02:00
util.go Fix PVC deletion logic in populators (#3362) 2024-08-22 22:22:35 +02:00