Skip to content

Commit

Permalink
Cleanup labeling
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-cox committed Oct 21, 2022
1 parent ca1019e commit 838bc4a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ func (r *NodePoolReconciler) listMachineSets(nodePool *hyperv1.NodePool) ([]clie
}
default:
// need a default path that returns a value that does not cause the hypershift operator to crash
// if no explicit machineTemplate is defined safe to assume none exist
// if no explicit machineSet is defined safe to assume none exist
return nil, nil
}
machineSetList.SetGroupVersionKind(schema.GroupVersionKind{
Expand All @@ -1811,9 +1811,9 @@ func (r *NodePoolReconciler) listMachineSets(nodePool *hyperv1.NodePool) ([]clie
return nil, fmt.Errorf("failed to list MachineSets: %w", err)
}
var filtered []client.Object
for i, machineTemplate := range machineSetList.Items {
if machineTemplate.GetAnnotations() != nil {
if annotation, ok := machineTemplate.GetAnnotations()[nodePoolAnnotation]; ok &&
for i, machineSet := range machineSetList.Items {
if machineSet.GetAnnotations() != nil {
if annotation, ok := machineSet.GetAnnotations()[nodePoolAnnotation]; ok &&
annotation == client.ObjectKeyFromObject(nodePool).String() {
filtered = append(filtered, &machineSetList.Items[i])
}
Expand Down

0 comments on commit 838bc4a

Please sign in to comment.