Skip to content

Commit

Permalink
fix(oscMachineTemplate): Nil pointer due to error not managed
Browse files Browse the repository at this point in the history
  • Loading branch information
sebglon authored and outscale-hmi committed Jul 31, 2024
1 parent 412a46d commit cc9870f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/oscmachinetemplate_capacity_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ func (r *OscMachineTemplateReconciler) Reconcile(ctx context.Context, req ctrl.R
Logger: log,
OscMachineTemplate: machineTemplate,
})

if err != nil {
log.V(2).Info("Cluster is not available yet")
log.Error(err, "failed to get machineTemplate.")
return reconcile.Result{RequeueAfter: 30 * time.Second}, nil
}
clusterName := machineTemplateScope.GetClusterName()

labels := map[string]string{"ccm": clusterName + "-crs-ccm"}
Expand Down

0 comments on commit cc9870f

Please sign in to comment.