containerized-data-importer/pkg/controller/common
Arnon Gilboa 5d78da38db
Create PVC if possible even if the StorageClass is missing (#2683)
* Create PVC if possible even if SC is missing

When PVC is created with storageClassName and the SC is not found,
k8s looks for PV with the storageClassName for satisfying this claim.
In this case k8s supports also a blank (“”, not the nil default one)
storageClassName. To support this behavior we added:
-DV controller support for this flow (for both “” and non-existing SC)
-Condition update and event when StorageSpec PVC rendering errors and
 PVC is not created (e.g. missing both AccessModes and SC/PV)
-PVC is created even if a satisfying SC/PV doesn't exist if pvc/storage
 AccessModes is set (otherwise k8s PVC validation fails). PVC/DV phase
 will be Pending until a satisfying SC/PV is found
-PV watch to reconcile DVs waiting for the PV storageClassName
-PV storageClassName indexer, so we can list the relevant PVs

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>
2023-05-02 22:16:04 +02:00
..
BUILD.bazel Respect bind.immediate annotation by not attempting fancy clones (#2604) 2023-03-01 04:44:52 +01:00
controller_suite_test.go Create unit test suite for new folders following refactor (#2518) 2022-12-23 01:50:32 +00:00
runtime-util.go Split and refactor DV controller (#2483) 2022-12-22 01:03:15 +00:00
util_test.go Split and refactor DV controller (#2483) 2022-12-22 01:03:15 +00:00
util.go Create PVC if possible even if the StorageClass is missing (#2683) 2023-05-02 22:16:04 +02:00