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

@ -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)
}