feat: add another background

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
This commit is contained in:
Christian Kotzbauer
2023-08-14 19:08:44 +02:00
parent 776c35c1e1
commit 59cbea5e25

View File

@@ -294,7 +294,7 @@ func (dsl *DaemonSetLock) ReleaseMultiple() error {
} }
ds.ObjectMeta.Annotations[dsl.annotation] = string(newAnnotationBytes) ds.ObjectMeta.Annotations[dsl.annotation] = string(newAnnotationBytes)
_, err = dsl.client.AppsV1().DaemonSets(dsl.namespace).Update(context.TODO(), ds, metav1.UpdateOptions{}) _, err = dsl.client.AppsV1().DaemonSets(dsl.namespace).Update(context.Background(), ds, metav1.UpdateOptions{})
if err != nil { if err != nil {
if se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict { if se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict {
// Something else updated the resource between us reading and writing - try again soon // Something else updated the resource between us reading and writing - try again soon