Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Mar 13, 2024
1 parent 17ee6e9 commit 7ce397c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions internal/controllers/machine/machine_controller_noderef.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ func (r *Reconciler) patchNode(ctx context.Context, remoteClient client.Client,
// Drop the NodeUninitializedTaint taint on the node given that we are reconciling labels.
hasTaintChanges := taints.RemoveNodeTaint(newNode, clusterv1.NodeUninitializedTaint)

// Set Taint to a node in an old machineDeployment and unset Taint from a node in a new machineDeployment
// Ignore errors as it's not critical for the reconcile.
// Set Taint to a node in an old MachineSet and unset Taint from a node in a new MachineSet
isOutdated, err := shouldNodeHaveOutdatedTaint(ctx, r.Client, m)
if err != nil {
return errors.Wrapf(err, "failed to check if Node %s is outdated", klog.KRef("", node.Name))
Expand Down
2 changes: 2 additions & 0 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ func ClusterToTypedObjectsMapper(c client.Client, ro client.ObjectList, scheme *

// MachineDeploymentToObjectsMapper returns a mapper function that gets a machinedeployment
// and lists all objects for the object passed in and returns a list of requests.
// NB: The objects are required to have `clusterv1.MachineDeploymentNameLabel` applied.
func MachineDeploymentToObjectsMapper(c client.Client, ro client.ObjectList, scheme *runtime.Scheme) (handler.MapFunc, error) {
gvk, err := apiutil.GVKForObject(ro, scheme)
if err != nil {
Expand Down Expand Up @@ -599,6 +600,7 @@ func MachineDeploymentToObjectsMapper(c client.Client, ro client.ObjectList, sch

// MachineSetToObjectsMapper returns a mapper function that gets a machineset
// and lists all objects for the object passed in and returns a list of requests.
// NB: The objects are required to have `clusterv1.MachineSetNameLabel` applied.
func MachineSetToObjectsMapper(c client.Client, ro client.ObjectList, scheme *runtime.Scheme) (handler.MapFunc, error) {
gvk, err := apiutil.GVKForObject(ro, scheme)
if err != nil {
Expand Down

0 comments on commit 7ce397c

Please sign in to comment.