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:
		
							parent
							
								
									7a7086e7aa
								
							
						
					
					
						commit
						3cccca8d09
					
				|  | @ -463,7 +463,7 @@ func (r *RunnerReconciler) updateRegistrationToken(ctx context.Context, runner v | ||||||
| 		ExpiresAt:    metav1.NewTime(rt.GetExpiresAt().Time), | 		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") | 		log.Error(err, "Failed to update runner status for Registration") | ||||||
| 		return false, err | 		return false, err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue