Skip to content

Commit

Permalink
Filter replicated policy in rootstatus ctlr
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Rae Kim <[email protected]>
  • Loading branch information
yiraeChristineKim authored and openshift-ci[bot] committed Oct 23, 2023
1 parent 7b1c57b commit f423823
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/rootpolicystatus/root_policy_status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ func (r *RootPolicyStatusReconciler) Reconcile(ctx context.Context, request ctrl
return reconcile.Result{}, err
}

// Replicated policies don't need to update status here
if _, ok := rootPolicy.Labels["policy.open-cluster-management.io/root-policy"]; ok {
return reconcile.Result{}, nil
}

_, err = common.RootStatusUpdate(ctx, r.Client, rootPolicy)
if err != nil {
return reconcile.Result{}, err
Expand Down

0 comments on commit f423823

Please sign in to comment.