Skip to content

Commit

Permalink
Improve variable name
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nirs authored and ShyamsundarR committed Dec 4, 2024
1 parent e6f22e5 commit 98b40db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/drplacementcontrol_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98b40db

Please sign in to comment.