Skip to content

Commit 5e477f1

Browse files
committed
ctrl: nro: reconcile on node group with poolName
Node group can be set with either MCPselector or a poolName. Validation of the nodegroup configuraion is checked in the reconcile logic, and because poolName is set and MCPSelector is not a valid nodeGroup we need to consider this and reconcile. This was missed when nodeGroup.PoolName was first introduced and didn't cause any observed reconcile failures because: 1. any change on the nodeGroups would anyway trigger reconciliation 2. so far the MCP related updates were caused by Kubeletconfig updates which wasn't blocked until the paused-MCP case got handled (which is why this appeared now). Signed-off-by: Shereen Haj <shajmakh@redhat.com>
1 parent 8d9ea8b commit 5e477f1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

internal/controller/numaresourcesoperator_controller.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,18 @@ func (r *NUMAResourcesOperatorReconciler) mcpToNUMAResourceOperator(ctx context.
663663
nro := &nros.Items[i]
664664
mcpLabels := labels.Set(mcp.Labels)
665665
for _, nodeGroup := range nro.Spec.NodeGroups {
666+
if nodeGroup.PoolName != nil {
667+
if mcp.Name == *nodeGroup.PoolName {
668+
requests = append(requests, reconcile.Request{
669+
NamespacedName: client.ObjectKey{
670+
Name: nro.Name,
671+
},
672+
})
673+
break
674+
}
675+
continue
676+
}
677+
666678
if nodeGroup.MachineConfigPoolSelector == nil {
667679
continue
668680
}
@@ -679,11 +691,13 @@ func (r *NUMAResourcesOperatorReconciler) mcpToNUMAResourceOperator(ctx context.
679691
Name: nro.Name,
680692
},
681693
})
694+
break
682695
}
683696
}
684697
}
685698

686699
return requests
700+
687701
}
688702

689703
func (r *NUMAResourcesOperatorReconciler) configMapToNUMAResourceOperator(ctx context.Context, cmObj client.Object) []reconcile.Request {

0 commit comments

Comments
 (0)