Skip to content

Commit

Permalink
[controller] Fix naming (#11)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Zimin <[email protected]>
  • Loading branch information
AleksZimin authored Mar 1, 2024
1 parent 51e315e commit 878439e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func reconcileLSCDeleteFunc(
}

log.Debug(fmt.Sprintf("[reconcileLSCDeleteFunc] starts removing a finalizer %s from the LocalStorageClass, name: %s", LocalStorageClassFinalizerName, lsc.Name))
removed, err := removeLVMSCFinalizerIfExists(ctx, cl, lsc)
removed, err := removeLocalSCFinalizerIfExists(ctx, cl, lsc)
if err != nil {
log.Error(err, "[reconcileLSCDeleteFunc] unable to remove a finalizer %s from the LocalStorageClass, name: %s", LocalStorageClassFinalizerName, lsc.Name)
upErr := updateLocalStorageClassPhase(ctx, cl, lsc, FailedStatusPhase, fmt.Sprintf("Unable to remove a finalizer, err: %s", err.Error()))
Expand All @@ -288,7 +288,7 @@ func reconcileLSCDeleteFunc(
return false, nil
}

func removeLVMSCFinalizerIfExists(ctx context.Context, cl client.Client, lsc *v1alpha1.LocalStorageClass) (bool, error) {
func removeLocalSCFinalizerIfExists(ctx context.Context, cl client.Client, lsc *v1alpha1.LocalStorageClass) (bool, error) {
removed := false
for i, f := range lsc.Finalizers {
if f == LocalStorageClassFinalizerName {
Expand Down

0 comments on commit 878439e

Please sign in to comment.