@@ -71,7 +71,6 @@ type CheckPointResp struct {
7171
7272// Reconcile is part of the main kubernetes reconciliation loop which aims to
7373// move the current state of the cluster closer to the desired state.
74-
7574// For more details, check Reconcile and its Result here:
7675// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.21.0/pkg/reconcile
7776// NOTE: breaking down the Reconcile() function furhter will reduce the readability
@@ -96,9 +95,9 @@ func (r *SnapShotReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
9695 if err != nil {
9796 if requeue {
9897 return ctrl.Result {}, nil
99- } else {
100- return ctrl.Result {}, err
10198 }
99+
100+ return ctrl.Result {}, err
102101 }
103102 err = controllerutil .SetControllerReference (snapshot , pod , r .Scheme )
104103 if err != nil {
@@ -228,7 +227,7 @@ func (r *SnapShotReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
228227 }
229228
230229 if snapshot .Status .JobID == "" {
231- jobId , err := daemonsetInit (
230+ jobID , err := daemonsetInit (
232231 snapshot .Spec .Output .ContainerRegistry ,
233232 snapshot .Status .CheckPointNodePath ,
234233 snapshot .Status .Node ,
@@ -238,7 +237,7 @@ func (r *SnapShotReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
238237 log .Error (err , "unable init daemonset job" )
239238 return ctrl.Result {}, err
240239 }
241- snapshot .Status .JobID = jobId
240+ snapshot .Status .JobID = jobID
242241 if err := r .Status ().Update (ctx , snapshot ); err != nil {
243242 log .Error (err , "unable to update Snapshot status" )
244243 return ctrl.Result {}, err
@@ -309,10 +308,10 @@ func (r *SnapShotReconciler) PodImageUpdate(
309308}
310309
311310func daemonsetStausFetch (
312- jobId string ,
311+ jobID string ,
313312 node stove8sv1beta1.SnapShotStatusNode ,
314313) (* oci.OciStatus , error ) {
315- ociEndpoint := fmt .Sprintf ("http://%s:%v/oci/%s" , node .Addr , node .DeamonsetPort , jobId )
314+ ociEndpoint := fmt .Sprintf ("http://%s:%v/oci/%s" , node .Addr , node .DeamonsetPort , jobID )
316315 req , err := http .NewRequest (http .MethodGet , ociEndpoint , nil )
317316 if err != nil {
318317 return nil , err
0 commit comments