Skip to content

Commit 4a26d23

Browse files
Remove FSS block-volume-snapshot
1 parent a55574d commit 4a26d23

File tree

16 files changed

+33
-328
lines changed

16 files changed

+33
-328
lines changed

manifests/guestcluster/1.33/pvcsi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,6 @@ data:
664664
"online-volume-extend": "true"
665665
"file-volume": "true"
666666
"csi-sv-feature-states-replication": "false" # Do not enable for guest cluster, Refer PR#2386 for details
667-
"block-volume-snapshot": "true"
668667
"tkgs-ha": "true"
669668
"cnsmgr-suspend-create-volume": "true"
670669
"csi-windows-support": "true"

manifests/supervisorcluster/1.32/cns-csi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ data:
556556
"csi-sv-feature-states-replication": "true"
557557
"fake-attach": "true"
558558
"improved-csi-idempotency": "true"
559-
"block-volume-snapshot": "true"
560559
"tkgs-ha": "true"
561560
"list-volumes": "true"
562561
"cnsmgr-suspend-create-volume": "true"

pkg/common/unittestcommon/utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ func GetFakeContainerOrchestratorInterface(orchestratorType int) (commonco.COCom
6262
"volume-health": "true",
6363
"csi-migration": "true",
6464
"file-volume": "true",
65-
"block-volume-snapshot": "true",
6665
"tkgs-ha": "true",
6766
"list-volumes": "true",
6867
"csi-internal-generated-cluster-id": "true",

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ func getReleasedVanillaFSS() map[string]struct{} {
359359
return map[string]struct{}{
360360
common.CSIMigration: {},
361361
common.OnlineVolumeExtend: {},
362-
common.BlockVolumeSnapshot: {},
363362
common.CSIWindowsSupport: {},
364363
common.ListVolumes: {},
365364
common.CnsMgrSuspendCreateVolume: {},

pkg/csi/service/common/constants.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,6 @@ const (
396396
// CSIVolumeManagerIdempotency is the feature flag for idempotency handling
397397
// in CSI volume manager.
398398
CSIVolumeManagerIdempotency = "improved-csi-idempotency"
399-
// BlockVolumeSnapshot is the feature to support CSI Snapshots for block
400-
// volume on vSphere CSI driver.
401-
BlockVolumeSnapshot = "block-volume-snapshot"
402399
// CSIWindowsSupport is the feature to support csi block volumes for windows
403400
// node.
404401
CSIWindowsSupport = "csi-windows-support"

pkg/csi/service/vanilla/controller.go

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,7 @@ func (c *controller) Init(config *cnsconfig.Config, version string) error {
120120
var err error
121121
var operationStore cnsvolumeoperationrequest.VolumeOperationRequest
122122
operationStore, err = cnsvolumeoperationrequest.InitVolumeOperationRequestInterface(ctx,
123-
config.Global.CnsVolumeOperationRequestCleanupIntervalInMin,
124-
func() bool {
125-
return commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
126-
}, false)
123+
config.Global.CnsVolumeOperationRequestCleanupIntervalInMin, false)
127124
if err != nil {
128125
log.Errorf("failed to initialize VolumeOperationRequestInterface with error: %v", err)
129126
return err
@@ -523,13 +520,12 @@ func (c *controller) createBlockVolume(ctx context.Context, req *csi.CreateVolum
523520
volSizeMB := int64(common.RoundUpSize(volSizeBytes, common.MbInBytes))
524521

525522
// Check if the feature states are enabled.
526-
isBlockVolumeSnapshotEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
527523
csiMigrationFeatureState := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.CSIMigration)
528524

529525
// Check if requested volume size and source snapshot size matches
530526
volumeSource := req.GetVolumeContentSource()
531527
var contentSourceSnapshotID string
532-
if isBlockVolumeSnapshotEnabled && volumeSource != nil {
528+
if volumeSource != nil {
533529
isCnsSnapshotSupported, err := c.manager.VcenterManager.IsCnsSnapshotSupported(ctx,
534530
c.manager.VcenterConfig.Host)
535531
if err != nil {
@@ -2173,8 +2169,7 @@ func (c *controller) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequ
21732169
volumeType = convertCnsVolumeType(ctx, cnsVolumeType)
21742170
}
21752171
// Check if the volume contains CNS snapshots only for block volumes.
2176-
if cnsVolumeType == common.BlockVolumeType &&
2177-
commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot) {
2172+
if cnsVolumeType == common.BlockVolumeType {
21782173
isCnsSnapshotSupported, err := vCenterManager.IsCnsSnapshotSupported(ctx, vCenterHost)
21792174
if err != nil {
21802175
return nil, csifault.CSIInternalFault, logger.LogNewErrorCodef(log, codes.Internal,
@@ -2588,28 +2583,27 @@ func (c *controller) ControllerExpandVolume(ctx context.Context, req *csi.Contro
25882583
volumeID := req.GetVolumeId()
25892584
volSizeBytes := int64(req.GetCapacityRange().GetRequiredBytes())
25902585
volSizeMB := int64(common.RoundUpSize(volSizeBytes, common.MbInBytes))
2586+
25912587
// Check if the volume contains CNS snapshots.
2592-
if commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot) {
2593-
isCnsSnapshotSupported, err := vCenterManager.IsCnsSnapshotSupported(ctx, vCenterHost)
2588+
isCnsSnapshotSupported, err := vCenterManager.IsCnsSnapshotSupported(ctx, vCenterHost)
2589+
if err != nil {
2590+
return nil, csifault.CSIInternalFault, logger.LogNewErrorCodef(log, codes.Internal,
2591+
"failed to check if cns snapshot is supported on VC due to error: %v", err)
2592+
}
2593+
if isCnsSnapshotSupported {
2594+
snapshots, _, err := common.QueryVolumeSnapshotsByVolumeID(ctx, volumeManager, volumeID,
2595+
common.QuerySnapshotLimit)
25942596
if err != nil {
25952597
return nil, csifault.CSIInternalFault, logger.LogNewErrorCodef(log, codes.Internal,
2596-
"failed to check if cns snapshot is supported on VC due to error: %v", err)
2598+
"failed to retrieve snapshots for volume: %s. Error: %+v", volumeID, err)
25972599
}
2598-
if isCnsSnapshotSupported {
2599-
snapshots, _, err := common.QueryVolumeSnapshotsByVolumeID(ctx, volumeManager, volumeID,
2600-
common.QuerySnapshotLimit)
2601-
if err != nil {
2602-
return nil, csifault.CSIInternalFault, logger.LogNewErrorCodef(log, codes.Internal,
2603-
"failed to retrieve snapshots for volume: %s. Error: %+v", volumeID, err)
2604-
}
2605-
if len(snapshots) == 0 {
2606-
log.Infof("The volume %s can be safely expanded as no CNS snapshots were found.",
2607-
req.VolumeId)
2608-
} else {
2609-
return nil, csifault.CSIInvalidArgumentFault, logger.LogNewErrorCodef(log, codes.FailedPrecondition,
2610-
"volume: %s with existing snapshots %v cannot be expanded. "+
2611-
"Please delete snapshots before expanding the volume", req.VolumeId, snapshots)
2612-
}
2600+
if len(snapshots) == 0 {
2601+
log.Infof("The volume %s can be safely expanded as no CNS snapshots were found.",
2602+
req.VolumeId)
2603+
} else {
2604+
return nil, csifault.CSIInvalidArgumentFault, logger.LogNewErrorCodef(log, codes.FailedPrecondition,
2605+
"volume: %s with existing snapshots %v cannot be expanded. "+
2606+
"Please delete snapshots before expanding the volume", req.VolumeId, snapshots)
26132607
}
26142608
}
26152609

@@ -3015,11 +3009,6 @@ func (c *controller) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshot
30153009
)
30163010
log.Infof("CreateSnapshot: called with args %+v", *req)
30173011

3018-
isBlockVolumeSnapshotEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
3019-
if !isBlockVolumeSnapshotEnabled {
3020-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "createSnapshot")
3021-
}
3022-
30233012
volumeID := req.GetSourceVolumeId()
30243013
// Fetch vCenterHost, vCenterManager & volumeManager for given snapshot, based on VC configuration
30253014
vCenterManager = getVCenterManagerForVCenter(ctx, c)
@@ -3186,12 +3175,6 @@ func (c *controller) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshot
31863175
)
31873176
log.Infof("DeleteSnapshot: called with args %+v", *req)
31883177

3189-
isBlockVolumeSnapshotEnabled :=
3190-
commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
3191-
if !isBlockVolumeSnapshotEnabled {
3192-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "deleteSnapshot")
3193-
}
3194-
31953178
volumeID, _, err := common.ParseCSISnapshotID(req.SnapshotId)
31963179
if err != nil {
31973180
return nil, logger.LogNewErrorCode(log, codes.InvalidArgument, err.Error())

pkg/csi/service/wcp/controller.go

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ func (c *controller) Init(config *cnsconfig.Config, version string) error {
156156
log.Info("CSI Volume manager idempotency handling feature flag is enabled.")
157157
operationStore, err = cnsvolumeoperationrequest.InitVolumeOperationRequestInterface(ctx,
158158
config.Global.CnsVolumeOperationRequestCleanupIntervalInMin,
159-
func() bool {
160-
return commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
161-
}, isPodVMOnStretchSupervisorFSSEnabled)
159+
isPodVMOnStretchSupervisorFSSEnabled)
162160
if err != nil {
163161
log.Errorf("failed to initialize VolumeOperationRequestInterface with error: %v", err)
164162
return err
@@ -388,9 +386,7 @@ func (c *controller) ReloadConfiguration(reconnectToVCFromNewConfig bool) error
388386
log.Info("CSI Volume manager idempotency handling feature flag is enabled.")
389387
operationStore, err = cnsvolumeoperationrequest.InitVolumeOperationRequestInterface(ctx,
390388
c.manager.CnsConfig.Global.CnsVolumeOperationRequestCleanupIntervalInMin,
391-
func() bool {
392-
return commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
393-
}, isPodVMOnStretchSupervisorFSSEnabled)
389+
isPodVMOnStretchSupervisorFSSEnabled)
394390
if err != nil {
395391
log.Errorf("failed to initialize VolumeOperationRequestInterface with error: %v", err)
396392
return err
@@ -721,11 +717,10 @@ func (c *controller) createBlockVolume(ctx context.Context, req *csi.CreateVolum
721717
volSizeBytes = int64(req.GetCapacityRange().GetRequiredBytes())
722718
}
723719
volSizeMB := int64(common.RoundUpSize(volSizeBytes, common.MbInBytes))
724-
isBlockVolumeSnapshotEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
725720
// Check if requested volume size and source snapshot size matches
726721
volumeSource := req.GetVolumeContentSource()
727722
var contentSourceSnapshotID string
728-
if isBlockVolumeSnapshotEnabled && volumeSource != nil {
723+
if volumeSource != nil {
729724
sourceSnapshot := volumeSource.GetSnapshot()
730725
if sourceSnapshot == nil {
731726
return nil, csifault.CSIInvalidArgumentFault,
@@ -1688,8 +1683,7 @@ func (c *controller) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequ
16881683
volumeType = convertCnsVolumeType(ctx, cnsVolumeType)
16891684
}
16901685
// Check if the volume contains CNS snapshots only for block volumes.
1691-
if cnsVolumeType == common.BlockVolumeType &&
1692-
commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot) {
1686+
if cnsVolumeType == common.BlockVolumeType {
16931687
snapshots, _, err := common.QueryVolumeSnapshotsByVolumeID(ctx, c.manager.VolumeManager, req.VolumeId,
16941688
common.QuerySnapshotLimit)
16951689
if err != nil {
@@ -2373,10 +2367,6 @@ func (c *controller) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshot
23732367
ctx = logger.NewContextWithLogger(ctx)
23742368
log := logger.GetLogger(ctx)
23752369
log.Infof("WCP CreateSnapshot: called with args %+v", *req)
2376-
isBlockVolumeSnapshotWCPEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
2377-
if !isBlockVolumeSnapshotWCPEnabled {
2378-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "createSnapshot")
2379-
}
23802370
volumeType := prometheus.PrometheusUnknownVolumeType
23812371
createSnapshotInternal := func() (*csi.CreateSnapshotResponse, error) {
23822372
// Validate CreateSnapshotRequest
@@ -2517,10 +2507,6 @@ func (c *controller) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshot
25172507
log.Infof("DeleteSnapshot: called with args %+v", *req)
25182508
volumeType := prometheus.PrometheusBlockVolumeType
25192509
start := time.Now()
2520-
isBlockVolumeSnapshotWCPEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
2521-
if !isBlockVolumeSnapshotWCPEnabled {
2522-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "deleteSnapshot")
2523-
}
25242510
deleteSnapshotInternal := func() (*csi.DeleteSnapshotResponse, error) {
25252511
csiSnapshotID := req.GetSnapshotId()
25262512
isStorageQuotaM2FSSEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx,
@@ -2593,10 +2579,6 @@ func (c *controller) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRe
25932579
log := logger.GetLogger(ctx)
25942580
volumeType := prometheus.PrometheusBlockVolumeType
25952581
log.Infof("ListSnapshots: called with args %+v", *req)
2596-
isBlockVolumeSnapshotWCPEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
2597-
if !isBlockVolumeSnapshotWCPEnabled {
2598-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "listSnapshot")
2599-
}
26002582
listSnapshotsInternal := func() (*csi.ListSnapshotsResponse, error) {
26012583
err := validateWCPListSnapshotRequest(ctx, req)
26022584
if err != nil {
@@ -2664,8 +2646,7 @@ func (c *controller) ControllerExpandVolume(ctx context.Context, req *csi.Contro
26642646
}
26652647
volumeType = convertCnsVolumeType(ctx, cnsVolumeType)
26662648
}
2667-
if cnsVolumeType == common.BlockVolumeType &&
2668-
commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot) {
2649+
if cnsVolumeType == common.BlockVolumeType {
26692650
snapshots, _, err := common.QueryVolumeSnapshotsByVolumeID(ctx, c.manager.VolumeManager, req.VolumeId,
26702651
common.QuerySnapshotLimit)
26712652
if err != nil {

pkg/csi/service/wcpguest/controller.go

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ func (c *controller) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequ
327327
}
328328
volSizeMB := int64(common.RoundUpSize(volSizeBytes, common.MbInBytes))
329329
volumeSource := req.GetVolumeContentSource()
330-
if commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot) &&
331-
volumeSource != nil {
330+
if volumeSource != nil {
332331
sourceSnapshot := volumeSource.GetSnapshot()
333332
if sourceSnapshot == nil {
334333
return nil, csifault.CSIInvalidArgumentFault,
@@ -493,8 +492,7 @@ func (c *controller) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequ
493492
}
494493

495494
// Set the Snapshot VolumeContentSource in the CreateVolumeResponse
496-
if commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot) &&
497-
volumeSnapshotName != "" {
495+
if volumeSnapshotName != "" {
498496
resp.Volume.ContentSource = &csi.VolumeContentSource{
499497
Type: &csi.VolumeContentSource_Snapshot{
500498
Snapshot: &csi.VolumeContentSource_SnapshotSource{
@@ -1603,11 +1601,6 @@ func (c *controller) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshot
16031601
start := time.Now()
16041602
volumeType := prometheus.PrometheusBlockVolumeType
16051603
log.Infof("CreateSnapshot: called with args %+v", *req)
1606-
isBlockVolumeSnapshotWCPEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx,
1607-
common.BlockVolumeSnapshot)
1608-
if !isBlockVolumeSnapshotWCPEnabled {
1609-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "createSnapshot")
1610-
}
16111604
createSnapshotInternal := func() (*csi.CreateSnapshotResponse, error) {
16121605
// Search for supervisor PVC and ensure it exists
16131606
supervisorPVCName := req.SourceVolumeId
@@ -1735,10 +1728,6 @@ func (c *controller) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshot
17351728
start := time.Now()
17361729
volumeType := prometheus.PrometheusBlockVolumeType
17371730
log.Infof("DeleteSnapshot: called with args %+v", *req)
1738-
isBlockVolumeSnapshotWCPEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
1739-
if !isBlockVolumeSnapshotWCPEnabled {
1740-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "deleteSnapshot")
1741-
}
17421731
deleteSnapshotInternal := func() (*csi.DeleteSnapshotResponse, error) {
17431732
csiSnapshotID := req.GetSnapshotId()
17441733
// Retrieve the supervisor volumesnapshot
@@ -1828,10 +1817,6 @@ func (c *controller) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRe
18281817
start := time.Now()
18291818
volumeType := prometheus.PrometheusBlockVolumeType
18301819
log.Infof("ListSnapshots: called with args %+v", *req)
1831-
isBlockVolumeSnapshotEnabled := commonco.ContainerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
1832-
if !isBlockVolumeSnapshotEnabled {
1833-
return nil, logger.LogNewErrorCode(log, codes.Unimplemented, "listSnapshot")
1834-
}
18351820
listSnapshotsInternal := func() (*csi.ListSnapshotsResponse, error) {
18361821
log.Infof("ListSnapshots: called with args %+v", *req)
18371822
maxEntries := common.QuerySnapshotLimit

pkg/internalapis/cnsvolumeoperationrequest/cnsvolumeoperationrequest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var (
8585
// VolumeOperationRequest interface. Clients are unaware of the implementation
8686
// details to read and persist volume operation details.
8787
func InitVolumeOperationRequestInterface(ctx context.Context, cleanupInterval int,
88-
isBlockVolumeSnapshotEnabled func() bool, isPodVMOnStretchSupervisorEnabled bool) (
88+
isPodVMOnStretchSupervisorEnabled bool) (
8989
VolumeOperationRequest, error) {
9090
log := logger.GetLogger(ctx)
9191
csiNamespace = getCSINamespace()

pkg/syncer/admissionhandler/admissionhandler.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ var (
5656
// CO agnostic orchestrator in the admission handler package.
5757
COInitParams *interface{}
5858
featureGateCsiMigrationEnabled bool
59-
featureGateBlockVolumeSnapshotEnabled bool
6059
featureGateTKGSHaEnabled bool
6160
featureGateVolumeHealthEnabled bool
6261
featureGateTopologyAwareFileVolumeEnabled bool
@@ -147,7 +146,6 @@ func StartWebhookServer(ctx context.Context, enableWebhookClientCertVerification
147146
if clusterFlavor == cnstypes.CnsClusterFlavorWorkload {
148147
featureGateTKGSHaEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.TKGsHA)
149148
featureGateVolumeHealthEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.VolumeHealth)
150-
featureGateBlockVolumeSnapshotEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
151149
featureGateByokEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.WCP_VMService_BYOK)
152150
featureIsSharedDiskEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.SharedDiskFss)
153151
featureFileVolumesWithVmServiceEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx,
@@ -160,7 +158,6 @@ func StartWebhookServer(ctx context.Context, enableWebhookClientCertVerification
160158
}
161159
} else if clusterFlavor == cnstypes.CnsClusterFlavorGuest {
162160
featureIsLinkedCloneSupportEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.LinkedCloneSupport)
163-
featureGateBlockVolumeSnapshotEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
164161
startPVCSIWebhookManager(ctx)
165162
} else if clusterFlavor == cnstypes.CnsClusterFlavorVanilla {
166163
if cfg == nil {
@@ -172,13 +169,12 @@ func StartWebhookServer(ctx context.Context, enableWebhookClientCertVerification
172169
log.Debugf("webhook config: %v", cfg)
173170
}
174171
featureGateCsiMigrationEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.CSIMigration)
175-
featureGateBlockVolumeSnapshotEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx, common.BlockVolumeSnapshot)
176172
featureGateTopologyAwareFileVolumeEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx,
177173
common.TopologyAwareFileVolume)
178174
featureFileVolumesWithVmServiceEnabled = containerOrchestratorUtility.IsFSSEnabled(ctx,
179175
common.FileVolumesWithVmService)
180176

181-
if featureGateCsiMigrationEnabled || featureGateBlockVolumeSnapshotEnabled {
177+
if featureGateCsiMigrationEnabled {
182178
certs, err := tls.LoadX509KeyPair(cfg.WebHookConfig.CertFile, cfg.WebHookConfig.KeyFile)
183179
if err != nil {
184180
log.Errorf("failed to load key pair. certFile: %q, keyFile: %q err: %v",

0 commit comments

Comments
 (0)