Skip to content

Commit

Permalink
Drop namespacedName
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelSpeed committed Feb 7, 2020
1 parent ea07f07 commit 78fb5a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions controllers/machinehealthcheck_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ func (r *MachineHealthCheckReconciler) clusterToMachineHealthCheck(o handler.Map
return requests
}

func namespacedName(obj metav1.Object) types.NamespacedName {
return types.NamespacedName{Namespace: obj.GetNamespace(), Name: obj.GetName()}
}

// machineToMachineHealthCheck maps events from Machine objects to
// MachineHealthCheck objects that monitor the given machine
func (r *MachineHealthCheckReconciler) machineToMachineHealthCheck(o handler.MapObject) []reconcile.Request {
Expand Down Expand Up @@ -309,7 +305,7 @@ func (r *MachineHealthCheckReconciler) nodeToMachineHealthCheck(o handler.MapObj

machine, err := r.getMachineFromNode(node.Name)
if machine == nil || err != nil {
r.Log.Error(err, "Unable to retrieve machine from node", "node", namespacedName(node).String())
r.Log.Error(err, "Unable to retrieve machine from node", "node", node.GetName())
return nil
}

Expand Down

0 comments on commit 78fb5a9

Please sign in to comment.