mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20: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
|
|
@ -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{})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue