Skip to content

Commit

Permalink
Add object name and ns for periodical reconcile (#158)
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Jiang <yu_jiang@intuit.com>
Co-authored-by: Yu Jiang <yu_jiang@intuit.com>
  • Loading branch information
carlyjiang and Yu Jiang authored Oct 31, 2023
1 parent ac96c47 commit 4b80a9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/iamrole_reconcile_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
api "github.com/keikoproj/iam-manager/api/v1alpha1"
"github.com/keikoproj/iam-manager/internal/config"
"github.com/keikoproj/iam-manager/pkg/logging"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
)

Expand Down Expand Up @@ -71,7 +72,8 @@ func (r *IamroleReconciler) ReconcileAllReadyStateIamRoles(ctx context.Context)
continue
}

res, err = r.HandleReconcile(ctx, ctrl.Request{}, iamrole)
req := ctrl.Request{NamespacedName: types.NamespacedName{Namespace: iamrole.Namespace, Name: iamrole.Name}}
res, err = r.HandleReconcile(ctx, req, iamrole)
log.Info("Reconcile result", "result", res, "error", err)

// sleep for 2 seconds for politeness
Expand Down

0 comments on commit 4b80a9d

Please sign in to comment.