Skip to content

Commit

Permalink
Update doc of shouldUseCDIPopulator to reflect changes
Browse files Browse the repository at this point in the history
I find myself going back a lot to this function and I noticed
some of the fallback reasons are outdated following:
kubevirt#2765
kubevirt#2873

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
  • Loading branch information
akalenyu committed Sep 21, 2023
1 parent f7f95c5 commit fe5e5e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions doc/cdi-populators.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@ The behavior will be the same as always with the following key differences:
> NOTE: Datavolumes and the PVCs they create will be marked with "usePopulator" Annotation to indicate the population is done via CDI populators
For more information of using datavolumes for population check the [datavolume doc](datavolumes.md)

### Fallback to legacy population

In some cases, CDI will fall back to legacy population methods, and thus skip using volume populators:
* Storage provisioner is non-CSI
* Annotation `cdi.kubevirt.io/storage.usePopulator` set to `"false"`
2 changes: 0 additions & 2 deletions pkg/controller/datavolume/controller-base.go
Original file line number Diff line number Diff line change
Expand Up @@ -1164,8 +1164,6 @@ func (r *ReconcilerBase) handlePvcCreation(log logr.Logger, syncState *dvSyncSta
// shouldUseCDIPopulator returns if the population of the PVC should be done using
// CDI populators.
// Currently it will use populators only if:
// * no podRetainAfterCompletion annotation
// * storageClass bindingMode is not wffc while honorWaitForFirstConsumer feature gate is disabled
// * storageClass used is CSI storageClass
func (r *ReconcilerBase) shouldUseCDIPopulator(syncState *dvSyncState) (bool, error) {
dv := syncState.dvMutated
Expand Down

0 comments on commit fe5e5e7

Please sign in to comment.