Skip to content

Commit b19949a

Browse files
committed
Refactoring
1 parent a9b8c0b commit b19949a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pkg/csi/service/common/commonco/k8sorchestrator/k8sorchestrator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ func Newk8sOrchestrator(ctx context.Context, controllerClusterFlavor cnstypes.Cn
399399
}
400400
}
401401

402-
// Initialize the map for pvc to snapshots
403402
err := initPVCToSnapshotsMap(ctx, controllerClusterFlavor)
404403
if err != nil {
405404
return nil, fmt.Errorf("failed to create PVC to snapshots map. Error: %v", err)
@@ -2314,7 +2313,8 @@ func GetPVCDataSource(ctx context.Context, claim *v1.PersistentVolumeClaim) (*v1
23142313
func initPVCToSnapshotsMap(ctx context.Context, controllerClusterFlavor cnstypes.CnsClusterFlavor) error {
23152314
log := logger.GetLogger(ctx)
23162315
if controllerClusterFlavor != cnstypes.CnsClusterFlavorWorkload {
2317-
// PVC to VolumeSnapshot mapping is only required for WCP.
2316+
// PVC to VolumeSnapshot cache is only required for WCP for now.
2317+
log.Info("non WCP cluster detected. skipping initialising PVC to Snapshot cache.")
23182318
return nil
23192319
}
23202320

pkg/kubernetes/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ type InformerManager struct {
5151
client clientset.Interface
5252
// main shared informer factory
5353
informerFactory informers.SharedInformerFactory
54-
55-
// snapshotInformerFactory - TODO: update this
54+
5655
snapshotInformerFactory externalversions.SharedInformerFactory
5756

5857
// main signal

0 commit comments

Comments
 (0)