Skip to content

Commit

Permalink
controllers: remove unused parameter resourceType
Browse files Browse the repository at this point in the history
Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Nov 15, 2023
1 parent f8358f0 commit b8644fc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions controllers/drplacementcontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -1370,8 +1370,7 @@ func (d *DRPCInstance) cleanupSecondaries(skipCluster string) (bool, error) {
return false, fmt.Errorf("deletion of VRG MCV failed %w", err)
}

err = d.reconciler.MCVGetter.DeleteNamespaceManagedClusterView(d.instance.Name, d.vrgNamespace, clusterName,
rmnutil.MWTypeNS)
err = d.reconciler.MCVGetter.DeleteNamespaceManagedClusterView(d.instance.Name, d.vrgNamespace, clusterName)
// MCV for Namespace is no longer needed
if err != nil {
d.log.Info("Deletion of Namespace MCV failed")
Expand Down
2 changes: 1 addition & 1 deletion controllers/drplacementcontrol_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ func (r *DRPlacementControlReconciler) deleteAllManagedClusterViews(
return fmt.Errorf("failed to delete VRG MCV %w", err)
}

err = r.MCVGetter.DeleteNamespaceManagedClusterView(drpc.Name, drpc.Namespace, drClusterName, rmnutil.MWTypeNS)
err = r.MCVGetter.DeleteNamespaceManagedClusterView(drpc.Name, drpc.Namespace, drClusterName)
// Delete MCV for Namespace
if err != nil {
return fmt.Errorf("failed to delete namespace MCV %w", err)
Expand Down
2 changes: 1 addition & 1 deletion controllers/drplacementcontrol_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func (f FakeMCVGetter) DeleteVRGManagedClusterView(
}

func (f FakeMCVGetter) DeleteNamespaceManagedClusterView(
resourceName, resourceNamespace, clusterName, resourceType string,
resourceName, resourceNamespace, clusterName string,
) error {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/util/mcv_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type ManagedClusterViewGetter interface {

DeleteVRGManagedClusterView(resourceName, resourceNamespace, clusterName string) error

DeleteNamespaceManagedClusterView(resourceName, resourceNamespace, clusterName, resourceType string) error
DeleteNamespaceManagedClusterView(resourceName, resourceNamespace, clusterName string) error

DeleteNFManagedClusterView(resourceName, resourceNamespace, clusterName, resourceType string) error
}
Expand Down Expand Up @@ -353,7 +353,7 @@ func (m ManagedClusterViewGetterImpl) DeleteVRGManagedClusterView(
}

func (m ManagedClusterViewGetterImpl) DeleteNamespaceManagedClusterView(
resourceName, resourceNamespace, clusterName, resourceType string,
resourceName, resourceNamespace, clusterName string,
) error {
logger := ctrl.Log.WithName("MCV").WithValues("resouceName", resourceName)
mcvNameNS := BuildManagedClusterViewName(resourceName, resourceNamespace, MWTypeNS)
Expand Down

0 comments on commit b8644fc

Please sign in to comment.