From 98b40dbb33ecfa153a40d905a8e5a47cb2e02e47 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Mon, 2 Dec 2024 18:48:26 +0200 Subject: [PATCH] Improve variable name The name `pn` is flagged as typo. Lets use a more clear name that makes the code more readable and keep the speller happy. Signed-off-by: Nir Soffer --- internal/controller/drplacementcontrol_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/drplacementcontrol_controller.go b/internal/controller/drplacementcontrol_controller.go index bb1dbc735..4bb2fb21f 100644 --- a/internal/controller/drplacementcontrol_controller.go +++ b/internal/controller/drplacementcontrol_controller.go @@ -1712,8 +1712,8 @@ func getApplicationDestinationNamespace( appSet := &appSetList.Items[i] if len(appSet.Spec.Generators) > 0 && appSet.Spec.Generators[0].ClusterDecisionResource != nil { - pn := appSet.Spec.Generators[0].ClusterDecisionResource.LabelSelector.MatchLabels[clrapiv1beta1.PlacementLabel] - if pn == placement.GetName() { + name := appSet.Spec.Generators[0].ClusterDecisionResource.LabelSelector.MatchLabels[clrapiv1beta1.PlacementLabel] + if name == placement.GetName() { log.Info("Found ApplicationSet for Placement", "name", appSet.Name, "placement", placement.GetName()) // Retrieving the Destination.Namespace from Application.Spec requires iterating through all Applications // and checking their ownerReferences, which can be time-consuming. Alternatively, we can get the same