Skip to content

Commit

Permalink
reused log var
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman committed Jan 29, 2025
1 parent 4cb8987 commit c9442df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/clusterset/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ func (n *NodeReconciler) ensureNetworkPolicies(ctx context.Context, clusterSetLi
continue
}

clusterSetLog := log.WithValues("clusterset", cs.Namespace+"/"+cs.Name)
clusterSetLog.Info("updating NetworkPolicy for ClusterSet")
log = log.WithValues("clusterset", cs.Namespace+"/"+cs.Name)
log.Info("updating NetworkPolicy for ClusterSet")

var err error
setNetworkPolicy, err = netpol(ctx, "", &cs, n.Client)
if err != nil {
return err
}

clusterSetLog.Info("new NetworkPolicy for clusterset")
log.Info("new NetworkPolicy for clusterset")
if err := n.Client.Update(ctx, setNetworkPolicy); err != nil {
return err
}
Expand Down

0 comments on commit c9442df

Please sign in to comment.