mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-13 23:03:57 +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
3
vendor/github.com/openebs/lib-csi/pkg/client/k8s/configmap.go
generated
vendored
3
vendor/github.com/openebs/lib-csi/pkg/client/k8s/configmap.go
generated
vendored
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
package k8s
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
|
@ -50,5 +51,5 @@ func (c *Configmap) Get(options metav1.GetOptions) (cm *corev1.ConfigMap, err er
|
|||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get config map %s %s", c.namespace, c.name)
|
||||
}
|
||||
return cs.CoreV1().ConfigMaps(c.namespace).Get(c.name, options)
|
||||
return cs.CoreV1().ConfigMaps(c.namespace).Get(context.TODO(), c.name, options)
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/openebs/lib-csi/pkg/client/k8s/namespace.go
generated
vendored
6
vendor/github.com/openebs/lib-csi/pkg/client/k8s/namespace.go
generated
vendored
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
package k8s
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -46,7 +48,7 @@ func (ns *NamespaceStruct) Get(name string, options metav1.GetOptions) (*corev1.
|
|||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get namespace: %s", name)
|
||||
}
|
||||
return cs.CoreV1().Namespaces().Get(name, options)
|
||||
return cs.CoreV1().Namespaces().Get(context.TODO(), name, options)
|
||||
}
|
||||
|
||||
// List returns a slice of namespaces defined in a Kubernetes cluster
|
||||
|
|
@ -55,5 +57,5 @@ func (ns *NamespaceStruct) List(options metav1.ListOptions) (*corev1.NamespaceLi
|
|||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get namespaces")
|
||||
}
|
||||
return cs.CoreV1().Namespaces().List(options)
|
||||
return cs.CoreV1().Namespaces().List(context.TODO(), options)
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/openebs/lib-csi/pkg/client/k8s/node.go
generated
vendored
6
vendor/github.com/openebs/lib-csi/pkg/client/k8s/node.go
generated
vendored
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
package k8s
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -46,7 +48,7 @@ func (n *NodeStruct) Get(name string, options metav1.GetOptions) (*corev1.Node,
|
|||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get node: %s", name)
|
||||
}
|
||||
return cs.CoreV1().Nodes().Get(name, options)
|
||||
return cs.CoreV1().Nodes().Get(context.TODO(), name, options)
|
||||
}
|
||||
|
||||
// List returns a slice of Nodes registered in a Kubernetes cluster
|
||||
|
|
@ -55,7 +57,7 @@ func (n *NodeStruct) List(options metav1.ListOptions) (*corev1.NodeList, error)
|
|||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to get nodes")
|
||||
}
|
||||
return cs.CoreV1().Nodes().List(options)
|
||||
return cs.CoreV1().Nodes().List(context.TODO(), options)
|
||||
}
|
||||
|
||||
// NumberOfNodes returns the number of nodes registered in a Kubernetes cluster
|
||||
|
|
|
|||
11
vendor/github.com/openebs/lib-csi/pkg/client/k8s/resource.go
generated
vendored
11
vendor/github.com/openebs/lib-csi/pkg/client/k8s/resource.go
generated
vendored
|
|
@ -20,6 +20,7 @@ limitations under the License.
|
|||
package k8s
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
|
|
@ -93,7 +94,7 @@ func (r *ResourceStruct) Create(obj *unstructured.Unstructured, subresources ...
|
|||
err = errors.Wrapf(err, "failed to create resource '%s' '%s' at '%s'", r.gvr, obj.GetName(), r.namespace)
|
||||
return
|
||||
}
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).Create(obj, metav1.CreateOptions{}, subresources...)
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).Create(context.TODO(), obj, metav1.CreateOptions{}, subresources...)
|
||||
if err != nil {
|
||||
err = errors.Wrapf(err, "failed to create resource '%s' '%s' at '%s'", r.gvr, obj.GetName(), r.namespace)
|
||||
return
|
||||
|
|
@ -110,7 +111,7 @@ func (r *ResourceStruct) Delete(obj *unstructured.Unstructured, subresources ...
|
|||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to delete resource '%s' '%s' at '%s'", r.gvr, obj.GetName(), r.namespace)
|
||||
}
|
||||
err = dynamic.Resource(r.gvr).Namespace(r.namespace).Delete(obj.GetName(), &metav1.DeleteOptions{})
|
||||
err = dynamic.Resource(r.gvr).Namespace(r.namespace).Delete(context.TODO(), obj.GetName(), metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to delete resource '%s' '%s' at '%s'", r.gvr, obj.GetName(), r.namespace)
|
||||
}
|
||||
|
|
@ -128,7 +129,7 @@ func (r *ResourceStruct) Get(name string, opts metav1.GetOptions, subresources .
|
|||
err = errors.Wrapf(err, "failed to get resource '%s' '%s' at '%s'", r.gvr, name, r.namespace)
|
||||
return
|
||||
}
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).Get(name, opts, subresources...)
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).Get(context.TODO(), name, opts, subresources...)
|
||||
if err != nil {
|
||||
err = errors.Wrapf(err, "failed to get resource '%s' '%s' at '%s'", r.gvr, name, r.namespace)
|
||||
return
|
||||
|
|
@ -155,7 +156,7 @@ func (r *ResourceStruct) Update(oldobj, newobj *unstructured.Unstructured, subre
|
|||
resourceVersion := oldobj.GetResourceVersion()
|
||||
newobj.SetResourceVersion(resourceVersion)
|
||||
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).Update(newobj, metav1.UpdateOptions{}, subresources...)
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).Update(context.TODO(), newobj, metav1.UpdateOptions{}, subresources...)
|
||||
if err != nil {
|
||||
err = errors.Wrapf(err, "failed to update resource '%s' '%s' at '%s'", r.gvr, oldobj.GetName(), r.namespace)
|
||||
return
|
||||
|
|
@ -170,7 +171,7 @@ func (r *ResourceStruct) List(opts metav1.ListOptions) (u *unstructured.Unstruct
|
|||
err = errors.Wrapf(err, "failed to list resource '%s' at '%s'", r.gvr, r.namespace)
|
||||
return
|
||||
}
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).List(opts)
|
||||
u, err = dynamic.Resource(r.gvr).Namespace(r.namespace).List(context.TODO(), opts)
|
||||
if err != nil {
|
||||
err = errors.Wrapf(err, "failed to list resource '%s' at '%s'", r.gvr, r.namespace)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue