From 60a0346672170c8e9f65795fb33e41527980c583 Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Fri, 7 Feb 2020 18:16:47 -0800 Subject: [PATCH] generated: run refactor Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894 --- examples/create-update-delete-deployment/main.go | 11 ++++++----- examples/fake-client/main_test.go | 2 +- examples/in-cluster-client-configuration/main.go | 5 +++-- examples/out-of-cluster-client-configuration/main.go | 5 +++-- .../v1/mutatingwebhookconfiguration.go | 5 +++-- .../v1/validatingwebhookconfiguration.go | 5 +++-- .../v1beta1/mutatingwebhookconfiguration.go | 5 +++-- .../v1beta1/validatingwebhookconfiguration.go | 5 +++-- informers/apps/v1/controllerrevision.go | 5 +++-- informers/apps/v1/daemonset.go | 5 +++-- informers/apps/v1/deployment.go | 5 +++-- informers/apps/v1/replicaset.go | 5 +++-- informers/apps/v1/statefulset.go | 5 +++-- informers/apps/v1beta1/controllerrevision.go | 5 +++-- informers/apps/v1beta1/deployment.go | 5 +++-- informers/apps/v1beta1/statefulset.go | 5 +++-- informers/apps/v1beta2/controllerrevision.go | 5 +++-- informers/apps/v1beta2/daemonset.go | 5 +++-- informers/apps/v1beta2/deployment.go | 5 +++-- informers/apps/v1beta2/replicaset.go | 5 +++-- informers/apps/v1beta2/statefulset.go | 5 +++-- informers/auditregistration/v1alpha1/auditsink.go | 5 +++-- informers/autoscaling/v1/horizontalpodautoscaler.go | 5 +++-- .../autoscaling/v2beta1/horizontalpodautoscaler.go | 5 +++-- .../autoscaling/v2beta2/horizontalpodautoscaler.go | 5 +++-- informers/batch/v1/job.go | 5 +++-- informers/batch/v1beta1/cronjob.go | 5 +++-- informers/batch/v2alpha1/cronjob.go | 5 +++-- .../certificates/v1beta1/certificatesigningrequest.go | 5 +++-- informers/coordination/v1/lease.go | 5 +++-- informers/coordination/v1beta1/lease.go | 5 +++-- informers/core/v1/componentstatus.go | 5 +++-- informers/core/v1/configmap.go | 5 +++-- informers/core/v1/endpoints.go | 5 +++-- informers/core/v1/event.go | 5 +++-- informers/core/v1/limitrange.go | 5 +++-- informers/core/v1/namespace.go | 5 +++-- informers/core/v1/node.go | 5 +++-- informers/core/v1/persistentvolume.go | 5 +++-- informers/core/v1/persistentvolumeclaim.go | 5 +++-- informers/core/v1/pod.go | 5 +++-- informers/core/v1/podtemplate.go | 5 +++-- informers/core/v1/replicationcontroller.go | 5 +++-- informers/core/v1/resourcequota.go | 5 +++-- informers/core/v1/secret.go | 5 +++-- informers/core/v1/service.go | 5 +++-- informers/core/v1/serviceaccount.go | 5 +++-- informers/discovery/v1alpha1/endpointslice.go | 5 +++-- informers/discovery/v1beta1/endpointslice.go | 5 +++-- informers/events/v1beta1/event.go | 5 +++-- informers/extensions/v1beta1/daemonset.go | 5 +++-- informers/extensions/v1beta1/deployment.go | 5 +++-- informers/extensions/v1beta1/ingress.go | 5 +++-- informers/extensions/v1beta1/networkpolicy.go | 5 +++-- informers/extensions/v1beta1/podsecuritypolicy.go | 5 +++-- informers/extensions/v1beta1/replicaset.go | 5 +++-- informers/flowcontrol/v1alpha1/flowschema.go | 5 +++-- .../v1alpha1/prioritylevelconfiguration.go | 5 +++-- informers/networking/v1/networkpolicy.go | 5 +++-- informers/networking/v1beta1/ingress.go | 5 +++-- informers/node/v1alpha1/runtimeclass.go | 5 +++-- informers/node/v1beta1/runtimeclass.go | 5 +++-- informers/policy/v1beta1/poddisruptionbudget.go | 5 +++-- informers/policy/v1beta1/podsecuritypolicy.go | 5 +++-- informers/rbac/v1/clusterrole.go | 5 +++-- informers/rbac/v1/clusterrolebinding.go | 5 +++-- informers/rbac/v1/role.go | 5 +++-- informers/rbac/v1/rolebinding.go | 5 +++-- informers/rbac/v1alpha1/clusterrole.go | 5 +++-- informers/rbac/v1alpha1/clusterrolebinding.go | 5 +++-- informers/rbac/v1alpha1/role.go | 5 +++-- informers/rbac/v1alpha1/rolebinding.go | 5 +++-- informers/rbac/v1beta1/clusterrole.go | 5 +++-- informers/rbac/v1beta1/clusterrolebinding.go | 5 +++-- informers/rbac/v1beta1/role.go | 5 +++-- informers/rbac/v1beta1/rolebinding.go | 5 +++-- informers/scheduling/v1/priorityclass.go | 5 +++-- informers/scheduling/v1alpha1/priorityclass.go | 5 +++-- informers/scheduling/v1beta1/priorityclass.go | 5 +++-- informers/settings/v1alpha1/podpreset.go | 5 +++-- informers/storage/v1/csinode.go | 5 +++-- informers/storage/v1/storageclass.go | 5 +++-- informers/storage/v1/volumeattachment.go | 5 +++-- informers/storage/v1alpha1/volumeattachment.go | 5 +++-- informers/storage/v1beta1/csidriver.go | 5 +++-- informers/storage/v1beta1/csinode.go | 5 +++-- informers/storage/v1beta1/storageclass.go | 5 +++-- informers/storage/v1beta1/volumeattachment.go | 5 +++-- kubernetes_test/timeout_test.go | 5 +++-- tools/leaderelection/resourcelock/configmaplock.go | 7 ++++--- tools/leaderelection/resourcelock/endpointslock.go | 7 ++++--- tools/leaderelection/resourcelock/leaselock.go | 7 ++++--- tools/watch/informerwatcher_test.go | 4 ++-- tools/watch/until_test.go | 8 ++++---- util/certificate/csr/csr.go | 8 ++++---- 95 files changed, 290 insertions(+), 199 deletions(-) diff --git a/examples/create-update-delete-deployment/main.go b/examples/create-update-delete-deployment/main.go index 32aadb7d..9d005d82 100644 --- a/examples/create-update-delete-deployment/main.go +++ b/examples/create-update-delete-deployment/main.go @@ -19,6 +19,7 @@ package main import ( "bufio" + "context" "flag" "fmt" "os" @@ -100,7 +101,7 @@ func main() { // Create Deployment fmt.Println("Creating deployment...") - result, err := deploymentsClient.Create(deployment) + result, err := deploymentsClient.Create(context.TODO(), deployment) if err != nil { panic(err) } @@ -125,14 +126,14 @@ func main() { retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { // Retrieve the latest version of Deployment before attempting update // RetryOnConflict uses exponential backoff to avoid exhausting the apiserver - result, getErr := deploymentsClient.Get("demo-deployment", metav1.GetOptions{}) + result, getErr := deploymentsClient.Get(context.TODO(), "demo-deployment", metav1.GetOptions{}) if getErr != nil { panic(fmt.Errorf("Failed to get latest version of Deployment: %v", getErr)) } result.Spec.Replicas = int32Ptr(1) // reduce replica count result.Spec.Template.Spec.Containers[0].Image = "nginx:1.13" // change nginx version - _, updateErr := deploymentsClient.Update(result) + _, updateErr := deploymentsClient.Update(context.TODO(), result) return updateErr }) if retryErr != nil { @@ -143,7 +144,7 @@ func main() { // List Deployments prompt() fmt.Printf("Listing deployments in namespace %q:\n", apiv1.NamespaceDefault) - list, err := deploymentsClient.List(metav1.ListOptions{}) + list, err := deploymentsClient.List(context.TODO(), metav1.ListOptions{}) if err != nil { panic(err) } @@ -155,7 +156,7 @@ func main() { prompt() fmt.Println("Deleting deployment...") deletePolicy := metav1.DeletePropagationForeground - if err := deploymentsClient.Delete("demo-deployment", &metav1.DeleteOptions{ + if err := deploymentsClient.Delete(context.TODO(), "demo-deployment", &metav1.DeleteOptions{ PropagationPolicy: &deletePolicy, }); err != nil { panic(err) diff --git a/examples/fake-client/main_test.go b/examples/fake-client/main_test.go index f478a013..f523279e 100644 --- a/examples/fake-client/main_test.go +++ b/examples/fake-client/main_test.go @@ -59,7 +59,7 @@ func TestFakeClient(t *testing.T) { // Inject an event into the fake client. p := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "my-pod"}} - _, err := client.CoreV1().Pods("test-ns").Create(p) + _, err := client.CoreV1().Pods("test-ns").Create(context.TODO(), p) if err != nil { t.Fatalf("error injecting pod add: %v", err) } diff --git a/examples/in-cluster-client-configuration/main.go b/examples/in-cluster-client-configuration/main.go index 80c80cfb..a8c71612 100644 --- a/examples/in-cluster-client-configuration/main.go +++ b/examples/in-cluster-client-configuration/main.go @@ -18,6 +18,7 @@ limitations under the License. package main import ( + "context" "fmt" "time" @@ -50,7 +51,7 @@ func main() { for { // get pods in all the namespaces by omitting namespace // Or specify namespace to get pods in particular namespace - pods, err := clientset.CoreV1().Pods("").List(metav1.ListOptions{}) + pods, err := clientset.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{}) if err != nil { panic(err.Error()) } @@ -59,7 +60,7 @@ func main() { // Examples for error handling: // - Use helper functions e.g. errors.IsNotFound() // - And/or cast to StatusError and use its properties like e.g. ErrStatus.Message - _, err = clientset.CoreV1().Pods("default").Get("example-xxxxx", metav1.GetOptions{}) + _, err = clientset.CoreV1().Pods("default").Get(context.TODO(), "example-xxxxx", metav1.GetOptions{}) if errors.IsNotFound(err) { fmt.Printf("Pod example-xxxxx not found in default namespace\n") } else if statusError, isStatus := err.(*errors.StatusError); isStatus { diff --git a/examples/out-of-cluster-client-configuration/main.go b/examples/out-of-cluster-client-configuration/main.go index 9718582c..d5f183d3 100644 --- a/examples/out-of-cluster-client-configuration/main.go +++ b/examples/out-of-cluster-client-configuration/main.go @@ -18,6 +18,7 @@ limitations under the License. package main import ( + "context" "flag" "fmt" "os" @@ -60,7 +61,7 @@ func main() { panic(err.Error()) } for { - pods, err := clientset.CoreV1().Pods("").List(metav1.ListOptions{}) + pods, err := clientset.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{}) if err != nil { panic(err.Error()) } @@ -71,7 +72,7 @@ func main() { // - And/or cast to StatusError and use its properties like e.g. ErrStatus.Message namespace := "default" pod := "example-xxxxx" - _, err = clientset.CoreV1().Pods(namespace).Get(pod, metav1.GetOptions{}) + _, err = clientset.CoreV1().Pods(namespace).Get(context.TODO(), pod, metav1.GetOptions{}) if errors.IsNotFound(err) { fmt.Printf("Pod %s in namespace %s not found\n", pod, namespace) } else if statusError, isStatus := err.(*errors.StatusError); isStatus { diff --git a/informers/admissionregistration/v1/mutatingwebhookconfiguration.go b/informers/admissionregistration/v1/mutatingwebhookconfiguration.go index 4fadd9a2..b768f6f7 100644 --- a/informers/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/informers/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" @@ -60,13 +61,13 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().MutatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1().MutatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1.MutatingWebhookConfiguration{}, diff --git a/informers/admissionregistration/v1/validatingwebhookconfiguration.go b/informers/admissionregistration/v1/validatingwebhookconfiguration.go index 1c648e60..8ddcdf2d 100644 --- a/informers/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/informers/admissionregistration/v1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" @@ -60,13 +61,13 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1().ValidatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1.ValidatingWebhookConfiguration{}, diff --git a/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index a06c406c..12c8ec1f 100644 --- a/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1beta1.MutatingWebhookConfiguration{}, diff --git a/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 3b7fafd2..05eb0509 100644 --- a/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(options) + return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(options) + return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(context.TODO(), options) }, }, &admissionregistrationv1beta1.ValidatingWebhookConfiguration{}, diff --git a/informers/apps/v1/controllerrevision.go b/informers/apps/v1/controllerrevision.go index 2f69e0df..31e2b74d 100644 --- a/informers/apps/v1/controllerrevision.go +++ b/informers/apps/v1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ControllerRevisions(namespace).List(options) + return client.AppsV1().ControllerRevisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ControllerRevisions(namespace).Watch(options) + return client.AppsV1().ControllerRevisions(namespace).Watch(context.TODO(), options) }, }, &appsv1.ControllerRevision{}, diff --git a/informers/apps/v1/daemonset.go b/informers/apps/v1/daemonset.go index db649ccb..da7fe950 100644 --- a/informers/apps/v1/daemonset.go +++ b/informers/apps/v1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().DaemonSets(namespace).List(options) + return client.AppsV1().DaemonSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().DaemonSets(namespace).Watch(options) + return client.AppsV1().DaemonSets(namespace).Watch(context.TODO(), options) }, }, &appsv1.DaemonSet{}, diff --git a/informers/apps/v1/deployment.go b/informers/apps/v1/deployment.go index 71cd0027..bd639bb3 100644 --- a/informers/apps/v1/deployment.go +++ b/informers/apps/v1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().Deployments(namespace).List(options) + return client.AppsV1().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().Deployments(namespace).Watch(options) + return client.AppsV1().Deployments(namespace).Watch(context.TODO(), options) }, }, &appsv1.Deployment{}, diff --git a/informers/apps/v1/replicaset.go b/informers/apps/v1/replicaset.go index 6ee7a053..6d81a471 100644 --- a/informers/apps/v1/replicaset.go +++ b/informers/apps/v1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ReplicaSets(namespace).List(options) + return client.AppsV1().ReplicaSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().ReplicaSets(namespace).Watch(options) + return client.AppsV1().ReplicaSets(namespace).Watch(context.TODO(), options) }, }, &appsv1.ReplicaSet{}, diff --git a/informers/apps/v1/statefulset.go b/informers/apps/v1/statefulset.go index 385e6536..c99bbb73 100644 --- a/informers/apps/v1/statefulset.go +++ b/informers/apps/v1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" appsv1 "k8s.io/api/apps/v1" @@ -61,13 +62,13 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().StatefulSets(namespace).List(options) + return client.AppsV1().StatefulSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1().StatefulSets(namespace).Watch(options) + return client.AppsV1().StatefulSets(namespace).Watch(context.TODO(), options) }, }, &appsv1.StatefulSet{}, diff --git a/informers/apps/v1beta1/controllerrevision.go b/informers/apps/v1beta1/controllerrevision.go index c7d3e30e..cb36bd7f 100644 --- a/informers/apps/v1beta1/controllerrevision.go +++ b/informers/apps/v1beta1/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().ControllerRevisions(namespace).List(options) + return client.AppsV1beta1().ControllerRevisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().ControllerRevisions(namespace).Watch(options) + return client.AppsV1beta1().ControllerRevisions(namespace).Watch(context.TODO(), options) }, }, &appsv1beta1.ControllerRevision{}, diff --git a/informers/apps/v1beta1/deployment.go b/informers/apps/v1beta1/deployment.go index 03bafca6..e02a13c2 100644 --- a/informers/apps/v1beta1/deployment.go +++ b/informers/apps/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().Deployments(namespace).List(options) + return client.AppsV1beta1().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().Deployments(namespace).Watch(options) + return client.AppsV1beta1().Deployments(namespace).Watch(context.TODO(), options) }, }, &appsv1beta1.Deployment{}, diff --git a/informers/apps/v1beta1/statefulset.go b/informers/apps/v1beta1/statefulset.go index e4d1b46f..b845cc99 100644 --- a/informers/apps/v1beta1/statefulset.go +++ b/informers/apps/v1beta1/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().StatefulSets(namespace).List(options) + return client.AppsV1beta1().StatefulSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta1().StatefulSets(namespace).Watch(options) + return client.AppsV1beta1().StatefulSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta1.StatefulSet{}, diff --git a/informers/apps/v1beta2/controllerrevision.go b/informers/apps/v1beta2/controllerrevision.go index 975e8107..4d0e9132 100644 --- a/informers/apps/v1beta2/controllerrevision.go +++ b/informers/apps/v1beta2/controllerrevision.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ControllerRevisions(namespace).List(options) + return client.AppsV1beta2().ControllerRevisions(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ControllerRevisions(namespace).Watch(options) + return client.AppsV1beta2().ControllerRevisions(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.ControllerRevision{}, diff --git a/informers/apps/v1beta2/daemonset.go b/informers/apps/v1beta2/daemonset.go index 99f17fa6..280e2fe4 100644 --- a/informers/apps/v1beta2/daemonset.go +++ b/informers/apps/v1beta2/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().DaemonSets(namespace).List(options) + return client.AppsV1beta2().DaemonSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().DaemonSets(namespace).Watch(options) + return client.AppsV1beta2().DaemonSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.DaemonSet{}, diff --git a/informers/apps/v1beta2/deployment.go b/informers/apps/v1beta2/deployment.go index b25da82b..67bdb797 100644 --- a/informers/apps/v1beta2/deployment.go +++ b/informers/apps/v1beta2/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().Deployments(namespace).List(options) + return client.AppsV1beta2().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().Deployments(namespace).Watch(options) + return client.AppsV1beta2().Deployments(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.Deployment{}, diff --git a/informers/apps/v1beta2/replicaset.go b/informers/apps/v1beta2/replicaset.go index 6ce7fcfd..85d12bb6 100644 --- a/informers/apps/v1beta2/replicaset.go +++ b/informers/apps/v1beta2/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ReplicaSets(namespace).List(options) + return client.AppsV1beta2().ReplicaSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().ReplicaSets(namespace).Watch(options) + return client.AppsV1beta2().ReplicaSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.ReplicaSet{}, diff --git a/informers/apps/v1beta2/statefulset.go b/informers/apps/v1beta2/statefulset.go index e77bb2f8..2fab6f7b 100644 --- a/informers/apps/v1beta2/statefulset.go +++ b/informers/apps/v1beta2/statefulset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta2 import ( + "context" time "time" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -61,13 +62,13 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().StatefulSets(namespace).List(options) + return client.AppsV1beta2().StatefulSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AppsV1beta2().StatefulSets(namespace).Watch(options) + return client.AppsV1beta2().StatefulSets(namespace).Watch(context.TODO(), options) }, }, &appsv1beta2.StatefulSet{}, diff --git a/informers/auditregistration/v1alpha1/auditsink.go b/informers/auditregistration/v1alpha1/auditsink.go index 69778ad2..ef178c3a 100644 --- a/informers/auditregistration/v1alpha1/auditsink.go +++ b/informers/auditregistration/v1alpha1/auditsink.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredAuditSinkInformer(client kubernetes.Interface, resyncPeriod time if tweakListOptions != nil { tweakListOptions(&options) } - return client.AuditregistrationV1alpha1().AuditSinks().List(options) + return client.AuditregistrationV1alpha1().AuditSinks().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AuditregistrationV1alpha1().AuditSinks().Watch(options) + return client.AuditregistrationV1alpha1().AuditSinks().Watch(context.TODO(), options) }, }, &auditregistrationv1alpha1.AuditSink{}, diff --git a/informers/autoscaling/v1/horizontalpodautoscaler.go b/informers/autoscaling/v1/horizontalpodautoscaler.go index 205e4ecd..44f041e9 100644 --- a/informers/autoscaling/v1/horizontalpodautoscaler.go +++ b/informers/autoscaling/v1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" autoscalingv1 "k8s.io/api/autoscaling/v1" @@ -61,13 +62,13 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).List(options) + return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Watch(options) + return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv1.HorizontalPodAutoscaler{}, diff --git a/informers/autoscaling/v2beta1/horizontalpodautoscaler.go b/informers/autoscaling/v2beta1/horizontalpodautoscaler.go index 4627c5a0..6385a2a1 100644 --- a/informers/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/informers/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta1 import ( + "context" time "time" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" @@ -61,13 +62,13 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(options) + return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(options) + return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv2beta1.HorizontalPodAutoscaler{}, diff --git a/informers/autoscaling/v2beta2/horizontalpodautoscaler.go b/informers/autoscaling/v2beta2/horizontalpodautoscaler.go index b4863f9b..f1ac3f07 100644 --- a/informers/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/informers/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -19,6 +19,7 @@ limitations under the License. package v2beta2 import ( + "context" time "time" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -61,13 +62,13 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).List(options) + return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).Watch(options) + return client.AutoscalingV2beta2().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) }, }, &autoscalingv2beta2.HorizontalPodAutoscaler{}, diff --git a/informers/batch/v1/job.go b/informers/batch/v1/job.go index 30d41104..4992f522 100644 --- a/informers/batch/v1/job.go +++ b/informers/batch/v1/job.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" batchv1 "k8s.io/api/batch/v1" @@ -61,13 +62,13 @@ func NewFilteredJobInformer(client kubernetes.Interface, namespace string, resyn if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1().Jobs(namespace).List(options) + return client.BatchV1().Jobs(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1().Jobs(namespace).Watch(options) + return client.BatchV1().Jobs(namespace).Watch(context.TODO(), options) }, }, &batchv1.Job{}, diff --git a/informers/batch/v1beta1/cronjob.go b/informers/batch/v1beta1/cronjob.go index 0b7598e0..820c93ea 100644 --- a/informers/batch/v1beta1/cronjob.go +++ b/informers/batch/v1beta1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" batchv1beta1 "k8s.io/api/batch/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1beta1().CronJobs(namespace).List(options) + return client.BatchV1beta1().CronJobs(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV1beta1().CronJobs(namespace).Watch(options) + return client.BatchV1beta1().CronJobs(namespace).Watch(context.TODO(), options) }, }, &batchv1beta1.CronJob{}, diff --git a/informers/batch/v2alpha1/cronjob.go b/informers/batch/v2alpha1/cronjob.go index 20cf7d49..5f5b870d 100644 --- a/informers/batch/v2alpha1/cronjob.go +++ b/informers/batch/v2alpha1/cronjob.go @@ -19,6 +19,7 @@ limitations under the License. package v2alpha1 import ( + "context" time "time" batchv2alpha1 "k8s.io/api/batch/v2alpha1" @@ -61,13 +62,13 @@ func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV2alpha1().CronJobs(namespace).List(options) + return client.BatchV2alpha1().CronJobs(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.BatchV2alpha1().CronJobs(namespace).Watch(options) + return client.BatchV2alpha1().CronJobs(namespace).Watch(context.TODO(), options) }, }, &batchv2alpha1.CronJob{}, diff --git a/informers/certificates/v1beta1/certificatesigningrequest.go b/informers/certificates/v1beta1/certificatesigningrequest.go index 6472d20e..4e167ab8 100644 --- a/informers/certificates/v1beta1/certificatesigningrequest.go +++ b/informers/certificates/v1beta1/certificatesigningrequest.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCertificateSigningRequestInformer(client kubernetes.Interface, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.CertificatesV1beta1().CertificateSigningRequests().List(options) + return client.CertificatesV1beta1().CertificateSigningRequests().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options) + return client.CertificatesV1beta1().CertificateSigningRequests().Watch(context.TODO(), options) }, }, &certificatesv1beta1.CertificateSigningRequest{}, diff --git a/informers/coordination/v1/lease.go b/informers/coordination/v1/lease.go index b8a3de47..e538923a 100644 --- a/informers/coordination/v1/lease.go +++ b/informers/coordination/v1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" coordinationv1 "k8s.io/api/coordination/v1" @@ -61,13 +62,13 @@ func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1().Leases(namespace).List(options) + return client.CoordinationV1().Leases(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1().Leases(namespace).Watch(options) + return client.CoordinationV1().Leases(namespace).Watch(context.TODO(), options) }, }, &coordinationv1.Lease{}, diff --git a/informers/coordination/v1beta1/lease.go b/informers/coordination/v1beta1/lease.go index bb59be13..5a6959c0 100644 --- a/informers/coordination/v1beta1/lease.go +++ b/informers/coordination/v1beta1/lease.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1beta1().Leases(namespace).List(options) + return client.CoordinationV1beta1().Leases(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoordinationV1beta1().Leases(namespace).Watch(options) + return client.CoordinationV1beta1().Leases(namespace).Watch(context.TODO(), options) }, }, &coordinationv1beta1.Lease{}, diff --git a/informers/core/v1/componentstatus.go b/informers/core/v1/componentstatus.go index a5ae6fc4..ccdee535 100644 --- a/informers/core/v1/componentstatus.go +++ b/informers/core/v1/componentstatus.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredComponentStatusInformer(client kubernetes.Interface, resyncPerio if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ComponentStatuses().List(options) + return client.CoreV1().ComponentStatuses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ComponentStatuses().Watch(options) + return client.CoreV1().ComponentStatuses().Watch(context.TODO(), options) }, }, &corev1.ComponentStatus{}, diff --git a/informers/core/v1/configmap.go b/informers/core/v1/configmap.go index 48cb1a48..62535817 100644 --- a/informers/core/v1/configmap.go +++ b/informers/core/v1/configmap.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredConfigMapInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ConfigMaps(namespace).List(options) + return client.CoreV1().ConfigMaps(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ConfigMaps(namespace).Watch(options) + return client.CoreV1().ConfigMaps(namespace).Watch(context.TODO(), options) }, }, &corev1.ConfigMap{}, diff --git a/informers/core/v1/endpoints.go b/informers/core/v1/endpoints.go index 77fa8cf8..cd0f25b7 100644 --- a/informers/core/v1/endpoints.go +++ b/informers/core/v1/endpoints.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredEndpointsInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Endpoints(namespace).List(options) + return client.CoreV1().Endpoints(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Endpoints(namespace).Watch(options) + return client.CoreV1().Endpoints(namespace).Watch(context.TODO(), options) }, }, &corev1.Endpoints{}, diff --git a/informers/core/v1/event.go b/informers/core/v1/event.go index 52f4911c..8825e9b7 100644 --- a/informers/core/v1/event.go +++ b/informers/core/v1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredEventInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Events(namespace).List(options) + return client.CoreV1().Events(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Events(namespace).Watch(options) + return client.CoreV1().Events(namespace).Watch(context.TODO(), options) }, }, &corev1.Event{}, diff --git a/informers/core/v1/limitrange.go b/informers/core/v1/limitrange.go index 7499e186..4cbfda1f 100644 --- a/informers/core/v1/limitrange.go +++ b/informers/core/v1/limitrange.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredLimitRangeInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().LimitRanges(namespace).List(options) + return client.CoreV1().LimitRanges(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().LimitRanges(namespace).Watch(options) + return client.CoreV1().LimitRanges(namespace).Watch(context.TODO(), options) }, }, &corev1.LimitRange{}, diff --git a/informers/core/v1/namespace.go b/informers/core/v1/namespace.go index 57a07335..506f930a 100644 --- a/informers/core/v1/namespace.go +++ b/informers/core/v1/namespace.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredNamespaceInformer(client kubernetes.Interface, resyncPeriod time if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Namespaces().List(options) + return client.CoreV1().Namespaces().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Namespaces().Watch(options) + return client.CoreV1().Namespaces().Watch(context.TODO(), options) }, }, &corev1.Namespace{}, diff --git a/informers/core/v1/node.go b/informers/core/v1/node.go index d9b85f83..9939fc2c 100644 --- a/informers/core/v1/node.go +++ b/informers/core/v1/node.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredNodeInformer(client kubernetes.Interface, resyncPeriod time.Dura if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Nodes().List(options) + return client.CoreV1().Nodes().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Nodes().Watch(options) + return client.CoreV1().Nodes().Watch(context.TODO(), options) }, }, &corev1.Node{}, diff --git a/informers/core/v1/persistentvolume.go b/informers/core/v1/persistentvolume.go index a50bcfc6..c8244599 100644 --- a/informers/core/v1/persistentvolume.go +++ b/informers/core/v1/persistentvolume.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -60,13 +61,13 @@ func NewFilteredPersistentVolumeInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumes().List(options) + return client.CoreV1().PersistentVolumes().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumes().Watch(options) + return client.CoreV1().PersistentVolumes().Watch(context.TODO(), options) }, }, &corev1.PersistentVolume{}, diff --git a/informers/core/v1/persistentvolumeclaim.go b/informers/core/v1/persistentvolumeclaim.go index 3fb5e5f6..7a7df1cf 100644 --- a/informers/core/v1/persistentvolumeclaim.go +++ b/informers/core/v1/persistentvolumeclaim.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredPersistentVolumeClaimInformer(client kubernetes.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumeClaims(namespace).List(options) + return client.CoreV1().PersistentVolumeClaims(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PersistentVolumeClaims(namespace).Watch(options) + return client.CoreV1().PersistentVolumeClaims(namespace).Watch(context.TODO(), options) }, }, &corev1.PersistentVolumeClaim{}, diff --git a/informers/core/v1/pod.go b/informers/core/v1/pod.go index 57aadd94..5c713a9b 100644 --- a/informers/core/v1/pod.go +++ b/informers/core/v1/pod.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredPodInformer(client kubernetes.Interface, namespace string, resyn if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Pods(namespace).List(options) + return client.CoreV1().Pods(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Pods(namespace).Watch(options) + return client.CoreV1().Pods(namespace).Watch(context.TODO(), options) }, }, &corev1.Pod{}, diff --git a/informers/core/v1/podtemplate.go b/informers/core/v1/podtemplate.go index ff47094f..2a16e910 100644 --- a/informers/core/v1/podtemplate.go +++ b/informers/core/v1/podtemplate.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredPodTemplateInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PodTemplates(namespace).List(options) + return client.CoreV1().PodTemplates(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().PodTemplates(namespace).Watch(options) + return client.CoreV1().PodTemplates(namespace).Watch(context.TODO(), options) }, }, &corev1.PodTemplate{}, diff --git a/informers/core/v1/replicationcontroller.go b/informers/core/v1/replicationcontroller.go index 903fe3fb..930beb4c 100644 --- a/informers/core/v1/replicationcontroller.go +++ b/informers/core/v1/replicationcontroller.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredReplicationControllerInformer(client kubernetes.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ReplicationControllers(namespace).List(options) + return client.CoreV1().ReplicationControllers(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ReplicationControllers(namespace).Watch(options) + return client.CoreV1().ReplicationControllers(namespace).Watch(context.TODO(), options) }, }, &corev1.ReplicationController{}, diff --git a/informers/core/v1/resourcequota.go b/informers/core/v1/resourcequota.go index 27ae53cc..619262a6 100644 --- a/informers/core/v1/resourcequota.go +++ b/informers/core/v1/resourcequota.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredResourceQuotaInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ResourceQuotas(namespace).List(options) + return client.CoreV1().ResourceQuotas(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ResourceQuotas(namespace).Watch(options) + return client.CoreV1().ResourceQuotas(namespace).Watch(context.TODO(), options) }, }, &corev1.ResourceQuota{}, diff --git a/informers/core/v1/secret.go b/informers/core/v1/secret.go index e13776b2..a6be0706 100644 --- a/informers/core/v1/secret.go +++ b/informers/core/v1/secret.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredSecretInformer(client kubernetes.Interface, namespace string, re if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Secrets(namespace).List(options) + return client.CoreV1().Secrets(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Secrets(namespace).Watch(options) + return client.CoreV1().Secrets(namespace).Watch(context.TODO(), options) }, }, &corev1.Secret{}, diff --git a/informers/core/v1/service.go b/informers/core/v1/service.go index 1c758668..3d9ecc6e 100644 --- a/informers/core/v1/service.go +++ b/informers/core/v1/service.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Services(namespace).List(options) + return client.CoreV1().Services(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().Services(namespace).Watch(options) + return client.CoreV1().Services(namespace).Watch(context.TODO(), options) }, }, &corev1.Service{}, diff --git a/informers/core/v1/serviceaccount.go b/informers/core/v1/serviceaccount.go index c701b8f1..44371c9f 100644 --- a/informers/core/v1/serviceaccount.go +++ b/informers/core/v1/serviceaccount.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" corev1 "k8s.io/api/core/v1" @@ -61,13 +62,13 @@ func NewFilteredServiceAccountInformer(client kubernetes.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ServiceAccounts(namespace).List(options) + return client.CoreV1().ServiceAccounts(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1().ServiceAccounts(namespace).Watch(options) + return client.CoreV1().ServiceAccounts(namespace).Watch(context.TODO(), options) }, }, &corev1.ServiceAccount{}, diff --git a/informers/discovery/v1alpha1/endpointslice.go b/informers/discovery/v1alpha1/endpointslice.go index a545ce15..c5e383c0 100644 --- a/informers/discovery/v1alpha1/endpointslice.go +++ b/informers/discovery/v1alpha1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1alpha1().EndpointSlices(namespace).List(options) + return client.DiscoveryV1alpha1().EndpointSlices(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1alpha1().EndpointSlices(namespace).Watch(options) + return client.DiscoveryV1alpha1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, &discoveryv1alpha1.EndpointSlice{}, diff --git a/informers/discovery/v1beta1/endpointslice.go b/informers/discovery/v1beta1/endpointslice.go index f658866c..69ae38a9 100644 --- a/informers/discovery/v1beta1/endpointslice.go +++ b/informers/discovery/v1beta1/endpointslice.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" discoveryv1beta1 "k8s.io/api/discovery/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1beta1().EndpointSlices(namespace).List(options) + return client.DiscoveryV1beta1().EndpointSlices(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DiscoveryV1beta1().EndpointSlices(namespace).Watch(options) + return client.DiscoveryV1beta1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, &discoveryv1beta1.EndpointSlice{}, diff --git a/informers/events/v1beta1/event.go b/informers/events/v1beta1/event.go index 0ac6fa28..025f6a5c 100644 --- a/informers/events/v1beta1/event.go +++ b/informers/events/v1beta1/event.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" eventsv1beta1 "k8s.io/api/events/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredEventInformer(client kubernetes.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventsV1beta1().Events(namespace).List(options) + return client.EventsV1beta1().Events(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.EventsV1beta1().Events(namespace).Watch(options) + return client.EventsV1beta1().Events(namespace).Watch(context.TODO(), options) }, }, &eventsv1beta1.Event{}, diff --git a/informers/extensions/v1beta1/daemonset.go b/informers/extensions/v1beta1/daemonset.go index 80e84eba..050080a5 100644 --- a/informers/extensions/v1beta1/daemonset.go +++ b/informers/extensions/v1beta1/daemonset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().DaemonSets(namespace).List(options) + return client.ExtensionsV1beta1().DaemonSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(options) + return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.DaemonSet{}, diff --git a/informers/extensions/v1beta1/deployment.go b/informers/extensions/v1beta1/deployment.go index cef4b815..1b16c5cc 100644 --- a/informers/extensions/v1beta1/deployment.go +++ b/informers/extensions/v1beta1/deployment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Deployments(namespace).List(options) + return client.ExtensionsV1beta1().Deployments(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Deployments(namespace).Watch(options) + return client.ExtensionsV1beta1().Deployments(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.Deployment{}, diff --git a/informers/extensions/v1beta1/ingress.go b/informers/extensions/v1beta1/ingress.go index 72a88f31..f01a8876 100644 --- a/informers/extensions/v1beta1/ingress.go +++ b/informers/extensions/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Ingresses(namespace).List(options) + return client.ExtensionsV1beta1().Ingresses(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().Ingresses(namespace).Watch(options) + return client.ExtensionsV1beta1().Ingresses(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.Ingress{}, diff --git a/informers/extensions/v1beta1/networkpolicy.go b/informers/extensions/v1beta1/networkpolicy.go index 92f4f040..4a924619 100644 --- a/informers/extensions/v1beta1/networkpolicy.go +++ b/informers/extensions/v1beta1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredNetworkPolicyInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().NetworkPolicies(namespace).List(options) + return client.ExtensionsV1beta1().NetworkPolicies(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().NetworkPolicies(namespace).Watch(options) + return client.ExtensionsV1beta1().NetworkPolicies(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.NetworkPolicy{}, diff --git a/informers/extensions/v1beta1/podsecuritypolicy.go b/informers/extensions/v1beta1/podsecuritypolicy.go index 6f91e545..11be2751 100644 --- a/informers/extensions/v1beta1/podsecuritypolicy.go +++ b/informers/extensions/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPer if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().PodSecurityPolicies().List(options) + return client.ExtensionsV1beta1().PodSecurityPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options) + return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(context.TODO(), options) }, }, &extensionsv1beta1.PodSecurityPolicy{}, diff --git a/informers/extensions/v1beta1/replicaset.go b/informers/extensions/v1beta1/replicaset.go index e8847aa2..f7e224bc 100644 --- a/informers/extensions/v1beta1/replicaset.go +++ b/informers/extensions/v1beta1/replicaset.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().ReplicaSets(namespace).List(options) + return client.ExtensionsV1beta1().ReplicaSets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(options) + return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(context.TODO(), options) }, }, &extensionsv1beta1.ReplicaSet{}, diff --git a/informers/flowcontrol/v1alpha1/flowschema.go b/informers/flowcontrol/v1alpha1/flowschema.go index af1d874c..9a4a9044 100644 --- a/informers/flowcontrol/v1alpha1/flowschema.go +++ b/informers/flowcontrol/v1alpha1/flowschema.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredFlowSchemaInformer(client kubernetes.Interface, resyncPeriod tim if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().FlowSchemas().List(options) + return client.FlowcontrolV1alpha1().FlowSchemas().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().FlowSchemas().Watch(options) + return client.FlowcontrolV1alpha1().FlowSchemas().Watch(context.TODO(), options) }, }, &flowcontrolv1alpha1.FlowSchema{}, diff --git a/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go index c145b7d4..b81f5c9c 100644 --- a/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredPriorityLevelConfigurationInformer(client kubernetes.Interface, if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().List(options) + return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().Watch(options) + return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().Watch(context.TODO(), options) }, }, &flowcontrolv1alpha1.PriorityLevelConfiguration{}, diff --git a/informers/networking/v1/networkpolicy.go b/informers/networking/v1/networkpolicy.go index c2255c0d..a75c9ac2 100644 --- a/informers/networking/v1/networkpolicy.go +++ b/informers/networking/v1/networkpolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" networkingv1 "k8s.io/api/networking/v1" @@ -61,13 +62,13 @@ func NewFilteredNetworkPolicyInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1().NetworkPolicies(namespace).List(options) + return client.NetworkingV1().NetworkPolicies(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1().NetworkPolicies(namespace).Watch(options) + return client.NetworkingV1().NetworkPolicies(namespace).Watch(context.TODO(), options) }, }, &networkingv1.NetworkPolicy{}, diff --git a/informers/networking/v1beta1/ingress.go b/informers/networking/v1beta1/ingress.go index 8abd00e1..8800d6c9 100644 --- a/informers/networking/v1beta1/ingress.go +++ b/informers/networking/v1beta1/ingress.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" networkingv1beta1 "k8s.io/api/networking/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1beta1().Ingresses(namespace).List(options) + return client.NetworkingV1beta1().Ingresses(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1beta1().Ingresses(namespace).Watch(options) + return client.NetworkingV1beta1().Ingresses(namespace).Watch(context.TODO(), options) }, }, &networkingv1beta1.Ingress{}, diff --git a/informers/node/v1alpha1/runtimeclass.go b/informers/node/v1alpha1/runtimeclass.go index 31edf930..d314a957 100644 --- a/informers/node/v1alpha1/runtimeclass.go +++ b/informers/node/v1alpha1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredRuntimeClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1alpha1().RuntimeClasses().List(options) + return client.NodeV1alpha1().RuntimeClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1alpha1().RuntimeClasses().Watch(options) + return client.NodeV1alpha1().RuntimeClasses().Watch(context.TODO(), options) }, }, &nodev1alpha1.RuntimeClass{}, diff --git a/informers/node/v1beta1/runtimeclass.go b/informers/node/v1beta1/runtimeclass.go index 6972993a..07619b23 100644 --- a/informers/node/v1beta1/runtimeclass.go +++ b/informers/node/v1beta1/runtimeclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" nodev1beta1 "k8s.io/api/node/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredRuntimeClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1beta1().RuntimeClasses().List(options) + return client.NodeV1beta1().RuntimeClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NodeV1beta1().RuntimeClasses().Watch(options) + return client.NodeV1beta1().RuntimeClasses().Watch(context.TODO(), options) }, }, &nodev1beta1.RuntimeClass{}, diff --git a/informers/policy/v1beta1/poddisruptionbudget.go b/informers/policy/v1beta1/poddisruptionbudget.go index dce61f7f..4530343e 100644 --- a/informers/policy/v1beta1/poddisruptionbudget.go +++ b/informers/policy/v1beta1/poddisruptionbudget.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" policyv1beta1 "k8s.io/api/policy/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredPodDisruptionBudgetInformer(client kubernetes.Interface, namespa if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodDisruptionBudgets(namespace).List(options) + return client.PolicyV1beta1().PodDisruptionBudgets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(options) + return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(context.TODO(), options) }, }, &policyv1beta1.PodDisruptionBudget{}, diff --git a/informers/policy/v1beta1/podsecuritypolicy.go b/informers/policy/v1beta1/podsecuritypolicy.go index 7ce5684f..b87d2343 100644 --- a/informers/policy/v1beta1/podsecuritypolicy.go +++ b/informers/policy/v1beta1/podsecuritypolicy.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" policyv1beta1 "k8s.io/api/policy/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPer if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodSecurityPolicies().List(options) + return client.PolicyV1beta1().PodSecurityPolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicyV1beta1().PodSecurityPolicies().Watch(options) + return client.PolicyV1beta1().PodSecurityPolicies().Watch(context.TODO(), options) }, }, &policyv1beta1.PodSecurityPolicy{}, diff --git a/informers/rbac/v1/clusterrole.go b/informers/rbac/v1/clusterrole.go index b8096e6b..0572be26 100644 --- a/informers/rbac/v1/clusterrole.go +++ b/informers/rbac/v1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoles().List(options) + return client.RbacV1().ClusterRoles().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoles().Watch(options) + return client.RbacV1().ClusterRoles().Watch(context.TODO(), options) }, }, &rbacv1.ClusterRole{}, diff --git a/informers/rbac/v1/clusterrolebinding.go b/informers/rbac/v1/clusterrolebinding.go index 5ef3407c..51026c05 100644 --- a/informers/rbac/v1/clusterrolebinding.go +++ b/informers/rbac/v1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoleBindings().List(options) + return client.RbacV1().ClusterRoleBindings().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().ClusterRoleBindings().Watch(options) + return client.RbacV1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, &rbacv1.ClusterRoleBinding{}, diff --git a/informers/rbac/v1/role.go b/informers/rbac/v1/role.go index 2d98874e..986a5f29 100644 --- a/informers/rbac/v1/role.go +++ b/informers/rbac/v1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -61,13 +62,13 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().Roles(namespace).List(options) + return client.RbacV1().Roles(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().Roles(namespace).Watch(options) + return client.RbacV1().Roles(namespace).Watch(context.TODO(), options) }, }, &rbacv1.Role{}, diff --git a/informers/rbac/v1/rolebinding.go b/informers/rbac/v1/rolebinding.go index a97107de..0264049f 100644 --- a/informers/rbac/v1/rolebinding.go +++ b/informers/rbac/v1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" rbacv1 "k8s.io/api/rbac/v1" @@ -61,13 +62,13 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().RoleBindings(namespace).List(options) + return client.RbacV1().RoleBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1().RoleBindings(namespace).Watch(options) + return client.RbacV1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, &rbacv1.RoleBinding{}, diff --git a/informers/rbac/v1alpha1/clusterrole.go b/informers/rbac/v1alpha1/clusterrole.go index 58c9c412..70d9885f 100644 --- a/informers/rbac/v1alpha1/clusterrole.go +++ b/informers/rbac/v1alpha1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoles().List(options) + return client.RbacV1alpha1().ClusterRoles().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoles().Watch(options) + return client.RbacV1alpha1().ClusterRoles().Watch(context.TODO(), options) }, }, &rbacv1alpha1.ClusterRole{}, diff --git a/informers/rbac/v1alpha1/clusterrolebinding.go b/informers/rbac/v1alpha1/clusterrolebinding.go index 759c716b..8c18f679 100644 --- a/informers/rbac/v1alpha1/clusterrolebinding.go +++ b/informers/rbac/v1alpha1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoleBindings().List(options) + return client.RbacV1alpha1().ClusterRoleBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().ClusterRoleBindings().Watch(options) + return client.RbacV1alpha1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, &rbacv1alpha1.ClusterRoleBinding{}, diff --git a/informers/rbac/v1alpha1/role.go b/informers/rbac/v1alpha1/role.go index 1d1f99f0..7dc4551d 100644 --- a/informers/rbac/v1alpha1/role.go +++ b/informers/rbac/v1alpha1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().Roles(namespace).List(options) + return client.RbacV1alpha1().Roles(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().Roles(namespace).Watch(options) + return client.RbacV1alpha1().Roles(namespace).Watch(context.TODO(), options) }, }, &rbacv1alpha1.Role{}, diff --git a/informers/rbac/v1alpha1/rolebinding.go b/informers/rbac/v1alpha1/rolebinding.go index 9fcb01d3..d49ec8b3 100644 --- a/informers/rbac/v1alpha1/rolebinding.go +++ b/informers/rbac/v1alpha1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().RoleBindings(namespace).List(options) + return client.RbacV1alpha1().RoleBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1alpha1().RoleBindings(namespace).Watch(options) + return client.RbacV1alpha1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, &rbacv1alpha1.RoleBinding{}, diff --git a/informers/rbac/v1beta1/clusterrole.go b/informers/rbac/v1beta1/clusterrole.go index b82c1c74..e50e1d39 100644 --- a/informers/rbac/v1beta1/clusterrole.go +++ b/informers/rbac/v1beta1/clusterrole.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoles().List(options) + return client.RbacV1beta1().ClusterRoles().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoles().Watch(options) + return client.RbacV1beta1().ClusterRoles().Watch(context.TODO(), options) }, }, &rbacv1beta1.ClusterRole{}, diff --git a/informers/rbac/v1beta1/clusterrolebinding.go b/informers/rbac/v1beta1/clusterrolebinding.go index d662e7f5..a7ea4cd3 100644 --- a/informers/rbac/v1beta1/clusterrolebinding.go +++ b/informers/rbac/v1beta1/clusterrolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoleBindings().List(options) + return client.RbacV1beta1().ClusterRoleBindings().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().ClusterRoleBindings().Watch(options) + return client.RbacV1beta1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, &rbacv1beta1.ClusterRoleBinding{}, diff --git a/informers/rbac/v1beta1/role.go b/informers/rbac/v1beta1/role.go index b885beb2..e56961e8 100644 --- a/informers/rbac/v1beta1/role.go +++ b/informers/rbac/v1beta1/role.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().Roles(namespace).List(options) + return client.RbacV1beta1().Roles(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().Roles(namespace).Watch(options) + return client.RbacV1beta1().Roles(namespace).Watch(context.TODO(), options) }, }, &rbacv1beta1.Role{}, diff --git a/informers/rbac/v1beta1/rolebinding.go b/informers/rbac/v1beta1/rolebinding.go index 63d9d726..d893882d 100644 --- a/informers/rbac/v1beta1/rolebinding.go +++ b/informers/rbac/v1beta1/rolebinding.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" rbacv1beta1 "k8s.io/api/rbac/v1beta1" @@ -61,13 +62,13 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().RoleBindings(namespace).List(options) + return client.RbacV1beta1().RoleBindings(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.RbacV1beta1().RoleBindings(namespace).Watch(options) + return client.RbacV1beta1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, &rbacv1beta1.RoleBinding{}, diff --git a/informers/scheduling/v1/priorityclass.go b/informers/scheduling/v1/priorityclass.go index a9ee6289..730616b4 100644 --- a/informers/scheduling/v1/priorityclass.go +++ b/informers/scheduling/v1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" schedulingv1 "k8s.io/api/scheduling/v1" @@ -60,13 +61,13 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1().PriorityClasses().List(options) + return client.SchedulingV1().PriorityClasses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1().PriorityClasses().Watch(options) + return client.SchedulingV1().PriorityClasses().Watch(context.TODO(), options) }, }, &schedulingv1.PriorityClass{}, diff --git a/informers/scheduling/v1alpha1/priorityclass.go b/informers/scheduling/v1alpha1/priorityclass.go index cd90dd76..f82b6643 100644 --- a/informers/scheduling/v1alpha1/priorityclass.go +++ b/informers/scheduling/v1alpha1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1alpha1().PriorityClasses().List(options) + return client.SchedulingV1alpha1().PriorityClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1alpha1().PriorityClasses().Watch(options) + return client.SchedulingV1alpha1().PriorityClasses().Watch(context.TODO(), options) }, }, &schedulingv1alpha1.PriorityClass{}, diff --git a/informers/scheduling/v1beta1/priorityclass.go b/informers/scheduling/v1beta1/priorityclass.go index 3c7d9093..fc784889 100644 --- a/informers/scheduling/v1beta1/priorityclass.go +++ b/informers/scheduling/v1beta1/priorityclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1beta1().PriorityClasses().List(options) + return client.SchedulingV1beta1().PriorityClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SchedulingV1beta1().PriorityClasses().Watch(options) + return client.SchedulingV1beta1().PriorityClasses().Watch(context.TODO(), options) }, }, &schedulingv1beta1.PriorityClass{}, diff --git a/informers/settings/v1alpha1/podpreset.go b/informers/settings/v1alpha1/podpreset.go index 33fcf235..8c10b16c 100644 --- a/informers/settings/v1alpha1/podpreset.go +++ b/informers/settings/v1alpha1/podpreset.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" settingsv1alpha1 "k8s.io/api/settings/v1alpha1" @@ -61,13 +62,13 @@ func NewFilteredPodPresetInformer(client kubernetes.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.SettingsV1alpha1().PodPresets(namespace).List(options) + return client.SettingsV1alpha1().PodPresets(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.SettingsV1alpha1().PodPresets(namespace).Watch(options) + return client.SettingsV1alpha1().PodPresets(namespace).Watch(context.TODO(), options) }, }, &settingsv1alpha1.PodPreset{}, diff --git a/informers/storage/v1/csinode.go b/informers/storage/v1/csinode.go index eed947c4..96416967 100644 --- a/informers/storage/v1/csinode.go +++ b/informers/storage/v1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" storagev1 "k8s.io/api/storage/v1" @@ -60,13 +61,13 @@ func NewFilteredCSINodeInformer(client kubernetes.Interface, resyncPeriod time.D if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().CSINodes().List(options) + return client.StorageV1().CSINodes().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().CSINodes().Watch(options) + return client.StorageV1().CSINodes().Watch(context.TODO(), options) }, }, &storagev1.CSINode{}, diff --git a/informers/storage/v1/storageclass.go b/informers/storage/v1/storageclass.go index b4609b4d..8cde79d9 100644 --- a/informers/storage/v1/storageclass.go +++ b/informers/storage/v1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" storagev1 "k8s.io/api/storage/v1" @@ -60,13 +61,13 @@ func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().StorageClasses().List(options) + return client.StorageV1().StorageClasses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().StorageClasses().Watch(options) + return client.StorageV1().StorageClasses().Watch(context.TODO(), options) }, }, &storagev1.StorageClass{}, diff --git a/informers/storage/v1/volumeattachment.go b/informers/storage/v1/volumeattachment.go index 7ca3b86f..be605ff4 100644 --- a/informers/storage/v1/volumeattachment.go +++ b/informers/storage/v1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1 import ( + "context" time "time" storagev1 "k8s.io/api/storage/v1" @@ -60,13 +61,13 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().VolumeAttachments().List(options) + return client.StorageV1().VolumeAttachments().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1().VolumeAttachments().Watch(options) + return client.StorageV1().VolumeAttachments().Watch(context.TODO(), options) }, }, &storagev1.VolumeAttachment{}, diff --git a/informers/storage/v1alpha1/volumeattachment.go b/informers/storage/v1alpha1/volumeattachment.go index e169c8a2..445496da 100644 --- a/informers/storage/v1alpha1/volumeattachment.go +++ b/informers/storage/v1alpha1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1alpha1 import ( + "context" time "time" storagev1alpha1 "k8s.io/api/storage/v1alpha1" @@ -60,13 +61,13 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1alpha1().VolumeAttachments().List(options) + return client.StorageV1alpha1().VolumeAttachments().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1alpha1().VolumeAttachments().Watch(options) + return client.StorageV1alpha1().VolumeAttachments().Watch(context.TODO(), options) }, }, &storagev1alpha1.VolumeAttachment{}, diff --git a/informers/storage/v1beta1/csidriver.go b/informers/storage/v1beta1/csidriver.go index 7f7cb216..f138a915 100644 --- a/informers/storage/v1beta1/csidriver.go +++ b/informers/storage/v1beta1/csidriver.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCSIDriverInformer(client kubernetes.Interface, resyncPeriod time if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSIDrivers().List(options) + return client.StorageV1beta1().CSIDrivers().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSIDrivers().Watch(options) + return client.StorageV1beta1().CSIDrivers().Watch(context.TODO(), options) }, }, &storagev1beta1.CSIDriver{}, diff --git a/informers/storage/v1beta1/csinode.go b/informers/storage/v1beta1/csinode.go index 218bb118..6ba63172 100644 --- a/informers/storage/v1beta1/csinode.go +++ b/informers/storage/v1beta1/csinode.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredCSINodeInformer(client kubernetes.Interface, resyncPeriod time.D if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSINodes().List(options) + return client.StorageV1beta1().CSINodes().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().CSINodes().Watch(options) + return client.StorageV1beta1().CSINodes().Watch(context.TODO(), options) }, }, &storagev1beta1.CSINode{}, diff --git a/informers/storage/v1beta1/storageclass.go b/informers/storage/v1beta1/storageclass.go index ed898a77..a6582bf3 100644 --- a/informers/storage/v1beta1/storageclass.go +++ b/informers/storage/v1beta1/storageclass.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod t if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().StorageClasses().List(options) + return client.StorageV1beta1().StorageClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().StorageClasses().Watch(options) + return client.StorageV1beta1().StorageClasses().Watch(context.TODO(), options) }, }, &storagev1beta1.StorageClass{}, diff --git a/informers/storage/v1beta1/volumeattachment.go b/informers/storage/v1beta1/volumeattachment.go index c75fc06b..e8942463 100644 --- a/informers/storage/v1beta1/volumeattachment.go +++ b/informers/storage/v1beta1/volumeattachment.go @@ -19,6 +19,7 @@ limitations under the License. package v1beta1 import ( + "context" time "time" storagev1beta1 "k8s.io/api/storage/v1beta1" @@ -60,13 +61,13 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().VolumeAttachments().List(options) + return client.StorageV1beta1().VolumeAttachments().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.StorageV1beta1().VolumeAttachments().Watch(options) + return client.StorageV1beta1().VolumeAttachments().Watch(context.TODO(), options) }, }, &storagev1beta1.VolumeAttachment{}, diff --git a/kubernetes_test/timeout_test.go b/kubernetes_test/timeout_test.go index 055fb490..eb3c5f3e 100644 --- a/kubernetes_test/timeout_test.go +++ b/kubernetes_test/timeout_test.go @@ -18,6 +18,7 @@ package kubernetes_test import ( "bytes" + "context" "io/ioutil" "net/http" "testing" @@ -55,6 +56,6 @@ func TestListTimeout(t *testing.T) { realClient := kubernetes.New(restClient) timeout := int64(21) - realClient.AppsV1().DaemonSets("").List(metav1.ListOptions{TimeoutSeconds: &timeout}) - realClient.AppsV1().DaemonSets("").Watch(metav1.ListOptions{TimeoutSeconds: &timeout}) + realClient.AppsV1().DaemonSets("").List(context.TODO(), metav1.ListOptions{TimeoutSeconds: &timeout}) + realClient.AppsV1().DaemonSets("").Watch(context.TODO(), metav1.ListOptions{TimeoutSeconds: &timeout}) } diff --git a/tools/leaderelection/resourcelock/configmaplock.go b/tools/leaderelection/resourcelock/configmaplock.go index fd152b07..4a9c030f 100644 --- a/tools/leaderelection/resourcelock/configmaplock.go +++ b/tools/leaderelection/resourcelock/configmaplock.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "encoding/json" "errors" "fmt" @@ -44,7 +45,7 @@ type ConfigMapLock struct { func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error - cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(cml.ConfigMapMeta.Name, metav1.GetOptions{}) + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(context.TODO(), cml.ConfigMapMeta.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err } @@ -66,7 +67,7 @@ func (cml *ConfigMapLock) Create(ler LeaderElectionRecord) error { if err != nil { return err } - cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Create(&v1.ConfigMap{ + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Create(context.TODO(), &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: cml.ConfigMapMeta.Name, Namespace: cml.ConfigMapMeta.Namespace, @@ -88,7 +89,7 @@ func (cml *ConfigMapLock) Update(ler LeaderElectionRecord) error { return err } cml.cm.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes) - cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Update(cml.cm) + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Update(context.TODO(), cml.cm) return err } diff --git a/tools/leaderelection/resourcelock/endpointslock.go b/tools/leaderelection/resourcelock/endpointslock.go index f5a8ffcc..5127a925 100644 --- a/tools/leaderelection/resourcelock/endpointslock.go +++ b/tools/leaderelection/resourcelock/endpointslock.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "encoding/json" "errors" "fmt" @@ -39,7 +40,7 @@ type EndpointsLock struct { func (el *EndpointsLock) Get() (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error - el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(el.EndpointsMeta.Name, metav1.GetOptions{}) + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(context.TODO(), el.EndpointsMeta.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err } @@ -61,7 +62,7 @@ func (el *EndpointsLock) Create(ler LeaderElectionRecord) error { if err != nil { return err } - el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Create(&v1.Endpoints{ + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Create(context.TODO(), &v1.Endpoints{ ObjectMeta: metav1.ObjectMeta{ Name: el.EndpointsMeta.Name, Namespace: el.EndpointsMeta.Namespace, @@ -86,7 +87,7 @@ func (el *EndpointsLock) Update(ler LeaderElectionRecord) error { el.e.Annotations = make(map[string]string) } el.e.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes) - el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Update(el.e) + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Update(context.TODO(), el.e) return err } diff --git a/tools/leaderelection/resourcelock/leaselock.go b/tools/leaderelection/resourcelock/leaselock.go index 74016b8d..5d46ae38 100644 --- a/tools/leaderelection/resourcelock/leaselock.go +++ b/tools/leaderelection/resourcelock/leaselock.go @@ -17,6 +17,7 @@ limitations under the License. package resourcelock import ( + "context" "encoding/json" "errors" "fmt" @@ -39,7 +40,7 @@ type LeaseLock struct { // Get returns the election record from a Lease spec func (ll *LeaseLock) Get() (*LeaderElectionRecord, []byte, error) { var err error - ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Get(ll.LeaseMeta.Name, metav1.GetOptions{}) + ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Get(context.TODO(), ll.LeaseMeta.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err } @@ -54,7 +55,7 @@ func (ll *LeaseLock) Get() (*LeaderElectionRecord, []byte, error) { // Create attempts to create a Lease func (ll *LeaseLock) Create(ler LeaderElectionRecord) error { var err error - ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Create(&coordinationv1.Lease{ + ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Create(context.TODO(), &coordinationv1.Lease{ ObjectMeta: metav1.ObjectMeta{ Name: ll.LeaseMeta.Name, Namespace: ll.LeaseMeta.Namespace, @@ -71,7 +72,7 @@ func (ll *LeaseLock) Update(ler LeaderElectionRecord) error { } ll.lease.Spec = LeaderElectionRecordToLeaseSpec(&ler) var err error - ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Update(ll.lease) + ll.lease, err = ll.Client.Leases(ll.LeaseMeta.Namespace).Update(context.TODO(), ll.lease) return err } diff --git a/tools/watch/informerwatcher_test.go b/tools/watch/informerwatcher_test.go index d6e1e8e2..b56980b7 100644 --- a/tools/watch/informerwatcher_test.go +++ b/tools/watch/informerwatcher_test.go @@ -226,10 +226,10 @@ func TestNewInformerWatcher(t *testing.T) { lw := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return fake.CoreV1().Secrets("").List(options) + return fake.CoreV1().Secrets("").List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return fake.CoreV1().Secrets("").Watch(options) + return fake.CoreV1().Secrets("").Watch(context.TODO(), options) }, } _, _, w, done := NewIndexerInformerWatcher(lw, &corev1.Secret{}) diff --git a/tools/watch/until_test.go b/tools/watch/until_test.go index 06231f26..e8ab6cab 100644 --- a/tools/watch/until_test.go +++ b/tools/watch/until_test.go @@ -237,10 +237,10 @@ func TestUntilWithSync(t *testing.T) { return &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return fakeclient.CoreV1().Secrets("").List(options) + return fakeclient.CoreV1().Secrets("").List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return fakeclient.CoreV1().Secrets("").Watch(options) + return fakeclient.CoreV1().Secrets("").Watch(context.TODO(), options) }, } }(), @@ -267,10 +267,10 @@ func TestUntilWithSync(t *testing.T) { return &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - return fakeclient.CoreV1().Secrets("").List(options) + return fakeclient.CoreV1().Secrets("").List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - return fakeclient.CoreV1().Secrets("").Watch(options) + return fakeclient.CoreV1().Secrets("").Watch(context.TODO(), options) }, } }(), diff --git a/util/certificate/csr/csr.go b/util/certificate/csr/csr.go index e36f2d3e..63862a13 100644 --- a/util/certificate/csr/csr.go +++ b/util/certificate/csr/csr.go @@ -62,12 +62,12 @@ func RequestCertificate(client certificatesclient.CertificateSigningRequestInter csr.GenerateName = "csr-" } - req, err = client.Create(csr) + req, err = client.Create(context.TODO(), csr) switch { case err == nil: case errors.IsAlreadyExists(err) && len(name) > 0: klog.Infof("csr for this node already exists, reusing") - req, err = client.Get(name, metav1.GetOptions{}) + req, err = client.Get(context.TODO(), name, metav1.GetOptions{}) if err != nil { return nil, formatError("cannot retrieve certificate signing request: %v", err) } @@ -87,11 +87,11 @@ func WaitForCertificate(ctx context.Context, client certificatesclient.Certifica lw := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.FieldSelector = fieldSelector - return client.List(options) + return client.List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = fieldSelector - return client.Watch(options) + return client.Watch(context.TODO(), options) }, } event, err := watchtools.UntilWithSync(