Skip to content

Commit 52e725e

Browse files
committed
fixed cluster policy reconcile err type
Signed-off-by: librantwmq <[email protected]>
1 parent 6aeea0d commit 52e725e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

controllers/clusterpolicy_controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ func (r *ClusterPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Reques
9999
var condErr error
100100
err := r.Client.Get(ctx, req.NamespacedName, instance)
101101
if err != nil {
102-
err = fmt.Errorf("Failed to get ClusterPolicy object: %v", err)
103-
r.Log.Error(nil, err.Error())
102+
r.Log.Error(nil, fmt.Sprintf("Failed to get ClusterPolicy object: %v", err))
104103
clusterPolicyCtrl.operatorMetrics.reconciliationStatus.Set(reconciliationStatusClusterPolicyUnavailable)
105104
if apierrors.IsNotFound(err) {
106105
// Request object not found, could have been deleted after reconcile request.

0 commit comments

Comments
 (0)