mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-11 22:10:11 +01:00
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:
parent
533e17a9aa
commit
b1aa6ab51a
2196 changed files with 306727 additions and 251810 deletions
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
package deploy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
|
|
@ -112,7 +113,7 @@ func defaultGet(
|
|||
opts *metav1.GetOptions,
|
||||
) (*appsv1.Deployment, error) {
|
||||
|
||||
return cli.AppsV1().Deployments(namespace).Get(name, *opts)
|
||||
return cli.AppsV1().Deployments(namespace).Get(context.TODO(), name, *opts)
|
||||
}
|
||||
|
||||
// defaultList is the default implementation to list
|
||||
|
|
@ -123,7 +124,7 @@ func defaultList(
|
|||
opts *metav1.ListOptions,
|
||||
) (*appsv1.DeploymentList, error) {
|
||||
|
||||
return cli.AppsV1().Deployments(namespace).List(*opts)
|
||||
return cli.AppsV1().Deployments(namespace).List(context.TODO(), *opts)
|
||||
}
|
||||
|
||||
// defaultCreate is the default implementation to create
|
||||
|
|
@ -134,7 +135,7 @@ func defaultCreate(
|
|||
deploy *appsv1.Deployment,
|
||||
) (*appsv1.Deployment, error) {
|
||||
|
||||
return cli.AppsV1().Deployments(namespace).Create(deploy)
|
||||
return cli.AppsV1().Deployments(namespace).Create(context.TODO(), deploy, metav1.CreateOptions{})
|
||||
}
|
||||
|
||||
// defaultDel is the default implementation to delete a
|
||||
|
|
@ -146,7 +147,7 @@ func defaultDel(
|
|||
opts *metav1.DeleteOptions,
|
||||
) error {
|
||||
|
||||
return cli.AppsV1().Deployments(namespace).Delete(name, opts)
|
||||
return cli.AppsV1().Deployments(namespace).Delete(context.TODO(), name, *opts)
|
||||
}
|
||||
|
||||
func defaultPatch(
|
||||
|
|
@ -156,7 +157,7 @@ func defaultPatch(
|
|||
data []byte,
|
||||
subresources ...string,
|
||||
) (*appsv1.Deployment, error) {
|
||||
return cli.AppsV1().Deployments(namespace).Patch(name, pt, data, subresources...)
|
||||
return cli.AppsV1().Deployments(namespace).Patch(context.TODO(), name, pt, data, metav1.PatchOptions{}, subresources...)
|
||||
}
|
||||
|
||||
// defaultRolloutStatus is the default implementation to
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
package pvc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/openebs/lib-csi/pkg/common/errors"
|
||||
|
|
@ -104,37 +105,37 @@ func (k *Kubeclient) withDefaults() {
|
|||
|
||||
if k.get == nil {
|
||||
k.get = func(cli *kubernetes.Clientset, name string, namespace string, opts metav1.GetOptions) (*corev1.PersistentVolumeClaim, error) {
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Get(name, opts)
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Get(context.TODO(), name, opts)
|
||||
}
|
||||
}
|
||||
|
||||
if k.list == nil {
|
||||
k.list = func(cli *kubernetes.Clientset, namespace string, opts metav1.ListOptions) (*corev1.PersistentVolumeClaimList, error) {
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).List(opts)
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).List(context.TODO(), opts)
|
||||
}
|
||||
}
|
||||
|
||||
if k.del == nil {
|
||||
k.del = func(cli *kubernetes.Clientset, namespace string, name string, deleteOpts *metav1.DeleteOptions) error {
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Delete(name, deleteOpts)
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Delete(context.TODO(), name, *deleteOpts)
|
||||
}
|
||||
}
|
||||
|
||||
if k.delCollection == nil {
|
||||
k.delCollection = func(cli *kubernetes.Clientset, namespace string, listOpts metav1.ListOptions, deleteOpts *metav1.DeleteOptions) error {
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).DeleteCollection(deleteOpts, listOpts)
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).DeleteCollection(context.TODO(), *deleteOpts, listOpts)
|
||||
}
|
||||
}
|
||||
|
||||
if k.create == nil {
|
||||
k.create = func(cli *kubernetes.Clientset, namespace string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) {
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Create(pvc)
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Create(context.TODO(), pvc, metav1.CreateOptions{})
|
||||
}
|
||||
}
|
||||
|
||||
if k.update == nil {
|
||||
k.update = func(cli *kubernetes.Clientset, namespace string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) {
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Update(pvc)
|
||||
return cli.CoreV1().PersistentVolumeClaims(namespace).Update(context.TODO(), pvc, metav1.UpdateOptions{})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
package sc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/openebs/lib-csi/pkg/common/errors"
|
||||
client "github.com/openebs/lib-csi/pkg/common/kubernetes/client"
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
|
|
@ -84,22 +86,22 @@ func (k *Kubeclient) withDefaults() {
|
|||
}
|
||||
if k.list == nil {
|
||||
k.list = func(cli *kubernetes.Clientset, opts metav1.ListOptions) (*storagev1.StorageClassList, error) {
|
||||
return cli.StorageV1().StorageClasses().List(opts)
|
||||
return cli.StorageV1().StorageClasses().List(context.TODO(), opts)
|
||||
}
|
||||
}
|
||||
if k.get == nil {
|
||||
k.get = func(cli *kubernetes.Clientset, name string, opts metav1.GetOptions) (*storagev1.StorageClass, error) {
|
||||
return cli.StorageV1().StorageClasses().Get(name, opts)
|
||||
return cli.StorageV1().StorageClasses().Get(context.TODO(), name, opts)
|
||||
}
|
||||
}
|
||||
if k.create == nil {
|
||||
k.create = func(cli *kubernetes.Clientset, sc *storagev1.StorageClass) (*storagev1.StorageClass, error) {
|
||||
return cli.StorageV1().StorageClasses().Create(sc)
|
||||
return cli.StorageV1().StorageClasses().Create(context.TODO(), sc, metav1.CreateOptions{})
|
||||
}
|
||||
}
|
||||
if k.del == nil {
|
||||
k.del = func(cli *kubernetes.Clientset, name string, opts *metav1.DeleteOptions) error {
|
||||
return cli.StorageV1().StorageClasses().Delete(name, opts)
|
||||
return cli.StorageV1().StorageClasses().Delete(context.TODO(), name, *opts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue