Skip to content

Commit

Permalink
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
Browse files Browse the repository at this point in the history
  • Loading branch information
duckhawk committed Feb 20, 2025
1 parent 29ac7a9 commit 408fe1d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions images/sds-local-volume-csi/src/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (d *Driver) CreateVolume(ctx context.Context, request *csi.CreateVolumeRequ
d.log.Error(err, fmt.Sprintf("[CreateVolume][traceID:%s][volumeID:%s] error WaitForStatusUpdate. Delete LVMLogicalVolume %s", traceID, volumeID, request.Name))

volumeCleanup := "disable"
if feature.DataEraseEnabled() {
if feature.VolumeCleanupEnabled() {
localStorageClass, _ := utils.GetLSCBeforeLLVDelete(*d.log, d.cl, ctx, request.Name, traceID)
if localStorageClass != nil && localStorageClass.Spec.LVM != nil && localStorageClass.Spec.LVM.Thick != nil && localStorageClass.Spec.LVM.Thick.VolumeCleanup != "" {
volumeCleanup = localStorageClass.Spec.LVM.Thick.VolumeCleanup
Expand Down Expand Up @@ -310,7 +310,7 @@ func (d *Driver) DeleteVolume(ctx context.Context, request *csi.DeleteVolumeRequ
}

volumeCleanup := "disable"
if feature.DataEraseEnabled() {
if feature.VolumeCleanupEnabled() {
localStorageClass, _ := utils.GetLSCBeforeLLVDelete(*d.log, d.cl, ctx, request.VolumeId, traceID)
if localStorageClass != nil && localStorageClass.Spec.LVM != nil && localStorageClass.Spec.LVM.Thick != nil && localStorageClass.Spec.LVM.Thick.VolumeCleanup != "" {
volumeCleanup = localStorageClass.Spec.LVM.Thick.VolumeCleanup
Expand Down
2 changes: 1 addition & 1 deletion lib/go/common/pkg/feature/const_ce.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ limitations under the License.
package feature

const snapshotsEnabled = false
const dataEraseEnabled = false
const volumeCleanupEnabled = false
2 changes: 1 addition & 1 deletion lib/go/common/pkg/feature/const_csepro.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE
package feature

const snapshotsEnabled = true
const dataEraseEnabled = true
const volumeCleanupEnabled = true
2 changes: 1 addition & 1 deletion lib/go/common/pkg/feature/const_ee.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE
package feature

const snapshotsEnabled = true
const dataEraseEnabled = true
const volumeCleanupEnabled = true
2 changes: 1 addition & 1 deletion lib/go/common/pkg/feature/const_se.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE
package feature

const snapshotsEnabled = true
const dataEraseEnabled = true
const volumeCleanupEnabled = true
2 changes: 1 addition & 1 deletion lib/go/common/pkg/feature/const_seplus.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE
package feature

const snapshotsEnabled = true
const dataEraseEnabled = true
const volumeCleanupEnabled = true
4 changes: 2 additions & 2 deletions lib/go/common/pkg/feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ func SnapshotsEnabled() bool {
return snapshotsEnabled
}

func DataEraseEnabled() bool {
return dataEraseEnabled
func VolumeCleanupEnabled() bool {
return volumeCleanupEnabled
}

0 comments on commit 408fe1d

Please sign in to comment.