@@ -35,12 +35,8 @@ import (
35
35
clientconfig "sigs.k8s.io/controller-runtime/pkg/client/config"
36
36
37
37
"sigs.k8s.io/vsphere-csi-driver/v3/pkg/apis/storagepool/cns/v1alpha1"
38
- cnsconfig "sigs.k8s.io/vsphere-csi-driver/v3/pkg/common/config"
39
- "sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/common"
40
- "sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/common/commonco"
41
38
"sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/logger"
42
39
k8sinternal "sigs.k8s.io/vsphere-csi-driver/v3/pkg/kubernetes"
43
- "sigs.k8s.io/vsphere-csi-driver/v3/pkg/syncer/admissionhandler"
44
40
)
45
41
46
42
var (
@@ -539,40 +535,13 @@ func getAllPvcs(ctx context.Context, client kubernetes.Interface, namespace stri
539
535
return allPVCsMap , nil
540
536
}
541
537
542
- // Check if internal FSS to check for sibling replica bound PVCs is enabled.
543
- func isSiblingReplicaBoundPvcFSSEnabled (ctx context.Context ) bool {
544
- log := logger .GetLogger (ctx )
545
-
546
- containerOrchestratorUtility := commonco .ContainerOrchestratorUtility
547
- if containerOrchestratorUtility == nil {
548
- clusterFlavor , err := cnsconfig .GetClusterFlavor (ctx )
549
- if err != nil {
550
- log .Debugf ("Failed retrieving cluster flavor. Error: %v" , err )
551
- return false
552
- }
553
- containerOrchestratorUtility , err = commonco .GetContainerOrchestratorInterface (ctx ,
554
- common .Kubernetes , clusterFlavor , * admissionhandler .COInitParams )
555
- if err != nil {
556
- log .Debugf ("failed to get k8s interface. err: %v" , err )
557
- return false
558
- }
559
- }
560
-
561
- return containerOrchestratorUtility .IsFSSEnabled (ctx , common .SiblingReplicaBoundPvcCheck )
562
- }
563
-
564
538
// eliminateNodesWithPvcOfSiblingReplica filters out the nodes that have
565
539
// bound PVCs of sibling replicas. It finds cousin PVCs of currPVC and
566
540
// elimates all nodes which have at least one cousin PVC placed on them.
567
541
func eliminateNodesWithPvcOfSiblingReplica (ctx context.Context , client kubernetes.Interface ,
568
542
currPVC * v1.PersistentVolumeClaim , candidateHosts []string ) ([]string , error ) {
569
543
log := logger .GetLogger (ctx )
570
544
571
- if ! isSiblingReplicaBoundPvcFSSEnabled (ctx ) {
572
- log .Infof ("FSS to check for sibling replica's PVCs is not enabled." )
573
- return candidateHosts , nil
574
- }
575
-
576
545
// Proceed only if it is a vDPP PVC.
577
546
pvcLabels := currPVC .GetLabels ()
578
547
appplatformLabelVal , labelOk := pvcLabels [appplatformLabel ]
0 commit comments