Skip to content

Commit cae0b46

Browse files
Remove FSS sibling-replica-bound-pvc-check (#3397)
1 parent 22ee321 commit cae0b46

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

manifests/supervisorcluster/1.32/cns-csi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ data:
557557
"fake-attach": "true"
558558
"improved-csi-idempotency": "true"
559559
"block-volume-snapshot": "true"
560-
"sibling-replica-bound-pvc-check": "true"
561560
"tkgs-ha": "true"
562561
"list-volumes": "true"
563562
"cnsmgr-suspend-create-volume": "true"

pkg/csi/service/common/constants.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,6 @@ const (
399399
// BlockVolumeSnapshot is the feature to support CSI Snapshots for block
400400
// volume on vSphere CSI driver.
401401
BlockVolumeSnapshot = "block-volume-snapshot"
402-
// SiblingReplicaBoundPvcCheck is the feature to check whether a PVC of
403-
// a given replica can be placed on a node such that it does not have PVCs
404-
// of any of its sibling replicas.
405-
SiblingReplicaBoundPvcCheck = "sibling-replica-bound-pvc-check"
406402
// CSIWindowsSupport is the feature to support csi block volumes for windows
407403
// node.
408404
CSIWindowsSupport = "csi-windows-support"

pkg/syncer/k8scloudoperator/placement.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@ import (
3535
clientconfig "sigs.k8s.io/controller-runtime/pkg/client/config"
3636

3737
"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"
4138
"sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/logger"
4239
k8sinternal "sigs.k8s.io/vsphere-csi-driver/v3/pkg/kubernetes"
43-
"sigs.k8s.io/vsphere-csi-driver/v3/pkg/syncer/admissionhandler"
4440
)
4541

4642
var (
@@ -539,40 +535,13 @@ func getAllPvcs(ctx context.Context, client kubernetes.Interface, namespace stri
539535
return allPVCsMap, nil
540536
}
541537

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-
564538
// eliminateNodesWithPvcOfSiblingReplica filters out the nodes that have
565539
// bound PVCs of sibling replicas. It finds cousin PVCs of currPVC and
566540
// elimates all nodes which have at least one cousin PVC placed on them.
567541
func eliminateNodesWithPvcOfSiblingReplica(ctx context.Context, client kubernetes.Interface,
568542
currPVC *v1.PersistentVolumeClaim, candidateHosts []string) ([]string, error) {
569543
log := logger.GetLogger(ctx)
570544

571-
if !isSiblingReplicaBoundPvcFSSEnabled(ctx) {
572-
log.Infof("FSS to check for sibling replica's PVCs is not enabled.")
573-
return candidateHosts, nil
574-
}
575-
576545
// Proceed only if it is a vDPP PVC.
577546
pvcLabels := currPVC.GetLabels()
578547
appplatformLabelVal, labelOk := pvcLabels[appplatformLabel]

0 commit comments

Comments
 (0)