Skip to content

Commit 9af419d

Browse files
committed
🚑 hotfix reconcile error
modified: controllers/pod_controller.go; modified: controllers/pod_controller_functions.go
1 parent cc7ebf0 commit 9af419d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

controllers/pod_controller.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ func cacheKeyFunc(obj interface{}) (string, error) {
4444
var cacheStore = cache.NewTTLStore(cacheKeyFunc, 48*time.Hour)
4545

4646
// Reconcile handles a reconciliation request for a Pod.
47-
// If the Pod has the podHasAnnotation annotation, then Reconcile
48-
// will make sure the podNameLabel label is present with the correct value.
49-
// If the annotation is absent, then Reconcile will make sure the label is too.
5047
func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5148
log := r.Log.WithValues("pod", req.NamespacedName)
5249

@@ -78,7 +75,7 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
7875

7976
if err != nil {
8077
log.Error(err, "failed to get stats from pod")
81-
return ctrl.Result{}, err
78+
return ctrl.Result{}, nil
8279
}
8380
PodUsageData := GeneratePodRequestsObjectFromRestData(data)
8481

controllers/pod_controller_functions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ func (r *PodReconciler) UpdateKubeObject(pod client.Object, ctx context.Context)
4141
if apierrors.IsNotFound(err) {
4242
// The Pod has been deleted since we read it.
4343
// Requeue the Pod to try to reconciliate again.
44-
return ctrl.Result{Requeue: false}, err
44+
return ctrl.Result{}, err
4545
}
4646
log.Error(err, "unable to update pod")
47-
return ctrl.Result{Requeue: false}, err
47+
return ctrl.Result{}, err
4848
}
4949
return ctrl.Result{}, nil
5050
}

0 commit comments

Comments
 (0)