Skip to content

Commit 31a8b87

Browse files
authored
Merge pull request #2343 from newrelic-forks/ms-default-labels-followup
✨use defaults in machineset webhook
2 parents 03c2bb6 + 26c05f1 commit 31a8b87

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

controllers/machineset_controller.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ func (r *MachineSetReconciler) reconcile(ctx context.Context, cluster *clusterv1
177177
machineSet.Spec.Selector.MatchLabels[clusterv1.ClusterLabelName] = machineSet.Spec.ClusterName
178178
machineSet.Spec.Template.Labels[clusterv1.ClusterLabelName] = machineSet.Spec.ClusterName
179179

180-
// Add label and selector based on the MachineSet's name.
181-
machineSet.Spec.Selector.MatchLabels[clusterv1.MachineSetLabelName] = machineSet.Name
182-
machineSet.Spec.Template.Labels[clusterv1.MachineSetLabelName] = machineSet.Name
183-
184180
selectorMap, err := metav1.LabelSelectorAsMap(&machineSet.Spec.Selector)
185181
if err != nil {
186182
return ctrl.Result{}, errors.Wrapf(err, "failed to convert MachineSet %q label selector to a map", machineSet.Name)

0 commit comments

Comments
 (0)