Skip to content

Commit d282047

Browse files
authored
Merge pull request kubernetes-csi#1338 from Madhu-1/cleanup
fix: remove unused help functions
2 parents bf2ed74 + 6f22bc3 commit d282047

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

pkg/common-controller/groupsnapshot_controller_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (ctrl *csiSnapshotCommonController) SetDefaultGroupSnapshotClass(groupSnaps
165165
_, updateErr := ctrl.storeGroupSnapshotUpdate(newGroupSnapshot)
166166
if updateErr != nil {
167167
// We will get a "group snapshot update" event soon, this is not a big error
168-
klog.V(4).Infof("setDefaultSnapshotClass [%s]: cannot update internal cache: %v", utils.GroupSnapshotKey(groupSnapshot), updateErr)
168+
klog.V(4).Infof("setDefaultGroupSnapshotClass [%s]: cannot update internal cache: %v", utils.GroupSnapshotKey(groupSnapshot), updateErr)
169169
}
170170

171171
return defaultClasses[0], newGroupSnapshot, nil

pkg/common-controller/snapshot_controller.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"errors"
2222
"fmt"
2323
"slices"
24-
"strings"
2524
"time"
2625

2726
v1 "k8s.io/api/core/v1"
@@ -1558,15 +1557,6 @@ func (e controllerUpdateError) Error() string {
15581557
return e.message
15591558
}
15601559

1561-
func isControllerUpdateFailError(err *crdv1.VolumeSnapshotError) bool {
1562-
if err != nil {
1563-
if strings.Contains(*err.Message, controllerUpdateFailMsg) {
1564-
return true
1565-
}
1566-
}
1567-
return false
1568-
}
1569-
15701560
// addSnapshotFinalizer adds a Finalizer for VolumeSnapshot.
15711561
func (ctrl *csiSnapshotCommonController) addSnapshotFinalizer(snapshot *crdv1.VolumeSnapshot, addSourceFinalizer bool, addBoundFinalizer bool) error {
15721562
var updatedSnapshot *crdv1.VolumeSnapshot

pkg/sidecar-controller/snapshot_controller.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -561,15 +561,6 @@ func (e controllerUpdateError) Error() string {
561561
return e.message
562562
}
563563

564-
func isControllerUpdateFailError(err *crdv1.VolumeSnapshotError) bool {
565-
if err != nil {
566-
if strings.Contains(*err.Message, controllerUpdateFailMsg) {
567-
return true
568-
}
569-
}
570-
return false
571-
}
572-
573564
func (ctrl *csiSnapshotSideCarController) GetCredentialsFromAnnotation(content *crdv1.VolumeSnapshotContent) (map[string]string, error) {
574565
// get secrets if VolumeSnapshotClass specifies it
575566
var snapshotterCredentials map[string]string

0 commit comments

Comments
 (0)