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

@ -15,6 +15,7 @@
package bkpbuilder
import (
"context"
"encoding/json"
client "github.com/openebs/lib-csi/pkg/common/kubernetes/client"
@ -142,7 +143,7 @@ func defaultGet(
) (*apis.ZFSBackup, error) {
return cli.ZfsV1().
ZFSBackups(namespace).
Get(name, opts)
Get(context.TODO(), name, opts)
}
// defaultList is the default implementation to list
@ -154,7 +155,7 @@ func defaultList(
) (*apis.ZFSBackupList, error) {
return cli.ZfsV1().
ZFSBackups(namespace).
List(opts)
List(context.TODO(), opts)
}
// defaultCreate is the default implementation to delete
@ -168,7 +169,7 @@ func defaultDel(
opts.PropagationPolicy = &deletePropagation
err := cli.ZfsV1().
ZFSBackups(namespace).
Delete(name, opts)
Delete(context.TODO(), name, *opts)
return err
}
@ -181,7 +182,7 @@ func defaultCreate(
) (*apis.ZFSBackup, error) {
return cli.ZfsV1().
ZFSBackups(namespace).
Create(bkp)
Create(context.TODO(), bkp, metav1.CreateOptions{})
}
// defaultUpdate is the default implementation to update
@ -193,7 +194,7 @@ func defaultUpdate(
) (*apis.ZFSBackup, error) {
return cli.ZfsV1().
ZFSBackups(namespace).
Update(bkp)
Update(context.TODO(), bkp, metav1.UpdateOptions{})
}
// withDefaults sets the default options

View file

@ -15,6 +15,7 @@
package restorebuilder
import (
"context"
"encoding/json"
client "github.com/openebs/lib-csi/pkg/common/kubernetes/client"
@ -142,7 +143,7 @@ func defaultGet(
) (*apis.ZFSRestore, error) {
return cli.ZfsV1().
ZFSRestores(namespace).
Get(name, opts)
Get(context.TODO(), name, opts)
}
// defaultList is the default implementation to list
@ -154,7 +155,7 @@ func defaultList(
) (*apis.ZFSRestoreList, error) {
return cli.ZfsV1().
ZFSRestores(namespace).
List(opts)
List(context.TODO(), opts)
}
// defaultCreate is the default implementation to delete
@ -168,7 +169,7 @@ func defaultDel(
opts.PropagationPolicy = &deletePropagation
err := cli.ZfsV1().
ZFSRestores(namespace).
Delete(name, opts)
Delete(context.TODO(), name, *opts)
return err
}
@ -181,7 +182,7 @@ func defaultCreate(
) (*apis.ZFSRestore, error) {
return cli.ZfsV1().
ZFSRestores(namespace).
Create(rstr)
Create(context.TODO(), rstr, metav1.CreateOptions{})
}
// defaultUpdate is the default implementation to update
@ -193,7 +194,7 @@ func defaultUpdate(
) (*apis.ZFSRestore, error) {
return cli.ZfsV1().
ZFSRestores(namespace).
Update(rstr)
Update(context.TODO(), rstr, metav1.UpdateOptions{})
}
// withDefaults sets the default options

View file

@ -15,6 +15,7 @@
package snapbuilder
import (
"context"
"encoding/json"
client "github.com/openebs/lib-csi/pkg/common/kubernetes/client"
@ -142,7 +143,7 @@ func defaultGet(
) (*apis.ZFSSnapshot, error) {
return cli.ZfsV1().
ZFSSnapshots(namespace).
Get(name, opts)
Get(context.TODO(), name, opts)
}
// defaultList is the default implementation to list
@ -154,7 +155,7 @@ func defaultList(
) (*apis.ZFSSnapshotList, error) {
return cli.ZfsV1().
ZFSSnapshots(namespace).
List(opts)
List(context.TODO(), opts)
}
// defaultCreate is the default implementation to delete
@ -168,7 +169,7 @@ func defaultDel(
opts.PropagationPolicy = &deletePropagation
err := cli.ZfsV1().
ZFSSnapshots(namespace).
Delete(name, opts)
Delete(context.TODO(), name, *opts)
return err
}
@ -181,7 +182,7 @@ func defaultCreate(
) (*apis.ZFSSnapshot, error) {
return cli.ZfsV1().
ZFSSnapshots(namespace).
Create(vol)
Create(context.TODO(), vol, metav1.CreateOptions{})
}
// defaultUpdate is the default implementation to update
@ -193,7 +194,7 @@ func defaultUpdate(
) (*apis.ZFSSnapshot, error) {
return cli.ZfsV1().
ZFSSnapshots(namespace).
Update(vol)
Update(context.TODO(), vol, metav1.UpdateOptions{})
}
// withDefaults sets the default options

View file

@ -15,6 +15,7 @@
package volbuilder
import (
"context"
"encoding/json"
client "github.com/openebs/lib-csi/pkg/common/kubernetes/client"
@ -142,7 +143,7 @@ func defaultGet(
) (*apis.ZFSVolume, error) {
return cli.ZfsV1().
ZFSVolumes(namespace).
Get(name, opts)
Get(context.TODO(), name, opts)
}
// defaultList is the default implementation to list
@ -154,7 +155,7 @@ func defaultList(
) (*apis.ZFSVolumeList, error) {
return cli.ZfsV1().
ZFSVolumes(namespace).
List(opts)
List(context.TODO(), opts)
}
// defaultCreate is the default implementation to delete
@ -168,7 +169,7 @@ func defaultDel(
opts.PropagationPolicy = &deletePropagation
err := cli.ZfsV1().
ZFSVolumes(namespace).
Delete(name, opts)
Delete(context.TODO(), name, *opts)
return err
}
@ -181,7 +182,7 @@ func defaultCreate(
) (*apis.ZFSVolume, error) {
return cli.ZfsV1().
ZFSVolumes(namespace).
Create(vol)
Create(context.TODO(), vol, metav1.CreateOptions{})
}
// defaultUpdate is the default implementation to update
@ -193,7 +194,7 @@ func defaultUpdate(
) (*apis.ZFSVolume, error) {
return cli.ZfsV1().
ZFSVolumes(namespace).
Update(vol)
Update(context.TODO(), vol, metav1.UpdateOptions{})
}
// withDefaults sets the default options