Skip to content

Commit

Permalink
Merge pull request #618 from adrianchiris/minor-improvement-operator-…
Browse files Browse the repository at this point in the history
…config

minor improvements in sriovOpeatorConfig controller
  • Loading branch information
zeeke authored Feb 6, 2024
2 parents d131e98 + a0d9132 commit 252c959
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controllers/sriovoperatorconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ func (r *SriovOperatorConfigReconciler) Reconcile(ctx context.Context, req ctrl.
return reconcile.Result{}, err
}

snolog.SetLogLevel(defaultConfig.Spec.LogLevel)

// Fetch the SriovNetworkNodePolicyList
policyList := &sriovnetworkv1.SriovNetworkNodePolicyList{}
err = r.List(ctx, policyList, &client.ListOptions{})
Expand Down Expand Up @@ -142,8 +144,6 @@ func (r *SriovOperatorConfigReconciler) Reconcile(ctx context.Context, req ctrl.
return reconcile.Result{}, err
}

snolog.SetLogLevel(defaultConfig.Spec.LogLevel)

// For Openshift we need to create the systemd files using a machine config
if vars.ClusterType == consts.ClusterTypeOpenshift {
// TODO: add support for hypershift as today there is no MCO on hypershift clusters
Expand All @@ -155,6 +155,8 @@ func (r *SriovOperatorConfigReconciler) Reconcile(ctx context.Context, req ctrl.
return reconcile.Result{}, err
}
}

logger.Info("Reconcile SriovOperatorConfig completed successfully")
return reconcile.Result{RequeueAfter: consts.ResyncPeriod}, nil
}

Expand Down

0 comments on commit 252c959

Please sign in to comment.