diff --git a/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go index edbc826d..93eb62aa 100644 --- a/kubernetes/typed/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/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/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go b/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go index 0b0b05ac..9bd89505 100644 --- a/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go +++ b/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/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go b/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go index 83a8ef16..872bacc6 100644 --- a/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go +++ b/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/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go index 065e3c83..585dc22d 100644 --- a/kubernetes/typed/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/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/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go b/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go index 1d994b5a..dafd9223 100644 --- a/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicy.go +++ b/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/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go b/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go index 39823ca8..c8a6c768 100644 --- a/kubernetes/typed/admissionregistration/v1alpha1/validatingadmissionpolicybinding.go +++ b/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/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index ca6bb8bd..8e183344 100644 --- a/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/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/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go b/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go index bea51b58..2cb47362 100644 --- a/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go +++ b/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/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go b/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go index bba37bb0..6f053607 100644 --- a/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go +++ b/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/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 5ba5974d..671ec811 100644 --- a/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/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/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go b/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go index 18789c7f..7f0d60ce 100644 --- a/kubernetes/typed/apiserverinternal/v1alpha1/storageversion.go +++ b/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/kubernetes/typed/apps/v1/controllerrevision.go b/kubernetes/typed/apps/v1/controllerrevision.go index f4b19826..6a12cc39 100644 --- a/kubernetes/typed/apps/v1/controllerrevision.go +++ b/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/kubernetes/typed/apps/v1/daemonset.go b/kubernetes/typed/apps/v1/daemonset.go index 53e53928..251d98e0 100644 --- a/kubernetes/typed/apps/v1/daemonset.go +++ b/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/kubernetes/typed/apps/v1/deployment.go b/kubernetes/typed/apps/v1/deployment.go index ccc2049f..c97894f1 100644 --- a/kubernetes/typed/apps/v1/deployment.go +++ b/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/kubernetes/typed/apps/v1/replicaset.go b/kubernetes/typed/apps/v1/replicaset.go index 917ed521..e28f784f 100644 --- a/kubernetes/typed/apps/v1/replicaset.go +++ b/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/kubernetes/typed/apps/v1/statefulset.go b/kubernetes/typed/apps/v1/statefulset.go index d1fbb915..2e94e1a6 100644 --- a/kubernetes/typed/apps/v1/statefulset.go +++ b/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/kubernetes/typed/apps/v1beta1/controllerrevision.go b/kubernetes/typed/apps/v1beta1/controllerrevision.go index 0c3f49ba..044101c9 100644 --- a/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/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/kubernetes/typed/apps/v1beta1/deployment.go b/kubernetes/typed/apps/v1beta1/deployment.go index 281758c4..47edb1c8 100644 --- a/kubernetes/typed/apps/v1beta1/deployment.go +++ b/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/kubernetes/typed/apps/v1beta1/statefulset.go b/kubernetes/typed/apps/v1beta1/statefulset.go index 3f1aebcf..e39d7cf5 100644 --- a/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/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/kubernetes/typed/apps/v1beta2/controllerrevision.go b/kubernetes/typed/apps/v1beta2/controllerrevision.go index e1643277..9a97558e 100644 --- a/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/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/kubernetes/typed/apps/v1beta2/daemonset.go b/kubernetes/typed/apps/v1beta2/daemonset.go index 1391df87..2411dda8 100644 --- a/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/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/kubernetes/typed/apps/v1beta2/deployment.go b/kubernetes/typed/apps/v1beta2/deployment.go index 5bda0d92..ced67eb0 100644 --- a/kubernetes/typed/apps/v1beta2/deployment.go +++ b/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/kubernetes/typed/apps/v1beta2/replicaset.go b/kubernetes/typed/apps/v1beta2/replicaset.go index 988d898f..17f9a737 100644 --- a/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/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/kubernetes/typed/apps/v1beta2/statefulset.go b/kubernetes/typed/apps/v1beta2/statefulset.go index 0416675d..0ddb1095 100644 --- a/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/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/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 19afde66..bba45318 100644 --- a/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/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/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go index 3a077d71..2eb1165e 100644 --- a/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go +++ b/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/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index 5080912a..5912300c 100644 --- a/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/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/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go b/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go index 0ddb9108..518e0c26 100644 --- a/kubernetes/typed/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/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/kubernetes/typed/batch/v1/cronjob.go b/kubernetes/typed/batch/v1/cronjob.go index 92502632..a16ec5ba 100644 --- a/kubernetes/typed/batch/v1/cronjob.go +++ b/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/kubernetes/typed/batch/v1/job.go b/kubernetes/typed/batch/v1/job.go index c076c80a..6663bceb 100644 --- a/kubernetes/typed/batch/v1/job.go +++ b/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/kubernetes/typed/batch/v1beta1/cronjob.go b/kubernetes/typed/batch/v1beta1/cronjob.go index d687339a..0401f224 100644 --- a/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/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/kubernetes/typed/certificates/v1/certificatesigningrequest.go b/kubernetes/typed/certificates/v1/certificatesigningrequest.go index 0d6b68b2..79c9daf3 100644 --- a/kubernetes/typed/certificates/v1/certificatesigningrequest.go +++ b/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/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go b/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go index 970fb15e..c4e0ca65 100644 --- a/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go +++ b/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/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index ec0b9d26..d88d4020 100644 --- a/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/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/kubernetes/typed/coordination/v1/lease.go b/kubernetes/typed/coordination/v1/lease.go index 9e6b169a..032787c6 100644 --- a/kubernetes/typed/coordination/v1/lease.go +++ b/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/kubernetes/typed/coordination/v1beta1/lease.go b/kubernetes/typed/coordination/v1beta1/lease.go index 1bbd57bd..e6841ffd 100644 --- a/kubernetes/typed/coordination/v1beta1/lease.go +++ b/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/kubernetes/typed/core/v1/componentstatus.go b/kubernetes/typed/core/v1/componentstatus.go index 0fef5642..f2ea72e4 100644 --- a/kubernetes/typed/core/v1/componentstatus.go +++ b/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/kubernetes/typed/core/v1/configmap.go b/kubernetes/typed/core/v1/configmap.go index b6817772..27d19b8b 100644 --- a/kubernetes/typed/core/v1/configmap.go +++ b/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/kubernetes/typed/core/v1/endpoints.go b/kubernetes/typed/core/v1/endpoints.go index cdf464b0..cf811572 100644 --- a/kubernetes/typed/core/v1/endpoints.go +++ b/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/kubernetes/typed/core/v1/event.go b/kubernetes/typed/core/v1/event.go index 8274d85f..9873dbdb 100644 --- a/kubernetes/typed/core/v1/event.go +++ b/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/kubernetes/typed/core/v1/limitrange.go b/kubernetes/typed/core/v1/limitrange.go index e6883b60..92f6b2f5 100644 --- a/kubernetes/typed/core/v1/limitrange.go +++ b/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/kubernetes/typed/core/v1/namespace.go b/kubernetes/typed/core/v1/namespace.go index 06c77b4c..709d53ad 100644 --- a/kubernetes/typed/core/v1/namespace.go +++ b/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/kubernetes/typed/core/v1/node.go b/kubernetes/typed/core/v1/node.go index d9725b2f..4a4fc825 100644 --- a/kubernetes/typed/core/v1/node.go +++ b/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/kubernetes/typed/core/v1/persistentvolume.go b/kubernetes/typed/core/v1/persistentvolume.go index a8e22959..63442dd9 100644 --- a/kubernetes/typed/core/v1/persistentvolume.go +++ b/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/kubernetes/typed/core/v1/persistentvolumeclaim.go b/kubernetes/typed/core/v1/persistentvolumeclaim.go index 2e7f4fb4..3b3c61c6 100644 --- a/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/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/kubernetes/typed/core/v1/pod.go b/kubernetes/typed/core/v1/pod.go index 63122cf3..a275bd2c 100644 --- a/kubernetes/typed/core/v1/pod.go +++ b/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/kubernetes/typed/core/v1/podtemplate.go b/kubernetes/typed/core/v1/podtemplate.go index ff90fc0e..f6570465 100644 --- a/kubernetes/typed/core/v1/podtemplate.go +++ b/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/kubernetes/typed/core/v1/replicationcontroller.go b/kubernetes/typed/core/v1/replicationcontroller.go index 49c75d96..1ff2371f 100644 --- a/kubernetes/typed/core/v1/replicationcontroller.go +++ b/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/kubernetes/typed/core/v1/resourcequota.go b/kubernetes/typed/core/v1/resourcequota.go index 8444d164..32d0e33e 100644 --- a/kubernetes/typed/core/v1/resourcequota.go +++ b/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/kubernetes/typed/core/v1/secret.go b/kubernetes/typed/core/v1/secret.go index 4aba3303..d0eee669 100644 --- a/kubernetes/typed/core/v1/secret.go +++ b/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/kubernetes/typed/core/v1/service.go b/kubernetes/typed/core/v1/service.go index 3fe22ba4..b87f5acd 100644 --- a/kubernetes/typed/core/v1/service.go +++ b/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/kubernetes/typed/core/v1/serviceaccount.go b/kubernetes/typed/core/v1/serviceaccount.go index bdf589b9..ea08445e 100644 --- a/kubernetes/typed/core/v1/serviceaccount.go +++ b/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/kubernetes/typed/discovery/v1/endpointslice.go b/kubernetes/typed/discovery/v1/endpointslice.go index 63e616b0..eb9503bd 100644 --- a/kubernetes/typed/discovery/v1/endpointslice.go +++ b/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/kubernetes/typed/discovery/v1beta1/endpointslice.go b/kubernetes/typed/discovery/v1beta1/endpointslice.go index 2ade8330..97f9bbb1 100644 --- a/kubernetes/typed/discovery/v1beta1/endpointslice.go +++ b/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/kubernetes/typed/events/v1/event.go b/kubernetes/typed/events/v1/event.go index c9f2bbed..b34940c8 100644 --- a/kubernetes/typed/events/v1/event.go +++ b/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/kubernetes/typed/events/v1beta1/event.go b/kubernetes/typed/events/v1beta1/event.go index dfdf8b89..cc7174aa 100644 --- a/kubernetes/typed/events/v1beta1/event.go +++ b/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/kubernetes/typed/extensions/v1beta1/daemonset.go b/kubernetes/typed/extensions/v1beta1/daemonset.go index ffe219fd..128d585e 100644 --- a/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/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/kubernetes/typed/extensions/v1beta1/deployment.go b/kubernetes/typed/extensions/v1beta1/deployment.go index c41d8dbc..245e05ad 100644 --- a/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/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/kubernetes/typed/extensions/v1beta1/ingress.go b/kubernetes/typed/extensions/v1beta1/ingress.go index dd4012cc..c5c0376c 100644 --- a/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/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/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/kubernetes/typed/extensions/v1beta1/networkpolicy.go index 978b26db..9bbe4257 100644 --- a/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/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/kubernetes/typed/extensions/v1beta1/replicaset.go b/kubernetes/typed/extensions/v1beta1/replicaset.go index 3c907a3a..1ac971cf 100644 --- a/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/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/kubernetes/typed/flowcontrol/v1/flowschema.go b/kubernetes/typed/flowcontrol/v1/flowschema.go index bd36c5e6..504338ea 100644 --- a/kubernetes/typed/flowcontrol/v1/flowschema.go +++ b/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/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go index 797fe940..15328d0d 100644 --- a/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go +++ b/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/kubernetes/typed/flowcontrol/v1beta1/flowschema.go b/kubernetes/typed/flowcontrol/v1beta1/flowschema.go index a9d38bec..b6a6ea58 100644 --- a/kubernetes/typed/flowcontrol/v1beta1/flowschema.go +++ b/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/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go index 41f35cbc..7dff5453 100644 --- a/kubernetes/typed/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/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/kubernetes/typed/flowcontrol/v1beta2/flowschema.go b/kubernetes/typed/flowcontrol/v1beta2/flowschema.go index 3a1f12b6..32640509 100644 --- a/kubernetes/typed/flowcontrol/v1beta2/flowschema.go +++ b/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/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go index f028869f..a1621fc2 100644 --- a/kubernetes/typed/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/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/kubernetes/typed/flowcontrol/v1beta3/flowschema.go b/kubernetes/typed/flowcontrol/v1beta3/flowschema.go index 5fa39d6b..93bd3553 100644 --- a/kubernetes/typed/flowcontrol/v1beta3/flowschema.go +++ b/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/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go index 49f05257..d419be5f 100644 --- a/kubernetes/typed/flowcontrol/v1beta3/prioritylevelconfiguration.go +++ b/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/kubernetes/typed/networking/v1/ingress.go b/kubernetes/typed/networking/v1/ingress.go index 9923d6cb..dbdf32b9 100644 --- a/kubernetes/typed/networking/v1/ingress.go +++ b/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/kubernetes/typed/networking/v1/ingressclass.go b/kubernetes/typed/networking/v1/ingressclass.go index 16c8e48b..4ca832c9 100644 --- a/kubernetes/typed/networking/v1/ingressclass.go +++ b/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/kubernetes/typed/networking/v1/networkpolicy.go b/kubernetes/typed/networking/v1/networkpolicy.go index d7454ce1..1fd8bd03 100644 --- a/kubernetes/typed/networking/v1/networkpolicy.go +++ b/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/kubernetes/typed/networking/v1alpha1/ipaddress.go b/kubernetes/typed/networking/v1alpha1/ipaddress.go index fff193d6..fcf63fc8 100644 --- a/kubernetes/typed/networking/v1alpha1/ipaddress.go +++ b/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/kubernetes/typed/networking/v1alpha1/servicecidr.go b/kubernetes/typed/networking/v1alpha1/servicecidr.go index 100f290a..392f30d2 100644 --- a/kubernetes/typed/networking/v1alpha1/servicecidr.go +++ b/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/kubernetes/typed/networking/v1beta1/ingress.go b/kubernetes/typed/networking/v1beta1/ingress.go index b309281a..92df698e 100644 --- a/kubernetes/typed/networking/v1beta1/ingress.go +++ b/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/kubernetes/typed/networking/v1beta1/ingressclass.go b/kubernetes/typed/networking/v1beta1/ingressclass.go index 50ccdfdb..577a4d87 100644 --- a/kubernetes/typed/networking/v1beta1/ingressclass.go +++ b/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/kubernetes/typed/node/v1/runtimeclass.go b/kubernetes/typed/node/v1/runtimeclass.go index 5ec38b20..c8911b1e 100644 --- a/kubernetes/typed/node/v1/runtimeclass.go +++ b/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/kubernetes/typed/node/v1alpha1/runtimeclass.go b/kubernetes/typed/node/v1alpha1/runtimeclass.go index 039a7ace..c9fdaae5 100644 --- a/kubernetes/typed/node/v1alpha1/runtimeclass.go +++ b/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/kubernetes/typed/node/v1beta1/runtimeclass.go b/kubernetes/typed/node/v1beta1/runtimeclass.go index f8990adf..341a1e09 100644 --- a/kubernetes/typed/node/v1beta1/runtimeclass.go +++ b/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/kubernetes/typed/policy/v1/poddisruptionbudget.go b/kubernetes/typed/policy/v1/poddisruptionbudget.go index 58db3acf..37d93a2b 100644 --- a/kubernetes/typed/policy/v1/poddisruptionbudget.go +++ b/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/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 16872899..86fa7a68 100644 --- a/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/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/kubernetes/typed/rbac/v1/clusterrole.go b/kubernetes/typed/rbac/v1/clusterrole.go index 000d737f..c072389a 100644 --- a/kubernetes/typed/rbac/v1/clusterrole.go +++ b/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/kubernetes/typed/rbac/v1/clusterrolebinding.go b/kubernetes/typed/rbac/v1/clusterrolebinding.go index 31db43d9..09003ceb 100644 --- a/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/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/kubernetes/typed/rbac/v1/role.go b/kubernetes/typed/rbac/v1/role.go index 93810a3f..fd2b92c0 100644 --- a/kubernetes/typed/rbac/v1/role.go +++ b/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/kubernetes/typed/rbac/v1/rolebinding.go b/kubernetes/typed/rbac/v1/rolebinding.go index 2ace9386..567c4b51 100644 --- a/kubernetes/typed/rbac/v1/rolebinding.go +++ b/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/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/kubernetes/typed/rbac/v1alpha1/clusterrole.go index d6d30e99..b8021be3 100644 --- a/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/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/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 2eded92a..f55f7db3 100644 --- a/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/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/kubernetes/typed/rbac/v1alpha1/role.go b/kubernetes/typed/rbac/v1alpha1/role.go index 43c16fde..babc5d24 100644 --- a/kubernetes/typed/rbac/v1alpha1/role.go +++ b/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/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/kubernetes/typed/rbac/v1alpha1/rolebinding.go index 3129c9b4..1804457e 100644 --- a/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/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/kubernetes/typed/rbac/v1beta1/clusterrole.go b/kubernetes/typed/rbac/v1beta1/clusterrole.go index a3d67f03..e61f4ce3 100644 --- a/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/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/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index ae39cbb9..a80e99be 100644 --- a/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/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/kubernetes/typed/rbac/v1beta1/role.go b/kubernetes/typed/rbac/v1beta1/role.go index e789e42f..2dbb713d 100644 --- a/kubernetes/typed/rbac/v1beta1/role.go +++ b/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/kubernetes/typed/rbac/v1beta1/rolebinding.go b/kubernetes/typed/rbac/v1beta1/rolebinding.go index 1461ba3b..dfb60abc 100644 --- a/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/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/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go b/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go index 72e81a29..f5158bb6 100644 --- a/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go +++ b/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/kubernetes/typed/resource/v1alpha2/resourceclaim.go b/kubernetes/typed/resource/v1alpha2/resourceclaim.go index cfb27c9d..bd1e574f 100644 --- a/kubernetes/typed/resource/v1alpha2/resourceclaim.go +++ b/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/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go index d08afcb6..4f37f167 100644 --- a/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go +++ b/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/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go b/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go index 3f4e3200..b9d7ab83 100644 --- a/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go +++ b/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/kubernetes/typed/resource/v1alpha2/resourceclass.go b/kubernetes/typed/resource/v1alpha2/resourceclass.go index 95a4ac56..6a30db0b 100644 --- a/kubernetes/typed/resource/v1alpha2/resourceclass.go +++ b/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/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go index 8ac9be07..7603c8b0 100644 --- a/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go +++ b/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/kubernetes/typed/resource/v1alpha2/resourceslice.go b/kubernetes/typed/resource/v1alpha2/resourceslice.go index 302f370d..29440c57 100644 --- a/kubernetes/typed/resource/v1alpha2/resourceslice.go +++ b/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/kubernetes/typed/scheduling/v1/priorityclass.go b/kubernetes/typed/scheduling/v1/priorityclass.go index c68ec5da..c7eb4c61 100644 --- a/kubernetes/typed/scheduling/v1/priorityclass.go +++ b/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/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index a9b8c19c..40ce3437 100644 --- a/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/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/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/kubernetes/typed/scheduling/v1beta1/priorityclass.go index 155476e4..d22d9baf 100644 --- a/kubernetes/typed/scheduling/v1beta1/priorityclass.go +++ b/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/kubernetes/typed/storage/v1/csidriver.go b/kubernetes/typed/storage/v1/csidriver.go index d9dc4151..afb10669 100644 --- a/kubernetes/typed/storage/v1/csidriver.go +++ b/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/kubernetes/typed/storage/v1/csinode.go b/kubernetes/typed/storage/v1/csinode.go index 17dbc8c1..4d5ce789 100644 --- a/kubernetes/typed/storage/v1/csinode.go +++ b/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/kubernetes/typed/storage/v1/csistoragecapacity.go b/kubernetes/typed/storage/v1/csistoragecapacity.go index 6bb50e0d..4c3e1f24 100644 --- a/kubernetes/typed/storage/v1/csistoragecapacity.go +++ b/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/kubernetes/typed/storage/v1/storageclass.go b/kubernetes/typed/storage/v1/storageclass.go index 8e97d90a..cce61b2c 100644 --- a/kubernetes/typed/storage/v1/storageclass.go +++ b/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/kubernetes/typed/storage/v1/volumeattachment.go b/kubernetes/typed/storage/v1/volumeattachment.go index c1dbec84..c29fe448 100644 --- a/kubernetes/typed/storage/v1/volumeattachment.go +++ b/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/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go b/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go index bf5d64dd..2d464baa 100644 --- a/kubernetes/typed/storage/v1alpha1/csistoragecapacity.go +++ b/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/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/kubernetes/typed/storage/v1alpha1/volumeattachment.go index 58abb748..69aa9d8a 100644 --- a/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/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/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go b/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go index 6633a4dc..e049d94b 100644 --- a/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go +++ b/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/kubernetes/typed/storage/v1beta1/csidriver.go b/kubernetes/typed/storage/v1beta1/csidriver.go index 04e677db..861a9c05 100644 --- a/kubernetes/typed/storage/v1beta1/csidriver.go +++ b/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/kubernetes/typed/storage/v1beta1/csinode.go b/kubernetes/typed/storage/v1beta1/csinode.go index c3760b5c..effe3d98 100644 --- a/kubernetes/typed/storage/v1beta1/csinode.go +++ b/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/kubernetes/typed/storage/v1beta1/csistoragecapacity.go b/kubernetes/typed/storage/v1beta1/csistoragecapacity.go index 98ba936d..eb4e0445 100644 --- a/kubernetes/typed/storage/v1beta1/csistoragecapacity.go +++ b/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/kubernetes/typed/storage/v1beta1/storageclass.go b/kubernetes/typed/storage/v1beta1/storageclass.go index 9b4ef231..b38a78db 100644 --- a/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/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/kubernetes/typed/storage/v1beta1/volumeattachment.go b/kubernetes/typed/storage/v1beta1/volumeattachment.go index 35a8b64f..e8227677 100644 --- a/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/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/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go b/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go index be66a5b9..17fe4ac2 100644 --- a/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go +++ b/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