diff --git a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go index 1bbe8d88db4..e2d9e88e1c7 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go +++ b/staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go @@ -31,6 +31,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ExamplesGetter has a method to return a ExampleInterface. @@ -82,6 +83,16 @@ func (c *examples) Get(ctx context.Context, name string, options metav1.GetOptio // List takes label and field selectors, and returns the list of Examples that match those selectors. func (c *examples) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ExampleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for examples", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Examples that match those selectors. +func (c *examples) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ExampleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go index 3949426cb74..b69ff56e0d7 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go @@ -31,6 +31,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. @@ -81,6 +82,16 @@ func (c *customResourceDefinitions) Get(ctx context.Context, name string, option // List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. func (c *customResourceDefinitions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for customresourcedefinitions", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. +func (c *customResourceDefinitions) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CustomResourceDefinitionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go index 0e5b482a30b..a4f1cbd67dc 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go @@ -31,6 +31,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. @@ -81,6 +82,16 @@ func (c *customResourceDefinitions) Get(ctx context.Context, name string, option // List takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. func (c *customResourceDefinitions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for customresourcedefinitions", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CustomResourceDefinitions that match those selectors. +func (c *customResourceDefinitions) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CustomResourceDefinitionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index edbc826d19d..93eb62aa803 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface. @@ -79,6 +80,16 @@ func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, op // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for mutatingwebhookconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. +func (c *mutatingWebhookConfigurations) list(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go index 0b0b05acd41..9bd895051d8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface. @@ -81,6 +82,16 @@ func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. func (c *validatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicies", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *validatingAdmissionPolicies) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go index 83a8ef163d2..872bacc6504 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface. @@ -79,6 +80,16 @@ func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string // List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicybindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index 065e3c83414..585dc22deac 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface. @@ -79,6 +80,16 @@ func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, // List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. func (c *validatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingwebhookconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *validatingWebhookConfigurations) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go index 1d994b5abf7..dafd922379e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface. @@ -81,6 +82,16 @@ func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicies", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *validatingAdmissionPolicies) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go index 39823ca82b1..c8a6c768b8a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface. @@ -79,6 +80,16 @@ func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string // List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicybindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index ca6bb8bd503..8e1833448ca 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface. @@ -79,6 +80,16 @@ func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, op // List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for mutatingwebhookconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors. +func (c *mutatingWebhookConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go index bea51b587f6..2cb47362e80 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface. @@ -81,6 +82,16 @@ func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicies", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *validatingAdmissionPolicies) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go index bba37bb0477..6f05360790f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface. @@ -79,6 +80,16 @@ func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string // List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicybindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 5ba5974d7aa..671ec8116ea 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -31,6 +31,7 @@ import ( admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface. @@ -79,6 +80,16 @@ func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string, // List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. func (c *validatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingwebhookconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors. +func (c *validatingWebhookConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go index 18789c7f82a..7f0d60ce35f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go @@ -31,6 +31,7 @@ import ( apiserverinternalv1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StorageVersionsGetter has a method to return a StorageVersionInterface. @@ -81,6 +82,16 @@ func (c *storageVersions) Get(ctx context.Context, name string, options v1.GetOp // List takes label and field selectors, and returns the list of StorageVersions that match those selectors. func (c *storageVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for storageversions", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StorageVersions that match those selectors. +func (c *storageVersions) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go index f4b198265d6..6a12cc39827 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go @@ -31,6 +31,7 @@ import ( appsv1 "k8s.io/client-go/applyconfigurations/apps/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ControllerRevisionsGetter has a method to return a ControllerRevisionInterface. @@ -82,6 +83,16 @@ func (c *controllerRevisions) Get(ctx context.Context, name string, options meta // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. func (c *controllerRevisions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for controllerrevisions", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. +func (c *controllerRevisions) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go index 53e53928791..251d98e0bea 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go @@ -31,6 +31,7 @@ import ( appsv1 "k8s.io/client-go/applyconfigurations/apps/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -84,6 +85,16 @@ func (c *daemonSets) Get(ctx context.Context, name string, options metav1.GetOpt // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. func (c *daemonSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for daemonsets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *daemonSets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go index ccc2049ff7f..c97894f1560 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go @@ -33,6 +33,7 @@ import ( applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -90,6 +91,16 @@ func (c *deployments) Get(ctx context.Context, name string, options metav1.GetOp // List takes label and field selectors, and returns the list of Deployments that match those selectors. func (c *deployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *deployments) list(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go index 917ed521f4f..e28f784f945 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go @@ -33,6 +33,7 @@ import ( applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -90,6 +91,16 @@ func (c *replicaSets) Get(ctx context.Context, name string, options metav1.GetOp // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. func (c *replicaSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for replicasets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ReplicaSets that match those selectors. +func (c *replicaSets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go index d1fbb915d82..2e94e1a6a00 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go @@ -33,6 +33,7 @@ import ( applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -90,6 +91,16 @@ func (c *statefulSets) Get(ctx context.Context, name string, options metav1.GetO // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. func (c *statefulSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for statefulsets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *statefulSets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go index 0c3f49ba149..044101c9527 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -31,6 +31,7 @@ import ( appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ControllerRevisionsGetter has a method to return a ControllerRevisionInterface. @@ -82,6 +83,16 @@ func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.G // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for controllerrevisions", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. +func (c *controllerRevisions) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 281758c4351..47edb1c8f24 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -31,6 +31,7 @@ import ( appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -84,6 +85,16 @@ func (c *deployments) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of Deployments that match those selectors. func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index 3f1aebcffb3..e39d7cf5ecf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -31,6 +31,7 @@ import ( appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -84,6 +85,16 @@ func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for statefulsets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *statefulSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go index e1643277a62..9a97558ea54 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -31,6 +31,7 @@ import ( appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ControllerRevisionsGetter has a method to return a ControllerRevisionInterface. @@ -82,6 +83,16 @@ func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.G // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for controllerrevisions", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. +func (c *controllerRevisions) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go index 1391df87d21..2411dda802d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go @@ -31,6 +31,7 @@ import ( appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -84,6 +85,16 @@ func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for daemonsets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *daemonSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go index 5bda0d92c11..ced67eb0d82 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go @@ -31,6 +31,7 @@ import ( appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -84,6 +85,16 @@ func (c *deployments) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of Deployments that match those selectors. func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go index 988d898f79b..17f9a737d02 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go @@ -31,6 +31,7 @@ import ( appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -84,6 +85,16 @@ func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for replicasets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ReplicaSets that match those selectors. +func (c *replicaSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go index 0416675d6d8..0ddb1095f97 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go @@ -31,6 +31,7 @@ import ( appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -88,6 +89,16 @@ func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for statefulsets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StatefulSets that match those selectors. +func (c *statefulSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 19afde66db5..bba45318318 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -31,6 +31,7 @@ import ( autoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -84,6 +85,16 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. func (c *horizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) list(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go index 3a077d71dae..2eb1165e63e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go @@ -31,6 +31,7 @@ import ( autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -84,6 +85,16 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index 5080912a124..5912300c213 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -31,6 +31,7 @@ import ( autoscalingv2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -84,6 +85,16 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index 0ddb9108b3a..518e0c26a0f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -31,6 +31,7 @@ import ( autoscalingv2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -84,6 +85,16 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go index 9250263215e..a16ec5ba51d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/cronjob.go @@ -31,6 +31,7 @@ import ( batchv1 "k8s.io/client-go/applyconfigurations/batch/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CronJobsGetter has a method to return a CronJobInterface. @@ -84,6 +85,16 @@ func (c *cronJobs) Get(ctx context.Context, name string, options metav1.GetOptio // List takes label and field selectors, and returns the list of CronJobs that match those selectors. func (c *cronJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CronJobList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for cronjobs", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CronJobs that match those selectors. +func (c *cronJobs) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CronJobList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index c076c80af2a..6663bceb277 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -31,6 +31,7 @@ import ( batchv1 "k8s.io/client-go/applyconfigurations/batch/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // JobsGetter has a method to return a JobInterface. @@ -84,6 +85,16 @@ func (c *jobs) Get(ctx context.Context, name string, options metav1.GetOptions) // List takes label and field selectors, and returns the list of Jobs that match those selectors. func (c *jobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for jobs", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Jobs that match those selectors. +func (c *jobs) list(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go index d687339ae9d..0401f2249ad 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go @@ -31,6 +31,7 @@ import ( batchv1beta1 "k8s.io/client-go/applyconfigurations/batch/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CronJobsGetter has a method to return a CronJobInterface. @@ -84,6 +85,16 @@ func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of CronJobs that match those selectors. func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for cronjobs", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CronJobs that match those selectors. +func (c *cronJobs) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CronJobList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go index 0d6b68b2962..79c9daf3e50 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1/certificatesigningrequest.go @@ -31,6 +31,7 @@ import ( certificatesv1 "k8s.io/client-go/applyconfigurations/certificates/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -83,6 +84,16 @@ func (c *certificateSigningRequests) Get(ctx context.Context, name string, optio // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. func (c *certificateSigningRequests) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateSigningRequestList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for certificatesigningrequests", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *certificateSigningRequests) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateSigningRequestList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go index 970fb15e6e8..c4e0ca65a0f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go @@ -31,6 +31,7 @@ import ( certificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterTrustBundlesGetter has a method to return a ClusterTrustBundleInterface. @@ -79,6 +80,16 @@ func (c *clusterTrustBundles) Get(ctx context.Context, name string, options v1.G // List takes label and field selectors, and returns the list of ClusterTrustBundles that match those selectors. func (c *clusterTrustBundles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterTrustBundleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clustertrustbundles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterTrustBundles that match those selectors. +func (c *clusterTrustBundles) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterTrustBundleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index ec0b9d266fc..d88d4020c29 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -31,6 +31,7 @@ import ( certificatesv1beta1 "k8s.io/client-go/applyconfigurations/certificates/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -81,6 +82,16 @@ func (c *certificateSigningRequests) Get(ctx context.Context, name string, optio // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. func (c *certificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for certificatesigningrequests", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *certificateSigningRequests) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go index 9e6b169a811..032787c672c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1/lease.go @@ -31,6 +31,7 @@ import ( coordinationv1 "k8s.io/client-go/applyconfigurations/coordination/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // LeasesGetter has a method to return a LeaseInterface. @@ -82,6 +83,16 @@ func (c *leases) Get(ctx context.Context, name string, options metav1.GetOptions // List takes label and field selectors, and returns the list of Leases that match those selectors. func (c *leases) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LeaseList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for leases", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Leases that match those selectors. +func (c *leases) list(ctx context.Context, opts metav1.ListOptions) (result *v1.LeaseList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go index 1bbd57bdd1f..e6841ffd98e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go @@ -31,6 +31,7 @@ import ( coordinationv1beta1 "k8s.io/client-go/applyconfigurations/coordination/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // LeasesGetter has a method to return a LeaseInterface. @@ -82,6 +83,16 @@ func (c *leases) Get(ctx context.Context, name string, options v1.GetOptions) (r // List takes label and field selectors, and returns the list of Leases that match those selectors. func (c *leases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for leases", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Leases that match those selectors. +func (c *leases) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 0fef56429d3..f2ea72e4660 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ComponentStatusesGetter has a method to return a ComponentStatusInterface. @@ -79,6 +80,16 @@ func (c *componentStatuses) Get(ctx context.Context, name string, options metav1 // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. func (c *componentStatuses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for componentstatuses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. +func (c *componentStatuses) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index b68177720bf..27d19b8bd3e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -82,6 +83,16 @@ func (c *configMaps) Get(ctx context.Context, name string, options metav1.GetOpt // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. func (c *configMaps) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigMapList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for configmaps", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ConfigMaps that match those selectors. +func (c *configMaps) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigMapList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index cdf464b0695..cf811572baf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // EndpointsGetter has a method to return a EndpointsInterface. @@ -82,6 +83,16 @@ func (c *endpoints) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of Endpoints that match those selectors. func (c *endpoints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointsList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for endpoints", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Endpoints that match those selectors. +func (c *endpoints) list(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointsList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go index 8274d85ffe2..9873dbdb08e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // EventsGetter has a method to return a EventInterface. @@ -82,6 +83,16 @@ func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions // List takes label and field selectors, and returns the list of Events that match those selectors. func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for events", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Events that match those selectors. +func (c *events) list(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index e6883b607c7..92f6b2f545d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // LimitRangesGetter has a method to return a LimitRangeInterface. @@ -82,6 +83,16 @@ func (c *limitRanges) Get(ctx context.Context, name string, options metav1.GetOp // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. func (c *limitRanges) List(ctx context.Context, opts metav1.ListOptions) (result *v1.LimitRangeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for limitranges", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of LimitRanges that match those selectors. +func (c *limitRanges) list(ctx context.Context, opts metav1.ListOptions) (result *v1.LimitRangeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index 06c77b4c458..709d53ad859 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -80,6 +81,16 @@ func (c *namespaces) Get(ctx context.Context, name string, options metav1.GetOpt // List takes label and field selectors, and returns the list of Namespaces that match those selectors. func (c *namespaces) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NamespaceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for namespaces", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Namespaces that match those selectors. +func (c *namespaces) list(ctx context.Context, opts metav1.ListOptions) (result *v1.NamespaceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go index d9725b2f95e..4a4fc825cc9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // NodesGetter has a method to return a NodeInterface. @@ -81,6 +82,16 @@ func (c *nodes) Get(ctx context.Context, name string, options metav1.GetOptions) // List takes label and field selectors, and returns the list of Nodes that match those selectors. func (c *nodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NodeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for nodes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Nodes that match those selectors. +func (c *nodes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.NodeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index a8e22959771..63442dd9b00 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PersistentVolumesGetter has a method to return a PersistentVolumeInterface. @@ -81,6 +82,16 @@ func (c *persistentVolumes) Get(ctx context.Context, name string, options metav1 // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. func (c *persistentVolumes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PersistentVolumeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for persistentvolumes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. +func (c *persistentVolumes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PersistentVolumeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index 2e7f4fb44f6..3b3c61c6b77 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. @@ -84,6 +85,16 @@ func (c *persistentVolumeClaims) Get(ctx context.Context, name string, options m // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. func (c *persistentVolumeClaims) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for persistentvolumeclaims", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. +func (c *persistentVolumeClaims) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index 63122cf3fb4..a275bd2c78e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PodsGetter has a method to return a PodInterface. @@ -86,6 +87,16 @@ func (c *pods) Get(ctx context.Context, name string, options metav1.GetOptions) // List takes label and field selectors, and returns the list of Pods that match those selectors. func (c *pods) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for pods", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Pods that match those selectors. +func (c *pods) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PodList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index ff90fc0e629..f657046535a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PodTemplatesGetter has a method to return a PodTemplateInterface. @@ -82,6 +83,16 @@ func (c *podTemplates) Get(ctx context.Context, name string, options metav1.GetO // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. func (c *podTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodTemplateList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for podtemplates", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PodTemplates that match those selectors. +func (c *podTemplates) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PodTemplateList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index 49c75d967bb..1ff2371f1ec 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -32,6 +32,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ReplicationControllersGetter has a method to return a ReplicationControllerInterface. @@ -88,6 +89,16 @@ func (c *replicationControllers) Get(ctx context.Context, name string, options m // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. func (c *replicationControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicationControllerList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for replicationcontrollers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. +func (c *replicationControllers) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicationControllerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 8444d164edd..32d0e33ebdc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceQuotasGetter has a method to return a ResourceQuotaInterface. @@ -84,6 +85,16 @@ func (c *resourceQuotas) Get(ctx context.Context, name string, options metav1.Ge // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. func (c *resourceQuotas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ResourceQuotaList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourcequotas", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. +func (c *resourceQuotas) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ResourceQuotaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 4aba330381d..d0eee669180 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // SecretsGetter has a method to return a SecretInterface. @@ -82,6 +83,16 @@ func (c *secrets) Get(ctx context.Context, name string, options metav1.GetOption // List takes label and field selectors, and returns the list of Secrets that match those selectors. func (c *secrets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SecretList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for secrets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Secrets that match those selectors. +func (c *secrets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.SecretList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go index 3fe22ba4445..b87f5acdc91 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -31,6 +31,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ServicesGetter has a method to return a ServiceInterface. @@ -83,6 +84,16 @@ func (c *services) Get(ctx context.Context, name string, options metav1.GetOptio // List takes label and field selectors, and returns the list of Services that match those selectors. func (c *services) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for services", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Services that match those selectors. +func (c *services) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index bdf589b9608..ea08445ec43 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -32,6 +32,7 @@ import ( corev1 "k8s.io/client-go/applyconfigurations/core/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ServiceAccountsGetter has a method to return a ServiceAccountInterface. @@ -85,6 +86,16 @@ func (c *serviceAccounts) Get(ctx context.Context, name string, options metav1.G // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. func (c *serviceAccounts) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceAccountList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for serviceaccounts", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. +func (c *serviceAccounts) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceAccountList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go index 63e616b033b..eb9503bddc6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1/endpointslice.go @@ -31,6 +31,7 @@ import ( discoveryv1 "k8s.io/client-go/applyconfigurations/discovery/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // EndpointSlicesGetter has a method to return a EndpointSliceInterface. @@ -82,6 +83,16 @@ func (c *endpointSlices) Get(ctx context.Context, name string, options metav1.Ge // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. func (c *endpointSlices) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointSliceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for endpointslices", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of EndpointSlices that match those selectors. +func (c *endpointSlices) list(ctx context.Context, opts metav1.ListOptions) (result *v1.EndpointSliceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go index 2ade8330296..97f9bbb1e84 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1/endpointslice.go @@ -31,6 +31,7 @@ import ( discoveryv1beta1 "k8s.io/client-go/applyconfigurations/discovery/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // EndpointSlicesGetter has a method to return a EndpointSliceInterface. @@ -82,6 +83,16 @@ func (c *endpointSlices) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. func (c *endpointSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for endpointslices", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of EndpointSlices that match those selectors. +func (c *endpointSlices) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EndpointSliceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go index c9f2bbed501..b34940c804e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1/event.go @@ -31,6 +31,7 @@ import ( eventsv1 "k8s.io/client-go/applyconfigurations/events/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // EventsGetter has a method to return a EventInterface. @@ -82,6 +83,16 @@ func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions // List takes label and field selectors, and returns the list of Events that match those selectors. func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for events", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Events that match those selectors. +func (c *events) list(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go index dfdf8b89793..cc7174aa5dc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go @@ -31,6 +31,7 @@ import ( eventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // EventsGetter has a method to return a EventInterface. @@ -82,6 +83,16 @@ func (c *events) Get(ctx context.Context, name string, options v1.GetOptions) (r // List takes label and field selectors, and returns the list of Events that match those selectors. func (c *events) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for events", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Events that match those selectors. +func (c *events) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.EventList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index ffe219fdaac..128d585e3e9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -31,6 +31,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -84,6 +85,16 @@ func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for daemonsets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of DaemonSets that match those selectors. +func (c *daemonSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index c41d8dbc260..245e05ad93c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -31,6 +31,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -88,6 +89,16 @@ func (c *deployments) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of Deployments that match those selectors. func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Deployments that match those selectors. +func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index dd4012cc233..c5c0376c32c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -31,6 +31,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // IngressesGetter has a method to return a IngressInterface. @@ -84,6 +85,16 @@ func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of Ingresses that match those selectors. func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for ingresses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *ingresses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 978b26db033..9bbe4257966 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -31,6 +31,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // NetworkPoliciesGetter has a method to return a NetworkPolicyInterface. @@ -82,6 +83,16 @@ func (c *networkPolicies) Get(ctx context.Context, name string, options v1.GetOp // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. func (c *networkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for networkpolicies", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. +func (c *networkPolicies) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index 3c907a3a048..1ac971cfaec 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -31,6 +31,7 @@ import ( extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -88,6 +89,16 @@ func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for replicasets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ReplicaSets that match those selectors. +func (c *replicaSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/flowschema.go index bd36c5e6a4e..504338ea55d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/flowschema.go @@ -31,6 +31,7 @@ import ( flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // FlowSchemasGetter has a method to return a FlowSchemaInterface. @@ -81,6 +82,16 @@ func (c *flowSchemas) Get(ctx context.Context, name string, options metav1.GetOp // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. func (c *flowSchemas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FlowSchemaList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for flowschemas", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *flowSchemas) list(ctx context.Context, opts metav1.ListOptions) (result *v1.FlowSchemaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go index 797fe94035e..15328d0dc0a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go @@ -31,6 +31,7 @@ import ( flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityLevelConfigurationsGetter has a method to return a PriorityLevelConfigurationInterface. @@ -81,6 +82,16 @@ func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. func (c *priorityLevelConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PriorityLevelConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for prioritylevelconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *priorityLevelConfigurations) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PriorityLevelConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go index a9d38becf9b..b6a6ea58444 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/flowschema.go @@ -31,6 +31,7 @@ import ( flowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // FlowSchemasGetter has a method to return a FlowSchemaInterface. @@ -81,6 +82,16 @@ func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FlowSchemaList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for flowschemas", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *flowSchemas) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FlowSchemaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go index 41f35cbccd3..7dff545309f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -31,6 +31,7 @@ import ( flowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityLevelConfigurationsGetter has a method to return a PriorityLevelConfigurationInterface. @@ -81,6 +82,16 @@ func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityLevelConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for prioritylevelconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *priorityLevelConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityLevelConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go index 3a1f12b6a28..326405096e1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/flowschema.go @@ -31,6 +31,7 @@ import ( flowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // FlowSchemasGetter has a method to return a FlowSchemaInterface. @@ -81,6 +82,16 @@ func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.FlowSchemaList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for flowschemas", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *flowSchemas) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.FlowSchemaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go index f028869f172..a1621fc2daa 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -31,6 +31,7 @@ import ( flowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityLevelConfigurationsGetter has a method to return a PriorityLevelConfigurationInterface. @@ -81,6 +82,16 @@ func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.PriorityLevelConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for prioritylevelconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *priorityLevelConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.PriorityLevelConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/flowschema.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/flowschema.go index 5fa39d6bafa..93bd3553217 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/flowschema.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/flowschema.go @@ -31,6 +31,7 @@ import ( flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // FlowSchemasGetter has a method to return a FlowSchemaInterface. @@ -81,6 +82,16 @@ func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta3.FlowSchemaList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for flowschemas", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of FlowSchemas that match those selectors. +func (c *flowSchemas) list(ctx context.Context, opts v1.ListOptions) (result *v1beta3.FlowSchemaList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go index 49f05257c9b..d419be5f8a8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go @@ -31,6 +31,7 @@ import ( flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityLevelConfigurationsGetter has a method to return a PriorityLevelConfigurationInterface. @@ -81,6 +82,16 @@ func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, opti // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta3.PriorityLevelConfigurationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for prioritylevelconfigurations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. +func (c *priorityLevelConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta3.PriorityLevelConfigurationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go index 9923d6cbae1..dbdf32b90cc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingress.go @@ -31,6 +31,7 @@ import ( networkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // IngressesGetter has a method to return a IngressInterface. @@ -84,6 +85,16 @@ func (c *ingresses) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of Ingresses that match those selectors. func (c *ingresses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for ingresses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *ingresses) list(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go index 16c8e48bf0b..4ca832c90b7 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/ingressclass.go @@ -31,6 +31,7 @@ import ( networkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // IngressClassesGetter has a method to return a IngressClassInterface. @@ -79,6 +80,16 @@ func (c *ingressClasses) Get(ctx context.Context, name string, options metav1.Ge // List takes label and field selectors, and returns the list of IngressClasses that match those selectors. func (c *ingressClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for ingressclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *ingressClasses) list(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index d7454ce1452..1fd8bd03477 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -31,6 +31,7 @@ import ( networkingv1 "k8s.io/client-go/applyconfigurations/networking/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // NetworkPoliciesGetter has a method to return a NetworkPolicyInterface. @@ -82,6 +83,16 @@ func (c *networkPolicies) Get(ctx context.Context, name string, options metav1.G // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. func (c *networkPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for networkpolicies", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. +func (c *networkPolicies) list(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go index fff193d68d1..fcf63fc85ea 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go @@ -31,6 +31,7 @@ import ( networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // IPAddressesGetter has a method to return a IPAddressInterface. @@ -79,6 +80,16 @@ func (c *iPAddresses) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of IPAddresses that match those selectors. func (c *iPAddresses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IPAddressList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for ipaddresses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of IPAddresses that match those selectors. +func (c *iPAddresses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IPAddressList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go index 100f290a19f..392f30d2e36 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go @@ -31,6 +31,7 @@ import ( networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ServiceCIDRsGetter has a method to return a ServiceCIDRInterface. @@ -81,6 +82,16 @@ func (c *serviceCIDRs) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of ServiceCIDRs that match those selectors. func (c *serviceCIDRs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServiceCIDRList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for servicecidrs", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ServiceCIDRs that match those selectors. +func (c *serviceCIDRs) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServiceCIDRList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go index b309281afaa..92df698e8d1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingress.go @@ -31,6 +31,7 @@ import ( networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // IngressesGetter has a method to return a IngressInterface. @@ -84,6 +85,16 @@ func (c *ingresses) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of Ingresses that match those selectors. func (c *ingresses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for ingresses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Ingresses that match those selectors. +func (c *ingresses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go index 50ccdfdbbaf..577a4d87e25 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/networking/v1beta1/ingressclass.go @@ -31,6 +31,7 @@ import ( networkingv1beta1 "k8s.io/client-go/applyconfigurations/networking/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // IngressClassesGetter has a method to return a IngressClassInterface. @@ -79,6 +80,16 @@ func (c *ingressClasses) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of IngressClasses that match those selectors. func (c *ingressClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for ingressclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of IngressClasses that match those selectors. +func (c *ingressClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.IngressClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go index 5ec38b203e3..c8911b1e676 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1/runtimeclass.go @@ -31,6 +31,7 @@ import ( nodev1 "k8s.io/client-go/applyconfigurations/node/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RuntimeClassesGetter has a method to return a RuntimeClassInterface. @@ -79,6 +80,16 @@ func (c *runtimeClasses) Get(ctx context.Context, name string, options metav1.Ge // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. func (c *runtimeClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RuntimeClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for runtimeclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. +func (c *runtimeClasses) list(ctx context.Context, opts metav1.ListOptions) (result *v1.RuntimeClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go index 039a7ace159..c9fdaae5ade 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go @@ -31,6 +31,7 @@ import ( nodev1alpha1 "k8s.io/client-go/applyconfigurations/node/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RuntimeClassesGetter has a method to return a RuntimeClassInterface. @@ -79,6 +80,16 @@ func (c *runtimeClasses) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. func (c *runtimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for runtimeclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. +func (c *runtimeClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go index f8990adf1ee..341a1e0969c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go @@ -31,6 +31,7 @@ import ( nodev1beta1 "k8s.io/client-go/applyconfigurations/node/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RuntimeClassesGetter has a method to return a RuntimeClassInterface. @@ -79,6 +80,16 @@ func (c *runtimeClasses) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. func (c *runtimeClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for runtimeclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of RuntimeClasses that match those selectors. +func (c *runtimeClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go index 58db3acf9ec..37d93a2b254 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1/poddisruptionbudget.go @@ -31,6 +31,7 @@ import ( policyv1 "k8s.io/client-go/applyconfigurations/policy/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -84,6 +85,16 @@ func (c *podDisruptionBudgets) Get(ctx context.Context, name string, options met // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. func (c *podDisruptionBudgets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PodDisruptionBudgetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for poddisruptionbudgets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. +func (c *podDisruptionBudgets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PodDisruptionBudgetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 16872899213..86fa7a689d2 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -31,6 +31,7 @@ import ( policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -84,6 +85,16 @@ func (c *podDisruptionBudgets) Get(ctx context.Context, name string, options v1. // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. func (c *podDisruptionBudgets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for poddisruptionbudgets", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. +func (c *podDisruptionBudgets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go index 000d737f0ff..c072389a70d 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go @@ -31,6 +31,7 @@ import ( rbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -79,6 +80,16 @@ func (c *clusterRoles) Get(ctx context.Context, name string, options metav1.GetO // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. func (c *clusterRoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clusterroles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *clusterRoles) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go index 31db43d9848..09003ceb24e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -31,6 +31,7 @@ import ( rbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -79,6 +80,16 @@ func (c *clusterRoleBindings) Get(ctx context.Context, name string, options meta // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. func (c *clusterRoleBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clusterrolebindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *clusterRoleBindings) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go index 93810a3ffaa..fd2b92c0336 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go @@ -31,6 +31,7 @@ import ( rbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RolesGetter has a method to return a RoleInterface. @@ -82,6 +83,16 @@ func (c *roles) Get(ctx context.Context, name string, options metav1.GetOptions) // List takes label and field selectors, and returns the list of Roles that match those selectors. func (c *roles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for roles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *roles) list(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go index 2ace9386049..567c4b51c7c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go @@ -31,6 +31,7 @@ import ( rbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -82,6 +83,16 @@ func (c *roleBindings) Get(ctx context.Context, name string, options metav1.GetO // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. func (c *roleBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for rolebindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *roleBindings) list(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index d6d30e99ef8..b8021be3ad6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -31,6 +31,7 @@ import ( rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -79,6 +80,16 @@ func (c *clusterRoles) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. func (c *clusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clusterroles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *clusterRoles) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 2eded92ac2b..f55f7db39cb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -31,6 +31,7 @@ import ( rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -79,6 +80,16 @@ func (c *clusterRoleBindings) Get(ctx context.Context, name string, options v1.G // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. func (c *clusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clusterrolebindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *clusterRoleBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 43c16fde74f..babc5d245dc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -31,6 +31,7 @@ import ( rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RolesGetter has a method to return a RoleInterface. @@ -82,6 +83,16 @@ func (c *roles) Get(ctx context.Context, name string, options v1.GetOptions) (re // List takes label and field selectors, and returns the list of Roles that match those selectors. func (c *roles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for roles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *roles) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index 3129c9b4e8a..1804457ea30 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -31,6 +31,7 @@ import ( rbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -82,6 +83,16 @@ func (c *roleBindings) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. func (c *roleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for rolebindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *roleBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go index a3d67f0315e..e61f4ce3753 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -31,6 +31,7 @@ import ( rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -79,6 +80,16 @@ func (c *clusterRoles) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. func (c *clusterRoles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clusterroles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *clusterRoles) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index ae39cbb9ae6..a80e99be31f 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -31,6 +31,7 @@ import ( rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -79,6 +80,16 @@ func (c *clusterRoleBindings) Get(ctx context.Context, name string, options v1.G // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. func (c *clusterRoleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clusterrolebindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *clusterRoleBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go index e789e42fe76..2dbb713d540 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -31,6 +31,7 @@ import ( rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RolesGetter has a method to return a RoleInterface. @@ -82,6 +83,16 @@ func (c *roles) Get(ctx context.Context, name string, options v1.GetOptions) (re // List takes label and field selectors, and returns the list of Roles that match those selectors. func (c *roles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for roles", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *roles) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go index 1461ba3b6eb..dfb60abc446 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -31,6 +31,7 @@ import ( rbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -82,6 +83,16 @@ func (c *roleBindings) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. func (c *roleBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for rolebindings", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *roleBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go index 72e81a29e31..f5158bb63dc 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PodSchedulingContextsGetter has a method to return a PodSchedulingContextInterface. @@ -84,6 +85,16 @@ func (c *podSchedulingContexts) Get(ctx context.Context, name string, options v1 // List takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors. func (c *podSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingContextList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for podschedulingcontexts", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors. +func (c *podSchedulingContexts) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingContextList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go index cfb27c9db68..bd1e574f467 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceClaimsGetter has a method to return a ResourceClaimInterface. @@ -84,6 +85,16 @@ func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of ResourceClaims that match those selectors. func (c *resourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourceclaims", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceClaims that match those selectors. +func (c *resourceClaims) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go index d08afcb611b..4f37f1672b3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface. @@ -82,6 +83,16 @@ func (c *resourceClaimParameters) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. func (c *resourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourceclaimparameters", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *resourceClaimParameters) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go index 3f4e3200642..b9d7ab8333c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceClaimTemplatesGetter has a method to return a ResourceClaimTemplateInterface. @@ -82,6 +83,16 @@ func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v // List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors. func (c *resourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourceclaimtemplates", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors. +func (c *resourceClaimTemplates) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go index 95a4ac5668e..6a30db0bfda 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceClassesGetter has a method to return a ResourceClassInterface. @@ -79,6 +80,16 @@ func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOp // List takes label and field selectors, and returns the list of ResourceClasses that match those selectors. func (c *resourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourceclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceClasses that match those selectors. +func (c *resourceClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go index 8ac9be0784a..7603c8b05f3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface. @@ -82,6 +83,16 @@ func (c *resourceClassParameters) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. func (c *resourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourceclassparameters", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *resourceClassParameters) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go index 302f370d525..29440c57945 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go @@ -31,6 +31,7 @@ import ( resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // ResourceSlicesGetter has a method to return a ResourceSliceInterface. @@ -79,6 +80,16 @@ func (c *resourceSlices) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of ResourceSlices that match those selectors. func (c *resourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for resourceslices", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ResourceSlices that match those selectors. +func (c *resourceSlices) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go index c68ec5da414..c7eb4c61673 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1/priorityclass.go @@ -31,6 +31,7 @@ import ( schedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityClassesGetter has a method to return a PriorityClassInterface. @@ -79,6 +80,16 @@ func (c *priorityClasses) Get(ctx context.Context, name string, options metav1.G // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. func (c *priorityClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PriorityClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for priorityclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *priorityClasses) list(ctx context.Context, opts metav1.ListOptions) (result *v1.PriorityClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index a9b8c19c78a..40ce3437958 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -31,6 +31,7 @@ import ( schedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityClassesGetter has a method to return a PriorityClassInterface. @@ -79,6 +80,16 @@ func (c *priorityClasses) Get(ctx context.Context, name string, options v1.GetOp // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. func (c *priorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for priorityclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *priorityClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 155476e4c72..d22d9bafc51 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -31,6 +31,7 @@ import ( schedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // PriorityClassesGetter has a method to return a PriorityClassInterface. @@ -79,6 +80,16 @@ func (c *priorityClasses) Get(ctx context.Context, name string, options v1.GetOp // List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. func (c *priorityClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for priorityclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *priorityClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go index d9dc4151e21..afb10669315 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csidriver.go @@ -31,6 +31,7 @@ import ( storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSIDriversGetter has a method to return a CSIDriverInterface. @@ -79,6 +80,16 @@ func (c *cSIDrivers) Get(ctx context.Context, name string, options metav1.GetOpt // List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. func (c *cSIDrivers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIDriverList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csidrivers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSIDrivers that match those selectors. +func (c *cSIDrivers) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIDriverList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go index 17dbc8c1c8f..4d5ce7899bf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csinode.go @@ -31,6 +31,7 @@ import ( storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSINodesGetter has a method to return a CSINodeInterface. @@ -79,6 +80,16 @@ func (c *cSINodes) Get(ctx context.Context, name string, options metav1.GetOptio // List takes label and field selectors, and returns the list of CSINodes that match those selectors. func (c *cSINodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSINodeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csinodes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSINodes that match those selectors. +func (c *cSINodes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CSINodeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go index 6bb50e0da98..4c3e1f249a8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go @@ -31,6 +31,7 @@ import ( storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface. @@ -82,6 +83,16 @@ func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options met // List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. func (c *cSIStorageCapacities) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIStorageCapacityList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csistoragecapacities", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *cSIStorageCapacities) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIStorageCapacityList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go index 8e97d90a0f3..cce61b2c066 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -31,6 +31,7 @@ import ( storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -79,6 +80,16 @@ func (c *storageClasses) Get(ctx context.Context, name string, options metav1.Ge // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. func (c *storageClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StorageClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for storageclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StorageClasses that match those selectors. +func (c *storageClasses) list(ctx context.Context, opts metav1.ListOptions) (result *v1.StorageClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go index c1dbec84f47..c29fe448660 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/volumeattachment.go @@ -31,6 +31,7 @@ import ( storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface. @@ -81,6 +82,16 @@ func (c *volumeAttachments) Get(ctx context.Context, name string, options metav1 // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. func (c *volumeAttachments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.VolumeAttachmentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for volumeattachments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. +func (c *volumeAttachments) list(ctx context.Context, opts metav1.ListOptions) (result *v1.VolumeAttachmentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go index bf5d64dddcb..2d464baa6f3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go @@ -31,6 +31,7 @@ import ( storagev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface. @@ -82,6 +83,16 @@ func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options v1. // List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. func (c *cSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csistoragecapacities", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *cSIStorageCapacities) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go index 58abb748f9e..69aa9d8a279 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -31,6 +31,7 @@ import ( storagev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface. @@ -81,6 +82,16 @@ func (c *volumeAttachments) Get(ctx context.Context, name string, options v1.Get // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. func (c *volumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for volumeattachments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. +func (c *volumeAttachments) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttachmentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go index 6633a4dc150..e049d94b2c6 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go @@ -31,6 +31,7 @@ import ( storagev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // VolumeAttributesClassesGetter has a method to return a VolumeAttributesClassInterface. @@ -79,6 +80,16 @@ func (c *volumeAttributesClasses) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of VolumeAttributesClasses that match those selectors. func (c *volumeAttributesClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttributesClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for volumeattributesclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of VolumeAttributesClasses that match those selectors. +func (c *volumeAttributesClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttributesClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go index 04e677db059..861a9c0512a 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csidriver.go @@ -31,6 +31,7 @@ import ( storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSIDriversGetter has a method to return a CSIDriverInterface. @@ -79,6 +80,16 @@ func (c *cSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions // List takes label and field selectors, and returns the list of CSIDrivers that match those selectors. func (c *cSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csidrivers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSIDrivers that match those selectors. +func (c *cSIDrivers) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIDriverList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go index c3760b5ce5c..effe3d98a02 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csinode.go @@ -31,6 +31,7 @@ import ( storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSINodesGetter has a method to return a CSINodeInterface. @@ -79,6 +80,16 @@ func (c *cSINodes) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of CSINodes that match those selectors. func (c *cSINodes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csinodes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSINodes that match those selectors. +func (c *cSINodes) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSINodeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go index 98ba936dc44..eb4e044556e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/csistoragecapacity.go @@ -31,6 +31,7 @@ import ( storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface. @@ -82,6 +83,16 @@ func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options v1. // List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. func (c *cSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIStorageCapacityList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for csistoragecapacities", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. +func (c *cSIStorageCapacities) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CSIStorageCapacityList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index 9b4ef231c89..b38a78db6cb 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -31,6 +31,7 @@ import ( storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -79,6 +80,16 @@ func (c *storageClasses) Get(ctx context.Context, name string, options v1.GetOpt // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. func (c *storageClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for storageclasses", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StorageClasses that match those selectors. +func (c *storageClasses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go index 35a8b64fcc3..e82276772c0 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -31,6 +31,7 @@ import ( storagev1beta1 "k8s.io/client-go/applyconfigurations/storage/v1beta1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // VolumeAttachmentsGetter has a method to return a VolumeAttachmentInterface. @@ -81,6 +82,16 @@ func (c *volumeAttachments) Get(ctx context.Context, name string, options v1.Get // List takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. func (c *volumeAttachments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for volumeattachments", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of VolumeAttachments that match those selectors. +func (c *volumeAttachments) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VolumeAttachmentList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go b/staging/src/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go index be66a5b9463..17fe4ac2ee4 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go @@ -31,6 +31,7 @@ import ( storagemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1" scheme "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" ) // StorageVersionMigrationsGetter has a method to return a StorageVersionMigrationInterface. @@ -81,6 +82,16 @@ func (c *storageVersionMigrations) Get(ctx context.Context, name string, options // List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. func (c *storageVersionMigrations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionMigrationList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for storageversionmigrations", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. +func (c *storageVersionMigrations) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionMigrationList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go index 145b4a97ccd..dcdc5277279 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/clustertesttype.go @@ -29,6 +29,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/HyphenGroup/apis/example/v1" examplev1 "k8s.io/code-generator/examples/HyphenGroup/applyconfiguration/example/v1" scheme "k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/scheme" @@ -85,6 +86,16 @@ func (c *clusterTestTypes) Get(ctx context.Context, name string, options metav1. // List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. func (c *clusterTestTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clustertesttypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. +func (c *clusterTestTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go index 5f4d2476c08..159898a2599 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/typed/example/v1/testtype.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/HyphenGroup/apis/example/v1" examplev1 "k8s.io/code-generator/examples/HyphenGroup/applyconfiguration/example/v1" scheme "k8s.io/code-generator/examples/HyphenGroup/clientset/versioned/scheme" @@ -84,6 +85,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go index 74d41c55623..e545083f425 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/clustertesttype.go @@ -29,6 +29,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/MixedCase/apis/example/v1" examplev1 "k8s.io/code-generator/examples/MixedCase/applyconfiguration/example/v1" scheme "k8s.io/code-generator/examples/MixedCase/clientset/versioned/scheme" @@ -86,6 +87,16 @@ func (c *clusterTestTypes) Get(ctx context.Context, name string, options metav1. // List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. func (c *clusterTestTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clustertesttypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. +func (c *clusterTestTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go index c5a7532948e..cdc50114037 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/clientset/versioned/typed/example/v1/testtype.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/MixedCase/apis/example/v1" examplev1 "k8s.io/code-generator/examples/MixedCase/applyconfiguration/example/v1" scheme "k8s.io/code-generator/examples/MixedCase/clientset/versioned/scheme" @@ -84,6 +85,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go index 450e107a4ef..e0e3712febe 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example/v1/testtype.go @@ -26,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/apiserver/apis/example/v1" scheme "k8s.io/code-generator/examples/apiserver/clientset/versioned/scheme" ) @@ -79,6 +80,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go index da6ea8676b0..792855c3ae2 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go @@ -26,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/apiserver/apis/example2/v1" scheme "k8s.io/code-generator/examples/apiserver/clientset/versioned/scheme" ) @@ -79,6 +80,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go index a4067ea72b0..dabc3780d95 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/clientset/versioned/typed/example3.io/v1/testtype.go @@ -26,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/apiserver/apis/example3.io/v1" scheme "k8s.io/code-generator/examples/apiserver/clientset/versioned/scheme" ) @@ -79,6 +80,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go index 2486900eb90..c7848650784 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go @@ -29,6 +29,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/crd/apis/example/v1" examplev1 "k8s.io/code-generator/examples/crd/applyconfiguration/example/v1" scheme "k8s.io/code-generator/examples/crd/clientset/versioned/scheme" @@ -85,6 +86,16 @@ func (c *clusterTestTypes) Get(ctx context.Context, name string, options metav1. // List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. func (c *clusterTestTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for clustertesttypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. +func (c *clusterTestTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go index 0231630f7d7..a084503e05a 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example/v1/testtype.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/crd/apis/example/v1" examplev1 "k8s.io/code-generator/examples/crd/applyconfiguration/example/v1" scheme "k8s.io/code-generator/examples/crd/clientset/versioned/scheme" @@ -84,6 +85,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go index c683a03f663..2f05df5ff23 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go +++ b/staging/src/k8s.io/code-generator/examples/crd/clientset/versioned/typed/example2/v1/testtype.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/code-generator/examples/crd/apis/example2/v1" example2v1 "k8s.io/code-generator/examples/crd/applyconfiguration/example2/v1" scheme "k8s.io/code-generator/examples/crd/clientset/versioned/scheme" @@ -84,6 +85,16 @@ func (c *testTypes) Get(ctx context.Context, name string, options metav1.GetOpti // List takes label and field selectors, and returns the list of TestTypes that match those selectors. func (c *testTypes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for testtypes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of TestTypes that match those selectors. +func (c *testTypes) list(ctx context.Context, opts metav1.ListOptions) (result *v1.TestTypeList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go index 25bf6ea44b9..de84130c139 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go @@ -26,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" scheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" ) @@ -76,6 +77,16 @@ func (c *aPIServices) Get(ctx context.Context, name string, options metav1.GetOp // List takes label and field selectors, and returns the list of APIServices that match those selectors. func (c *aPIServices) List(ctx context.Context, opts metav1.ListOptions) (result *v1.APIServiceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for apiservices", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of APIServices that match those selectors. +func (c *aPIServices) list(ctx context.Context, opts metav1.ListOptions) (result *v1.APIServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go index a5e76412e1d..3097f3ab01f 100644 --- a/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go +++ b/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1beta1/apiservice.go @@ -26,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" scheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" ) @@ -76,6 +77,16 @@ func (c *aPIServices) Get(ctx context.Context, name string, options v1.GetOption // List takes label and field selectors, and returns the list of APIServices that match those selectors. func (c *aPIServices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.APIServiceList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for apiservices", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of APIServices that match those selectors. +func (c *aPIServices) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.APIServiceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go index d79163ddb81..6b4ee30f772 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/nodemetrics.go @@ -25,6 +25,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" scheme "k8s.io/metrics/pkg/client/clientset/versioned/scheme" ) @@ -69,6 +70,16 @@ func (c *nodeMetricses) Get(ctx context.Context, name string, options v1.GetOpti // List takes label and field selectors, and returns the list of NodeMetricses that match those selectors. func (c *nodeMetricses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NodeMetricsList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for nodes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of NodeMetricses that match those selectors. +func (c *nodeMetricses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NodeMetricsList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go index 49d57c8e887..25d77344cfb 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/podmetrics.go @@ -25,6 +25,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1alpha1 "k8s.io/metrics/pkg/apis/metrics/v1alpha1" scheme "k8s.io/metrics/pkg/client/clientset/versioned/scheme" ) @@ -72,6 +73,16 @@ func (c *podMetricses) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of PodMetricses that match those selectors. func (c *podMetricses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodMetricsList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for pods", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PodMetricses that match those selectors. +func (c *podMetricses) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodMetricsList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go index a312221ed25..900428e3169 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/nodemetrics.go @@ -25,6 +25,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" scheme "k8s.io/metrics/pkg/client/clientset/versioned/scheme" ) @@ -69,6 +70,16 @@ func (c *nodeMetricses) Get(ctx context.Context, name string, options v1.GetOpti // List takes label and field selectors, and returns the list of NodeMetricses that match those selectors. func (c *nodeMetricses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NodeMetricsList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for nodes", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of NodeMetricses that match those selectors. +func (c *nodeMetricses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NodeMetricsList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go index e66c377c25b..7f43574ac92 100644 --- a/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go +++ b/staging/src/k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/podmetrics.go @@ -25,6 +25,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1" scheme "k8s.io/metrics/pkg/client/clientset/versioned/scheme" ) @@ -72,6 +73,16 @@ func (c *podMetricses) Get(ctx context.Context, name string, options v1.GetOptio // List takes label and field selectors, and returns the list of PodMetricses that match those selectors. func (c *podMetricses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodMetricsList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for pods", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of PodMetricses that match those selectors. +func (c *podMetricses) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodMetricsList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go index 57d5546f820..d6e8ec56ac6 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/fischer.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1alpha1 "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1" wardlev1alpha1 "k8s.io/sample-apiserver/pkg/generated/applyconfiguration/wardle/v1alpha1" scheme "k8s.io/sample-apiserver/pkg/generated/clientset/versioned/scheme" @@ -79,6 +80,16 @@ func (c *fischers) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of Fischers that match those selectors. func (c *fischers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FischerList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for fischers", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Fischers that match those selectors. +func (c *fischers) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FischerList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go index d5cb97abf0c..3c80e07c1df 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1alpha1/flunder.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1alpha1 "k8s.io/sample-apiserver/pkg/apis/wardle/v1alpha1" wardlev1alpha1 "k8s.io/sample-apiserver/pkg/generated/applyconfiguration/wardle/v1alpha1" scheme "k8s.io/sample-apiserver/pkg/generated/clientset/versioned/scheme" @@ -84,6 +85,16 @@ func (c *flunders) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of Flunders that match those selectors. func (c *flunders) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlunderList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for flunders", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Flunders that match those selectors. +func (c *flunders) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlunderList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go index c3b1c646c75..88bfddf13a1 100644 --- a/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go +++ b/staging/src/k8s.io/sample-apiserver/pkg/generated/clientset/versioned/typed/wardle/v1beta1/flunder.go @@ -28,6 +28,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1beta1 "k8s.io/sample-apiserver/pkg/apis/wardle/v1beta1" wardlev1beta1 "k8s.io/sample-apiserver/pkg/generated/applyconfiguration/wardle/v1beta1" scheme "k8s.io/sample-apiserver/pkg/generated/clientset/versioned/scheme" @@ -84,6 +85,16 @@ func (c *flunders) Get(ctx context.Context, name string, options v1.GetOptions) // List takes label and field selectors, and returns the list of Flunders that match those selectors. func (c *flunders) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FlunderList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for flunders", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Flunders that match those selectors. +func (c *flunders) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FlunderList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second diff --git a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go index ab190b2fa73..d09fd325a44 100644 --- a/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go +++ b/staging/src/k8s.io/sample-controller/pkg/generated/clientset/versioned/typed/samplecontroller/v1alpha1/foo.go @@ -26,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + consistencydetector "k8s.io/client-go/util/consistencydetector" v1alpha1 "k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1" scheme "k8s.io/sample-controller/pkg/generated/clientset/versioned/scheme" ) @@ -79,6 +80,16 @@ func (c *foos) Get(ctx context.Context, name string, options v1.GetOptions) (res // List takes label and field selectors, and returns the list of Foos that match those selectors. func (c *foos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FooList, err error) { + defer func() { + if err == nil { + consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for foos", c.list, opts, result) + } + }() + return c.list(ctx, opts) +} + +// list takes label and field selectors, and returns the list of Foos that match those selectors. +func (c *foos) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FooList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second