Do patch runner status instead of update to reduce conflicts and avoid future bugs

Ref https://github.com/summerwind/actions-runner-controller/pull/398#issuecomment-801548375
This commit is contained in:
Yusuke Kuoka 2021-03-18 10:31:17 +09:00
parent 7a7086e7aa
commit 3cccca8d09
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ func (r *RunnerReconciler) updateRegistrationToken(ctx context.Context, runner v
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
}
if err := r.Status().Update(ctx, updated); err != nil {
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
log.Error(err, "Failed to update runner status for Registration")
return false, err
}