@@ -246,7 +246,7 @@ var _ = SIGDescribe("DisruptionController", func() {
246
246
}
247
247
248
248
if c .shouldDeny {
249
- err = cs .CoreV1 ().Pods (ns ).Evict (e )
249
+ err = cs .CoreV1 ().Pods (ns ).Evict (context . TODO (), e )
250
250
gomega .Expect (err ).Should (gomega .MatchError ("Cannot evict pod as it would violate the pod's disruption budget." ))
251
251
} else {
252
252
// Only wait for running pods in the "allow" case
@@ -257,7 +257,7 @@ var _ = SIGDescribe("DisruptionController", func() {
257
257
// Since disruptionAllowed starts out false, if an eviction is ever allowed,
258
258
// that means the controller is working.
259
259
err = wait .PollImmediate (framework .Poll , timeout , func () (bool , error ) {
260
- err = cs .CoreV1 ().Pods (ns ).Evict (e )
260
+ err = cs .CoreV1 ().Pods (ns ).Evict (context . TODO (), e )
261
261
if err != nil {
262
262
return false , nil
263
263
}
@@ -284,7 +284,7 @@ var _ = SIGDescribe("DisruptionController", func() {
284
284
Namespace : ns ,
285
285
},
286
286
}
287
- err = cs .CoreV1 ().Pods (ns ).Evict (e )
287
+ err = cs .CoreV1 ().Pods (ns ).Evict (context . TODO (), e )
288
288
gomega .Expect (err ).Should (gomega .MatchError ("Cannot evict pod as it would violate the pod's disruption budget." ))
289
289
290
290
ginkgo .By ("Updating the pdb to allow a pod to be evicted" )
@@ -297,7 +297,7 @@ var _ = SIGDescribe("DisruptionController", func() {
297
297
ginkgo .By ("Trying to evict the same pod we tried earlier which should now be evictable" )
298
298
waitForPodsOrDie (cs , ns , 3 )
299
299
waitForPdbToObserveHealthyPods (cs , ns , 3 )
300
- err = cs .CoreV1 ().Pods (ns ).Evict (e )
300
+ err = cs .CoreV1 ().Pods (ns ).Evict (context . TODO (), e )
301
301
framework .ExpectNoError (err ) // the eviction is now allowed
302
302
303
303
ginkgo .By ("Patching the pdb to disallow a pod to be evicted" )
@@ -319,15 +319,15 @@ var _ = SIGDescribe("DisruptionController", func() {
319
319
Namespace : ns ,
320
320
},
321
321
}
322
- err = cs .CoreV1 ().Pods (ns ).Evict (e )
322
+ err = cs .CoreV1 ().Pods (ns ).Evict (context . TODO (), e )
323
323
gomega .Expect (err ).Should (gomega .MatchError ("Cannot evict pod as it would violate the pod's disruption budget." ))
324
324
325
325
ginkgo .By ("Deleting the pdb to allow a pod to be evicted" )
326
326
deletePDBOrDie (cs , ns , defaultName )
327
327
328
328
ginkgo .By ("Trying to evict the same pod we tried earlier which should now be evictable" )
329
329
waitForPodsOrDie (cs , ns , 3 )
330
- err = cs .CoreV1 ().Pods (ns ).Evict (e )
330
+ err = cs .CoreV1 ().Pods (ns ).Evict (context . TODO (), e )
331
331
framework .ExpectNoError (err ) // the eviction is now allowed
332
332
})
333
333
0 commit comments