Regenerated VPA client due to changes in k8s core
This commit is contained in:
parent
728485faf0
commit
a6927a25c3
|
|
@ -31,11 +31,7 @@ type Interface interface {
|
|||
Discovery() discovery.DiscoveryInterface
|
||||
AutoscalingV1beta2() autoscalingv1beta2.AutoscalingV1beta2Interface
|
||||
AutoscalingV1beta1() autoscalingv1beta1.AutoscalingV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Autoscaling() autoscalingv1beta1.AutoscalingV1beta1Interface
|
||||
PocV1alpha1() pocv1alpha1.PocV1alpha1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Poc() pocv1alpha1.PocV1alpha1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
|
|
@ -57,23 +53,11 @@ func (c *Clientset) AutoscalingV1beta1() autoscalingv1beta1.AutoscalingV1beta1In
|
|||
return c.autoscalingV1beta1
|
||||
}
|
||||
|
||||
// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Autoscaling() autoscalingv1beta1.AutoscalingV1beta1Interface {
|
||||
return c.autoscalingV1beta1
|
||||
}
|
||||
|
||||
// PocV1alpha1 retrieves the PocV1alpha1Client
|
||||
func (c *Clientset) PocV1alpha1() pocv1alpha1.PocV1alpha1Interface {
|
||||
return c.pocV1alpha1
|
||||
}
|
||||
|
||||
// Deprecated: Poc retrieves the default version of PocClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Poc() pocv1alpha1.PocV1alpha1Interface {
|
||||
return c.pocV1alpha1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
|
|
|
|||
|
|
@ -85,17 +85,7 @@ func (c *Clientset) AutoscalingV1beta1() autoscalingv1beta1.AutoscalingV1beta1In
|
|||
return &fakeautoscalingv1beta1.FakeAutoscalingV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Autoscaling retrieves the AutoscalingV1beta1Client
|
||||
func (c *Clientset) Autoscaling() autoscalingv1beta1.AutoscalingV1beta1Interface {
|
||||
return &fakeautoscalingv1beta1.FakeAutoscalingV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// PocV1alpha1 retrieves the PocV1alpha1Client
|
||||
func (c *Clientset) PocV1alpha1() pocv1alpha1.PocV1alpha1Interface {
|
||||
return &fakepocv1alpha1.FakePocV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Poc retrieves the PocV1alpha1Client
|
||||
func (c *Clientset) Poc() pocv1alpha1.PocV1alpha1Interface {
|
||||
return &fakepocv1alpha1.FakePocV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ func (c *FakeVerticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions,
|
|||
// Patch applies the patch and returns the patched verticalPodAutoscaler.
|
||||
func (c *FakeVerticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, data, subresources...), &v1beta1.VerticalPodAutoscaler{})
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v1beta1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ func (c *FakeVerticalPodAutoscalerCheckpoints) DeleteCollection(options *v1.Dele
|
|||
// Patch applies the patch and returns the patched verticalPodAutoscalerCheckpoint.
|
||||
func (c *FakeVerticalPodAutoscalerCheckpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VerticalPodAutoscalerCheckpoint, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalercheckpointsResource, c.ns, name, data, subresources...), &v1beta1.VerticalPodAutoscalerCheckpoint{})
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalercheckpointsResource, c.ns, name, pt, data, subresources...), &v1beta1.VerticalPodAutoscalerCheckpoint{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -76,11 +78,16 @@ func (c *verticalPodAutoscalers) Get(name string, options v1.GetOptions) (result
|
|||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
|
||||
func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v1beta1.VerticalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.VerticalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -88,11 +95,16 @@ func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v1beta1.Vert
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
|
||||
func (c *verticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -150,10 +162,15 @@ func (c *verticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions)
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -75,11 +77,16 @@ func (c *verticalPodAutoscalerCheckpoints) Get(name string, options v1.GetOption
|
|||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalerCheckpoints that match those selectors.
|
||||
func (c *verticalPodAutoscalerCheckpoints) List(opts v1.ListOptions) (result *v1beta1.VerticalPodAutoscalerCheckpointList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.VerticalPodAutoscalerCheckpointList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -87,11 +94,16 @@ func (c *verticalPodAutoscalerCheckpoints) List(opts v1.ListOptions) (result *v1
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalerCheckpoints.
|
||||
func (c *verticalPodAutoscalerCheckpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -133,10 +145,15 @@ func (c *verticalPodAutoscalerCheckpoints) Delete(name string, options *v1.Delet
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalerCheckpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ func (c *FakeVerticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions,
|
|||
// Patch applies the patch and returns the patched verticalPodAutoscaler.
|
||||
func (c *FakeVerticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, data, subresources...), &v1beta2.VerticalPodAutoscaler{})
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v1beta2.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ func (c *FakeVerticalPodAutoscalerCheckpoints) DeleteCollection(options *v1.Dele
|
|||
// Patch applies the patch and returns the patched verticalPodAutoscalerCheckpoint.
|
||||
func (c *FakeVerticalPodAutoscalerCheckpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta2.VerticalPodAutoscalerCheckpoint, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalercheckpointsResource, c.ns, name, data, subresources...), &v1beta2.VerticalPodAutoscalerCheckpoint{})
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalercheckpointsResource, c.ns, name, pt, data, subresources...), &v1beta2.VerticalPodAutoscalerCheckpoint{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
package v1beta2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -76,11 +78,16 @@ func (c *verticalPodAutoscalers) Get(name string, options v1.GetOptions) (result
|
|||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
|
||||
func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v1beta2.VerticalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.VerticalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -88,11 +95,16 @@ func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v1beta2.Vert
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
|
||||
func (c *verticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -150,10 +162,15 @@ func (c *verticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions)
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
package v1beta2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -75,11 +77,16 @@ func (c *verticalPodAutoscalerCheckpoints) Get(name string, options v1.GetOption
|
|||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalerCheckpoints that match those selectors.
|
||||
func (c *verticalPodAutoscalerCheckpoints) List(opts v1.ListOptions) (result *v1beta2.VerticalPodAutoscalerCheckpointList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.VerticalPodAutoscalerCheckpointList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -87,11 +94,16 @@ func (c *verticalPodAutoscalerCheckpoints) List(opts v1.ListOptions) (result *v1
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalerCheckpoints.
|
||||
func (c *verticalPodAutoscalerCheckpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -133,10 +145,15 @@ func (c *verticalPodAutoscalerCheckpoints) Delete(name string, options *v1.Delet
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalerCheckpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ func (c *FakeVerticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions,
|
|||
// Patch applies the patch and returns the patched verticalPodAutoscaler.
|
||||
func (c *FakeVerticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, data, subresources...), &v1alpha1.VerticalPodAutoscaler{})
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v1alpha1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ func (c *FakeVerticalPodAutoscalerCheckpoints) DeleteCollection(options *v1.Dele
|
|||
// Patch applies the patch and returns the patched verticalPodAutoscalerCheckpoint.
|
||||
func (c *FakeVerticalPodAutoscalerCheckpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VerticalPodAutoscalerCheckpoint, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalercheckpointsResource, c.ns, name, data, subresources...), &v1alpha1.VerticalPodAutoscalerCheckpoint{})
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalercheckpointsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VerticalPodAutoscalerCheckpoint{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -76,11 +78,16 @@ func (c *verticalPodAutoscalers) Get(name string, options v1.GetOptions) (result
|
|||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
|
||||
func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v1alpha1.VerticalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.VerticalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -88,11 +95,16 @@ func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v1alpha1.Ver
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
|
||||
func (c *verticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -150,10 +162,15 @@ func (c *verticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions)
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
|
|
@ -75,11 +77,16 @@ func (c *verticalPodAutoscalerCheckpoints) Get(name string, options v1.GetOption
|
|||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalerCheckpoints that match those selectors.
|
||||
func (c *verticalPodAutoscalerCheckpoints) List(opts v1.ListOptions) (result *v1alpha1.VerticalPodAutoscalerCheckpointList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.VerticalPodAutoscalerCheckpointList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -87,11 +94,16 @@ func (c *verticalPodAutoscalerCheckpoints) List(opts v1.ListOptions) (result *v1
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalerCheckpoints.
|
||||
func (c *verticalPodAutoscalerCheckpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -133,10 +145,15 @@ func (c *verticalPodAutoscalerCheckpoints) Delete(name string, options *v1.Delet
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalerCheckpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalercheckpoints").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import (
|
|||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer.
|
||||
type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer
|
||||
|
||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||
|
|
@ -35,4 +36,5 @@ type SharedInformerFactory interface {
|
|||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||
}
|
||||
|
||||
// TweakListOptionsFunc is a function that transforms a v1.ListOptions.
|
||||
type TweakListOptionsFunc func(*v1.ListOptions)
|
||||
|
|
|
|||
Loading…
Reference in New Issue