Update eviction api call to work with new k8s packages
package workloadupdater
import (
+ "context"
"fmt"
"math"
"math/rand"
@@ -535,7 +536,8 @@ func (c *WorkloadUpdateController) sync(kv *virtv1.KubeVirt) error {
errChan <- err
}
- err = c.clientset.CoreV1().Pods(vmi.Namespace).Evict(&policy.Eviction{
+ err = c.clientset.CoreV1().Pods(vmi.Namespace).Evict(context.Background(),
+ &policy.Eviction{
ObjectMeta: metav1.ObjectMeta{
Name: pod.Name,
Namespace: pod.Namespace,
