refact(deps): bump k8s and client-go deps to version v0.20.2 (#294)

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
This commit is contained in:
Prateek Pandey 2021-03-31 16:43:42 +05:30 committed by GitHub
parent 533e17a9aa
commit b1aa6ab51a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2196 changed files with 306727 additions and 251810 deletions

View file

@ -16,6 +16,7 @@ package pod
import (
"bytes"
"context"
"encoding/json"
"github.com/openebs/lib-csi/pkg/common/errors"
@ -182,31 +183,31 @@ func (k *KubeClient) withDefaults() {
if k.create == nil {
k.create = func(cli *clientset.Clientset,
namespace string, pod *corev1.Pod) (*corev1.Pod, error) {
return cli.CoreV1().Pods(namespace).Create(pod)
return cli.CoreV1().Pods(namespace).Create(context.TODO(), pod, metav1.CreateOptions{})
}
}
if k.list == nil {
k.list = func(cli *clientset.Clientset,
namespace string, opts metav1.ListOptions) (*corev1.PodList, error) {
return cli.CoreV1().Pods(namespace).List(opts)
return cli.CoreV1().Pods(namespace).List(context.TODO(), opts)
}
}
if k.del == nil {
k.del = func(cli *clientset.Clientset, namespace,
name string, opts *metav1.DeleteOptions) error {
return cli.CoreV1().Pods(namespace).Delete(name, opts)
return cli.CoreV1().Pods(namespace).Delete(context.TODO(), name, *opts)
}
}
if k.get == nil {
k.get = func(cli *clientset.Clientset, namespace,
name string, opts metav1.GetOptions) (*corev1.Pod, error) {
return cli.CoreV1().Pods(namespace).Get(name, opts)
return cli.CoreV1().Pods(namespace).Get(context.TODO(), name, opts)
}
}
if k.delCollection == nil {
k.delCollection = func(cli *clientset.Clientset, namespace string,
listOpts metav1.ListOptions, deleteOpts *metav1.DeleteOptions) error {
return cli.CoreV1().Pods(namespace).DeleteCollection(deleteOpts, listOpts)
return cli.CoreV1().Pods(namespace).DeleteCollection(context.TODO(), *deleteOpts, listOpts)
}
}
if k.exec == nil {