mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-23 05:37:13 +00:00
Merge pull request #64890 from liggitt/revert-vpa
Automatic merge from submit-queue (batch tested with PRs 64836, 64890). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Revert: Add Vertical Pod Autoscaler to autoscaling/v2beta1 Reverts https://github.com/kubernetes/kubernetes/pull/63797 per [discussion](https://kubernetes.slack.com/archives/C09R1LV8S/p1528400528000615) with @jberkus and @mwielgus The scope of the follow-ups required in https://github.com/kubernetes/kubernetes/pull/64286 was not well understood when the API PR was merged, and we are now past code freeze for 1.11 This can be reopened against 1.12 ```release-note NONE ``` Kubernetes-commit: 169df7434155cbbc22f1532cba8e0a9588e29ad8
This commit is contained in:
commit
2f61378d31
60
Godeps/Godeps.json
generated
60
Godeps/Godeps.json
generated
@ -268,123 +268,123 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta2",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v2alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/certificates/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/networking/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/policy/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/settings/v1alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1alpha1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1beta1",
|
||||
"Rev": "aac5d23ea3ca7132d75daeed7516f8205553c832"
|
||||
"Rev": "72d6e4405f8143815cbd454ab04b38210a9f32fc"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||
|
@ -26,8 +26,6 @@ import (
|
||||
type Interface interface {
|
||||
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
|
||||
HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
|
||||
// VerticalPodAutoscalers returns a VerticalPodAutoscalerInformer.
|
||||
VerticalPodAutoscalers() VerticalPodAutoscalerInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@ -45,8 +43,3 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
|
||||
return &horizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// VerticalPodAutoscalers returns a VerticalPodAutoscalerInformer.
|
||||
func (v *version) VerticalPodAutoscalers() VerticalPodAutoscalerInformer {
|
||||
return &verticalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v2beta1 "k8s.io/client-go/listers/autoscaling/v2beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VerticalPodAutoscalerInformer provides access to a shared informer and lister for
|
||||
// VerticalPodAutoscalers.
|
||||
type VerticalPodAutoscalerInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2beta1.VerticalPodAutoscalerLister
|
||||
}
|
||||
|
||||
type verticalPodAutoscalerInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewVerticalPodAutoscalerInformer constructs a new informer for VerticalPodAutoscaler type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewVerticalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredVerticalPodAutoscalerInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredVerticalPodAutoscalerInformer constructs a new informer for VerticalPodAutoscaler type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredVerticalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AutoscalingV2beta1().VerticalPodAutoscalers(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AutoscalingV2beta1().VerticalPodAutoscalers(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&autoscaling_v2beta1.VerticalPodAutoscaler{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *verticalPodAutoscalerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredVerticalPodAutoscalerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *verticalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&autoscaling_v2beta1.VerticalPodAutoscaler{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *verticalPodAutoscalerInformer) Lister() v2beta1.VerticalPodAutoscalerLister {
|
||||
return v2beta1.NewVerticalPodAutoscalerLister(f.Informer().GetIndexer())
|
||||
}
|
@ -125,8 +125,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=autoscaling, Version=v2beta1
|
||||
case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil
|
||||
case v2beta1.SchemeGroupVersion.WithResource("verticalpodautoscalers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().VerticalPodAutoscalers().Informer()}, nil
|
||||
|
||||
// Group=batch, Version=v1
|
||||
case batch_v1.SchemeGroupVersion.WithResource("jobs"):
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
type AutoscalingV2beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
HorizontalPodAutoscalersGetter
|
||||
VerticalPodAutoscalersGetter
|
||||
}
|
||||
|
||||
// AutoscalingV2beta1Client is used to interact with features provided by the autoscaling group.
|
||||
@ -40,10 +39,6 @@ func (c *AutoscalingV2beta1Client) HorizontalPodAutoscalers(namespace string) Ho
|
||||
return newHorizontalPodAutoscalers(c, namespace)
|
||||
}
|
||||
|
||||
func (c *AutoscalingV2beta1Client) VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerInterface {
|
||||
return newVerticalPodAutoscalers(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new AutoscalingV2beta1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*AutoscalingV2beta1Client, error) {
|
||||
config := *c
|
||||
|
@ -32,10 +32,6 @@ func (c *FakeAutoscalingV2beta1) HorizontalPodAutoscalers(namespace string) v2be
|
||||
return &FakeHorizontalPodAutoscalers{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeAutoscalingV2beta1) VerticalPodAutoscalers(namespace string) v2beta1.VerticalPodAutoscalerInterface {
|
||||
return &FakeVerticalPodAutoscalers{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAutoscalingV2beta1) RESTClient() rest.Interface {
|
||||
|
@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeVerticalPodAutoscalers implements VerticalPodAutoscalerInterface
|
||||
type FakeVerticalPodAutoscalers struct {
|
||||
Fake *FakeAutoscalingV2beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var verticalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta1", Resource: "verticalpodautoscalers"}
|
||||
|
||||
var verticalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta1", Kind: "VerticalPodAutoscaler"}
|
||||
|
||||
// Get takes name of the verticalPodAutoscaler, and returns the corresponding verticalPodAutoscaler object, and an error if there is any.
|
||||
func (c *FakeVerticalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(verticalpodautoscalersResource, c.ns, name), &v2beta1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.VerticalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
|
||||
func (c *FakeVerticalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.VerticalPodAutoscalerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(verticalpodautoscalersResource, verticalpodautoscalersKind, c.ns, opts), &v2beta1.VerticalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2beta1.VerticalPodAutoscalerList{ListMeta: obj.(*v2beta1.VerticalPodAutoscalerList).ListMeta}
|
||||
for _, item := range obj.(*v2beta1.VerticalPodAutoscalerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
|
||||
func (c *FakeVerticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(verticalpodautoscalersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a verticalPodAutoscaler and creates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeVerticalPodAutoscalers) Create(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(verticalpodautoscalersResource, c.ns, verticalPodAutoscaler), &v2beta1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.VerticalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a verticalPodAutoscaler and updates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeVerticalPodAutoscalers) Update(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(verticalpodautoscalersResource, c.ns, verticalPodAutoscaler), &v2beta1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.VerticalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVerticalPodAutoscalers) UpdateStatus(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(verticalpodautoscalersResource, "status", c.ns, verticalPodAutoscaler), &v2beta1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.VerticalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// Delete takes name of the verticalPodAutoscaler and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVerticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(verticalpodautoscalersResource, c.ns, name), &v2beta1.VerticalPodAutoscaler{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVerticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(verticalpodautoscalersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2beta1.VerticalPodAutoscalerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched verticalPodAutoscaler.
|
||||
func (c *FakeVerticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, data, subresources...), &v2beta1.VerticalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.VerticalPodAutoscaler), err
|
||||
}
|
@ -19,5 +19,3 @@ limitations under the License.
|
||||
package v2beta1
|
||||
|
||||
type HorizontalPodAutoscalerExpansion interface{}
|
||||
|
||||
type VerticalPodAutoscalerExpansion interface{}
|
||||
|
@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
v2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// VerticalPodAutoscalersGetter has a method to return a VerticalPodAutoscalerInterface.
|
||||
// A group's client should implement this interface.
|
||||
type VerticalPodAutoscalersGetter interface {
|
||||
VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerInterface
|
||||
}
|
||||
|
||||
// VerticalPodAutoscalerInterface has methods to work with VerticalPodAutoscaler resources.
|
||||
type VerticalPodAutoscalerInterface interface {
|
||||
Create(*v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error)
|
||||
Update(*v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error)
|
||||
UpdateStatus(*v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v2beta1.VerticalPodAutoscaler, error)
|
||||
List(opts v1.ListOptions) (*v2beta1.VerticalPodAutoscalerList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.VerticalPodAutoscaler, err error)
|
||||
VerticalPodAutoscalerExpansion
|
||||
}
|
||||
|
||||
// verticalPodAutoscalers implements VerticalPodAutoscalerInterface
|
||||
type verticalPodAutoscalers struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newVerticalPodAutoscalers returns a VerticalPodAutoscalers
|
||||
func newVerticalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) *verticalPodAutoscalers {
|
||||
return &verticalPodAutoscalers{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the verticalPodAutoscaler, and returns the corresponding verticalPodAutoscaler object, and an error if there is any.
|
||||
func (c *verticalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
result = &v2beta1.VerticalPodAutoscaler{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
|
||||
func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.VerticalPodAutoscalerList, err error) {
|
||||
result = &v2beta1.VerticalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
|
||||
func (c *verticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a verticalPodAutoscaler and creates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
|
||||
func (c *verticalPodAutoscalers) Create(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
result = &v2beta1.VerticalPodAutoscaler{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
Body(verticalPodAutoscaler).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a verticalPodAutoscaler and updates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
|
||||
func (c *verticalPodAutoscalers) Update(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
result = &v2beta1.VerticalPodAutoscaler{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
Name(verticalPodAutoscaler.Name).
|
||||
Body(verticalPodAutoscaler).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *verticalPodAutoscalers) UpdateStatus(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
result = &v2beta1.VerticalPodAutoscaler{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
Name(verticalPodAutoscaler.Name).
|
||||
SubResource("status").
|
||||
Body(verticalPodAutoscaler).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the verticalPodAutoscaler and deletes it. Returns an error if one occurs.
|
||||
func (c *verticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *verticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched verticalPodAutoscaler.
|
||||
func (c *verticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.VerticalPodAutoscaler, err error) {
|
||||
result = &v2beta1.VerticalPodAutoscaler{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("verticalpodautoscalers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -25,11 +25,3 @@ type HorizontalPodAutoscalerListerExpansion interface{}
|
||||
// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
|
||||
// HorizontalPodAutoscalerNamespaceLister.
|
||||
type HorizontalPodAutoscalerNamespaceListerExpansion interface{}
|
||||
|
||||
// VerticalPodAutoscalerListerExpansion allows custom methods to be added to
|
||||
// VerticalPodAutoscalerLister.
|
||||
type VerticalPodAutoscalerListerExpansion interface{}
|
||||
|
||||
// VerticalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
|
||||
// VerticalPodAutoscalerNamespaceLister.
|
||||
type VerticalPodAutoscalerNamespaceListerExpansion interface{}
|
||||
|
@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
v2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VerticalPodAutoscalerLister helps list VerticalPodAutoscalers.
|
||||
type VerticalPodAutoscalerLister interface {
|
||||
// List lists all VerticalPodAutoscalers in the indexer.
|
||||
List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error)
|
||||
// VerticalPodAutoscalers returns an object that can list and get VerticalPodAutoscalers.
|
||||
VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerNamespaceLister
|
||||
VerticalPodAutoscalerListerExpansion
|
||||
}
|
||||
|
||||
// verticalPodAutoscalerLister implements the VerticalPodAutoscalerLister interface.
|
||||
type verticalPodAutoscalerLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewVerticalPodAutoscalerLister returns a new VerticalPodAutoscalerLister.
|
||||
func NewVerticalPodAutoscalerLister(indexer cache.Indexer) VerticalPodAutoscalerLister {
|
||||
return &verticalPodAutoscalerLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all VerticalPodAutoscalers in the indexer.
|
||||
func (s *verticalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v2beta1.VerticalPodAutoscaler))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// VerticalPodAutoscalers returns an object that can list and get VerticalPodAutoscalers.
|
||||
func (s *verticalPodAutoscalerLister) VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerNamespaceLister {
|
||||
return verticalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// VerticalPodAutoscalerNamespaceLister helps list and get VerticalPodAutoscalers.
|
||||
type VerticalPodAutoscalerNamespaceLister interface {
|
||||
// List lists all VerticalPodAutoscalers in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error)
|
||||
// Get retrieves the VerticalPodAutoscaler from the indexer for a given namespace and name.
|
||||
Get(name string) (*v2beta1.VerticalPodAutoscaler, error)
|
||||
VerticalPodAutoscalerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// verticalPodAutoscalerNamespaceLister implements the VerticalPodAutoscalerNamespaceLister
|
||||
// interface.
|
||||
type verticalPodAutoscalerNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all VerticalPodAutoscalers in the indexer for a given namespace.
|
||||
func (s verticalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v2beta1.VerticalPodAutoscaler))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VerticalPodAutoscaler from the indexer for a given namespace and name.
|
||||
func (s verticalPodAutoscalerNamespaceLister) Get(name string) (*v2beta1.VerticalPodAutoscaler, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v2beta1.Resource("verticalpodautoscaler"), name)
|
||||
}
|
||||
return obj.(*v2beta1.VerticalPodAutoscaler), nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user