Skip to content

Commit

Permalink
Start refactoring out nodepool.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Jont828 committed Aug 8, 2023
1 parent c4f9ea3 commit af6c2fc
Show file tree
Hide file tree
Showing 2 changed files with 268 additions and 171 deletions.
14 changes: 7 additions & 7 deletions exp/internal/controllers/machinepool_controller_noderef.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, cluster *
return ctrl.Result{}, err
}

if err = r.deleteRetiredNodes(ctx, clusterClient, mp.Status.NodeRefs, mp.Spec.ProviderIDList); err != nil {
return ctrl.Result{}, err
}
// if err = r.deleteRetiredNodes(ctx, clusterClient, mp.Status.NodeRefs, mp.Spec.ProviderIDList); err != nil {
// return ctrl.Result{}, err
// }

// Get the Node references.
nodeRefsResult, err := r.getNodeReferences(ctx, clusterClient, mp.Spec.ProviderIDList)
Expand All @@ -101,10 +101,10 @@ func (r *MachinePoolReconciler) reconcileNodeRefs(ctx context.Context, cluster *
r.recorder.Event(mp, corev1.EventTypeNormal, "SuccessfulSetNodeRefs", fmt.Sprintf("%+v", mp.Status.NodeRefs))

// Reconcile node annotations and taints.
err = r.patchNodes(ctx, clusterClient, nodeRefsResult.references, mp)
if err != nil {
return ctrl.Result{}, err
}
// err = r.patchNodes(ctx, clusterClient, nodeRefsResult.references, mp)
// if err != nil {
// return ctrl.Result{}, err
// }

if mp.Status.Replicas != mp.Status.ReadyReplicas || len(nodeRefsResult.references) != int(mp.Status.ReadyReplicas) {
log.Info("NodeRefs != ReadyReplicas", "NodeRefs", len(nodeRefsResult.references), "ReadyReplicas", mp.Status.ReadyReplicas)
Expand Down
Loading

0 comments on commit af6c2fc

Please sign in to comment.