Skip to content

Commit

Permalink
Merge pull request #5045 from XiShanYongYe-Chang/automated-cherry-pic…
Browse files Browse the repository at this point in the history
…k-of-#5030-upstream-release-1.9

Automated cherry pick of #5030: fix-remedy-e2e-errors
  • Loading branch information
karmada-bot authored Jun 13, 2024
2 parents 8ef8d37 + ce75e5a commit 303ee1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/remediation/remedy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (c *RemedyController) Reconcile(ctx context.Context, req controllerruntime.
klog.Errorf("Failed to sync cluster(%s) remedy actions: %v", cluster.Name, err)
return controllerruntime.Result{}, err
}
klog.V(4).Infof("Success to sync cluster(%s) remedy actions", cluster.Name)
klog.V(4).Infof("Success to sync cluster(%s) remedy actions: %v", cluster.Name, actions)
return controllerruntime.Result{}, nil
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/controllers/status/cluster_status_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ func (c *ClusterStatusController) updateStatusIfNeeded(cluster *clusterv1alpha1.
if !equality.Semantic.DeepEqual(cluster.Status, currentClusterStatus) {
klog.V(4).Infof("Start to update cluster status: %s", cluster.Name)
err := retry.RetryOnConflict(retry.DefaultRetry, func() (err error) {
cluster.Status = currentClusterStatus
cluster.Status.KubernetesVersion = currentClusterStatus.KubernetesVersion
cluster.Status.APIEnablements = currentClusterStatus.APIEnablements
cluster.Status.Conditions = currentClusterStatus.Conditions
cluster.Status.NodeSummary = currentClusterStatus.NodeSummary
cluster.Status.ResourceSummary = currentClusterStatus.ResourceSummary
updateErr := c.Status().Update(context.TODO(), cluster)
if updateErr == nil {
return nil
Expand Down

0 comments on commit 303ee1e

Please sign in to comment.