From 59cbea5e25e62131bd3a6650956ceb87038db3b2 Mon Sep 17 00:00:00 2001 From: Christian Kotzbauer Date: Mon, 14 Aug 2023 19:08:44 +0200 Subject: [PATCH] feat: add another background Signed-off-by: Christian Kotzbauer --- pkg/daemonsetlock/daemonsetlock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/daemonsetlock/daemonsetlock.go b/pkg/daemonsetlock/daemonsetlock.go index fa189ad..b9bbf52 100644 --- a/pkg/daemonsetlock/daemonsetlock.go +++ b/pkg/daemonsetlock/daemonsetlock.go @@ -294,7 +294,7 @@ func (dsl *DaemonSetLock) ReleaseMultiple() error { } 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 se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict { // Something else updated the resource between us reading and writing - try again soon