Skip to content

Commit

Permalink
Merge pull request #2698 from stevekuznetsov/skuznets/add-logging
Browse files Browse the repository at this point in the history
🌱 reconcilers/workspace: add logging to outgoing client calls
  • Loading branch information
openshift-merge-robot authored Jan 27, 2023
2 parents 0944f91 + 922f265 commit 583d1c8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ func (r *schedulingReconciler) createLogicalCluster(ctx context.Context, shard *
if err != nil {
return err
}
logging.WithObject(klog.FromContext(ctx), logicalCluster).Info("creating LogicalCluster")
_, err = logicalClusterAdminClient.Cluster(cluster).CoreV1alpha1().LogicalClusters().Create(ctx, logicalCluster, metav1.CreateOptions{})

if apierrors.IsAlreadyExists(err) {
Expand Down Expand Up @@ -335,6 +336,7 @@ func (r *schedulingReconciler) updateLogicalClusterPhase(ctx context.Context, sh
return err
}
logicalCluster.Status.Phase = phase
logging.WithObject(klog.FromContext(ctx), logicalCluster).WithValues("phase", phase).Info("updating LogicalCluster phase")
_, err = logicalClusterAdminClient.Cluster(cluster).CoreV1alpha1().LogicalClusters().UpdateStatus(ctx, logicalCluster, metav1.UpdateOptions{})
return err
}
Expand Down

0 comments on commit 583d1c8

Please sign in to comment.