mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
[Federation] Expose autoscaling apis through federation api server
This commit is contained in:
parent
45bef274b4
commit
b41ae3f2fb
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@ go_library(
|
|||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
deps = [
|
deps = [
|
||||||
"//federation/apis/federation/install:go_default_library",
|
"//federation/apis/federation/install:go_default_library",
|
||||||
|
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library",
|
||||||
@ -41,6 +42,7 @@ filegroup(
|
|||||||
srcs = [
|
srcs = [
|
||||||
":package-srcs",
|
":package-srcs",
|
||||||
"//federation/client/clientset_generated/federation_clientset/fake:all-srcs",
|
"//federation/client/clientset_generated/federation_clientset/fake:all-srcs",
|
||||||
|
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:all-srcs",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:all-srcs",
|
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:all-srcs",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:all-srcs",
|
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:all-srcs",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:all-srcs",
|
"//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:all-srcs",
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
"k8s.io/client-go/pkg/util/flowcontrol"
|
"k8s.io/client-go/pkg/util/flowcontrol"
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
|
v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
|
||||||
v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
|
v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
|
||||||
v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
|
v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
|
||||||
v1beta1extensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1"
|
v1beta1extensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1"
|
||||||
@ -33,6 +34,9 @@ type Interface interface {
|
|||||||
CoreV1() v1core.CoreV1Interface
|
CoreV1() v1core.CoreV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Core() v1core.CoreV1Interface
|
Core() v1core.CoreV1Interface
|
||||||
|
AutoscalingV1() v1autoscaling.AutoscalingV1Interface
|
||||||
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
|
Autoscaling() v1autoscaling.AutoscalingV1Interface
|
||||||
BatchV1() v1batch.BatchV1Interface
|
BatchV1() v1batch.BatchV1Interface
|
||||||
// Deprecated: please explicitly pick a version if possible.
|
// Deprecated: please explicitly pick a version if possible.
|
||||||
Batch() v1batch.BatchV1Interface
|
Batch() v1batch.BatchV1Interface
|
||||||
@ -49,6 +53,7 @@ type Interface interface {
|
|||||||
type Clientset struct {
|
type Clientset struct {
|
||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
*v1core.CoreV1Client
|
*v1core.CoreV1Client
|
||||||
|
*v1autoscaling.AutoscalingV1Client
|
||||||
*v1batch.BatchV1Client
|
*v1batch.BatchV1Client
|
||||||
*v1beta1extensions.ExtensionsV1beta1Client
|
*v1beta1extensions.ExtensionsV1beta1Client
|
||||||
*v1beta1federation.FederationV1beta1Client
|
*v1beta1federation.FederationV1beta1Client
|
||||||
@ -71,6 +76,23 @@ func (c *Clientset) Core() v1core.CoreV1Interface {
|
|||||||
return c.CoreV1Client
|
return c.CoreV1Client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AutoscalingV1 retrieves the AutoscalingV1Client
|
||||||
|
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AutoscalingV1Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
|
||||||
|
// Please explicitly pick a version.
|
||||||
|
func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AutoscalingV1Client
|
||||||
|
}
|
||||||
|
|
||||||
// BatchV1 retrieves the BatchV1Client
|
// BatchV1 retrieves the BatchV1Client
|
||||||
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
@ -142,6 +164,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.AutoscalingV1Client, err = v1autoscaling.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy)
|
cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -168,6 +194,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
|
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
|
||||||
|
cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
|
||||||
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
|
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
|
||||||
cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c)
|
cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c)
|
||||||
cs.FederationV1beta1Client = v1beta1federation.NewForConfigOrDie(c)
|
cs.FederationV1beta1Client = v1beta1federation.NewForConfigOrDie(c)
|
||||||
@ -180,6 +207,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
func New(c rest.Interface) *Clientset {
|
func New(c rest.Interface) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreV1Client = v1core.New(c)
|
cs.CoreV1Client = v1core.New(c)
|
||||||
|
cs.AutoscalingV1Client = v1autoscaling.New(c)
|
||||||
cs.BatchV1Client = v1batch.New(c)
|
cs.BatchV1Client = v1batch.New(c)
|
||||||
cs.ExtensionsV1beta1Client = v1beta1extensions.New(c)
|
cs.ExtensionsV1beta1Client = v1beta1extensions.New(c)
|
||||||
cs.FederationV1beta1Client = v1beta1federation.New(c)
|
cs.FederationV1beta1Client = v1beta1federation.New(c)
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// This package has the automatically generated clientset.
|
// This package has the automatically generated clientset.
|
||||||
package federation_clientset
|
package federation_clientset
|
||||||
|
@ -16,6 +16,8 @@ go_library(
|
|||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
deps = [
|
deps = [
|
||||||
"//federation/client/clientset_generated/federation_clientset:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset:go_default_library",
|
||||||
|
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library",
|
||||||
|
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",
|
"//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library",
|
||||||
|
@ -20,6 +20,8 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/watch"
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset"
|
clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset"
|
||||||
|
v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
|
||||||
|
fakev1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake"
|
||||||
v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
|
v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1"
|
||||||
fakev1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake"
|
fakev1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake"
|
||||||
v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
|
v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1"
|
||||||
@ -77,6 +79,16 @@ func (c *Clientset) Core() v1core.CoreV1Interface {
|
|||||||
return &fakev1core.FakeCoreV1{Fake: &c.Fake}
|
return &fakev1core.FakeCoreV1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AutoscalingV1 retrieves the AutoscalingV1Client
|
||||||
|
func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface {
|
||||||
|
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Autoscaling retrieves the AutoscalingV1Client
|
||||||
|
func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface {
|
||||||
|
return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
// BatchV1 retrieves the BatchV1Client
|
// BatchV1 retrieves the BatchV1Client
|
||||||
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
func (c *Clientset) BatchV1() v1batch.BatchV1Interface {
|
||||||
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}
|
return &fakev1batch.FakeBatchV1{Fake: &c.Fake}
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// This package has the automatically generated fake clientset.
|
// This package has the automatically generated fake clientset.
|
||||||
package fake
|
package fake
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"autoscaling_client.go",
|
||||||
|
"doc.go",
|
||||||
|
"generated_expansion.go",
|
||||||
|
"horizontalpodautoscaler.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//pkg/api:go_default_library",
|
||||||
|
"//pkg/api/v1:go_default_library",
|
||||||
|
"//pkg/apis/autoscaling/v1:go_default_library",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||||
|
"//vendor:k8s.io/client-go/rest",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [
|
||||||
|
":package-srcs",
|
||||||
|
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake:all-srcs",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
fmt "fmt"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AutoscalingV1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
HorizontalPodAutoscalersGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// AutoscalingV1Client is used to interact with features provided by the autoscaling group.
|
||||||
|
type AutoscalingV1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
|
||||||
|
return newHorizontalPodAutoscalers(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new AutoscalingV1Client for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &AutoscalingV1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new AutoscalingV1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *AutoscalingV1Client {
|
||||||
|
return &AutoscalingV1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv, err := schema.ParseGroupVersion("autoscaling/v1")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// if autoscaling/v1 is not enabled, return an error
|
||||||
|
if !api.Registry.IsEnabledVersion(gv) {
|
||||||
|
return fmt.Errorf("autoscaling/v1 is not enabled")
|
||||||
|
}
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
copyGroupVersion := gv
|
||||||
|
config.GroupVersion = ©GroupVersion
|
||||||
|
|
||||||
|
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *AutoscalingV1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package v1
|
@ -0,0 +1,43 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
|
"fake_autoscaling_client.go",
|
||||||
|
"fake_horizontalpodautoscaler.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library",
|
||||||
|
"//pkg/api/v1:go_default_library",
|
||||||
|
"//pkg/apis/autoscaling/v1:go_default_library",
|
||||||
|
"//pkg/client/testing/core:go_default_library",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||||
|
"//vendor:k8s.io/client-go/rest",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
|
||||||
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeAutoscalingV1 struct {
|
||||||
|
*core.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.HorizontalPodAutoscalerInterface {
|
||||||
|
return &FakeHorizontalPodAutoscalers{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeAutoscalingV1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
@ -0,0 +1,129 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_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"
|
||||||
|
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||||
|
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
|
||||||
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
||||||
|
type FakeHorizontalPodAutoscalers struct {
|
||||||
|
Fake *FakeAutoscalingV1
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v1", Resource: "horizontalpodautoscalers"}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
|
||||||
|
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := core.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1.HorizontalPodAutoscalerList{}
|
||||||
|
for _, item := range obj.(*v1.HorizontalPodAutoscalerList).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 horizontalPodAutoscalers.
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
type HorizontalPodAutoscalerExpansion interface{}
|
@ -0,0 +1,173 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||||
|
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type HorizontalPodAutoscalersGetter interface {
|
||||||
|
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
|
||||||
|
type HorizontalPodAutoscalerInterface interface {
|
||||||
|
Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
|
||||||
|
Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
|
||||||
|
UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
|
||||||
|
Delete(name string, options *api_v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
|
||||||
|
Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
|
||||||
|
List(opts api_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
|
||||||
|
Watch(opts api_v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
|
||||||
|
HorizontalPodAutoscalerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
||||||
|
type horizontalPodAutoscalers struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
|
||||||
|
func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers {
|
||||||
|
return &horizontalPodAutoscalers{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||||
|
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &v1.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Body(horizontalPodAutoscaler).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||||
|
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &v1.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(horizontalPodAutoscaler.Name).
|
||||||
|
Body(horizontalPodAutoscaler).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
|
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &v1.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(horizontalPodAutoscaler.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(horizontalPodAutoscaler).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
VersionedParams(&listOptions, api.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
||||||
|
func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &v1.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, api.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||||
|
func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||||
|
result = &v1.HorizontalPodAutoscalerList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||||
|
func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.client.Get().
|
||||||
|
Prefix("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||||
|
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &v1.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1
|
package v1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1
|
package v1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -17,6 +17,7 @@ go_library(
|
|||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
deps = [
|
deps = [
|
||||||
"//federation/apis/federation/install:go_default_library",
|
"//federation/apis/federation/install:go_default_library",
|
||||||
|
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library",
|
||||||
@ -41,6 +42,7 @@ filegroup(
|
|||||||
srcs = [
|
srcs = [
|
||||||
":package-srcs",
|
":package-srcs",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/fake:all-srcs",
|
"//federation/client/clientset_generated/federation_internalclientset/fake:all-srcs",
|
||||||
|
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:all-srcs",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:all-srcs",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:all-srcs",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:all-srcs",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:all-srcs",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:all-srcs",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:all-srcs",
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
"k8s.io/client-go/pkg/util/flowcontrol"
|
"k8s.io/client-go/pkg/util/flowcontrol"
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||||
rest "k8s.io/client-go/rest"
|
rest "k8s.io/client-go/rest"
|
||||||
|
internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
|
||||||
internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion"
|
internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion"
|
||||||
internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion"
|
internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion"
|
||||||
internalversionextensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion"
|
internalversionextensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion"
|
||||||
@ -32,6 +33,8 @@ type Interface interface {
|
|||||||
Discovery() discovery.DiscoveryInterface
|
Discovery() discovery.DiscoveryInterface
|
||||||
Core() internalversioncore.CoreInterface
|
Core() internalversioncore.CoreInterface
|
||||||
|
|
||||||
|
Autoscaling() internalversionautoscaling.AutoscalingInterface
|
||||||
|
|
||||||
Batch() internalversionbatch.BatchInterface
|
Batch() internalversionbatch.BatchInterface
|
||||||
|
|
||||||
Extensions() internalversionextensions.ExtensionsInterface
|
Extensions() internalversionextensions.ExtensionsInterface
|
||||||
@ -44,6 +47,7 @@ type Interface interface {
|
|||||||
type Clientset struct {
|
type Clientset struct {
|
||||||
*discovery.DiscoveryClient
|
*discovery.DiscoveryClient
|
||||||
*internalversioncore.CoreClient
|
*internalversioncore.CoreClient
|
||||||
|
*internalversionautoscaling.AutoscalingClient
|
||||||
*internalversionbatch.BatchClient
|
*internalversionbatch.BatchClient
|
||||||
*internalversionextensions.ExtensionsClient
|
*internalversionextensions.ExtensionsClient
|
||||||
*internalversionfederation.FederationClient
|
*internalversionfederation.FederationClient
|
||||||
@ -57,6 +61,14 @@ func (c *Clientset) Core() internalversioncore.CoreInterface {
|
|||||||
return c.CoreClient
|
return c.CoreClient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Autoscaling retrieves the AutoscalingClient
|
||||||
|
func (c *Clientset) Autoscaling() internalversionautoscaling.AutoscalingInterface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.AutoscalingClient
|
||||||
|
}
|
||||||
|
|
||||||
// Batch retrieves the BatchClient
|
// Batch retrieves the BatchClient
|
||||||
func (c *Clientset) Batch() internalversionbatch.BatchInterface {
|
func (c *Clientset) Batch() internalversionbatch.BatchInterface {
|
||||||
if c == nil {
|
if c == nil {
|
||||||
@ -101,6 +113,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.AutoscalingClient, err = internalversionautoscaling.NewForConfig(&configShallowCopy)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
cs.BatchClient, err = internalversionbatch.NewForConfig(&configShallowCopy)
|
cs.BatchClient, err = internalversionbatch.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -127,6 +143,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreClient = internalversioncore.NewForConfigOrDie(c)
|
cs.CoreClient = internalversioncore.NewForConfigOrDie(c)
|
||||||
|
cs.AutoscalingClient = internalversionautoscaling.NewForConfigOrDie(c)
|
||||||
cs.BatchClient = internalversionbatch.NewForConfigOrDie(c)
|
cs.BatchClient = internalversionbatch.NewForConfigOrDie(c)
|
||||||
cs.ExtensionsClient = internalversionextensions.NewForConfigOrDie(c)
|
cs.ExtensionsClient = internalversionextensions.NewForConfigOrDie(c)
|
||||||
cs.FederationClient = internalversionfederation.NewForConfigOrDie(c)
|
cs.FederationClient = internalversionfederation.NewForConfigOrDie(c)
|
||||||
@ -139,6 +156,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
func New(c rest.Interface) *Clientset {
|
func New(c rest.Interface) *Clientset {
|
||||||
var cs Clientset
|
var cs Clientset
|
||||||
cs.CoreClient = internalversioncore.New(c)
|
cs.CoreClient = internalversioncore.New(c)
|
||||||
|
cs.AutoscalingClient = internalversionautoscaling.New(c)
|
||||||
cs.BatchClient = internalversionbatch.New(c)
|
cs.BatchClient = internalversionbatch.New(c)
|
||||||
cs.ExtensionsClient = internalversionextensions.New(c)
|
cs.ExtensionsClient = internalversionextensions.New(c)
|
||||||
cs.FederationClient = internalversionfederation.New(c)
|
cs.FederationClient = internalversionfederation.New(c)
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// This package has the automatically generated clientset.
|
// This package has the automatically generated clientset.
|
||||||
package federation_internalclientset
|
package federation_internalclientset
|
||||||
|
@ -16,6 +16,8 @@ go_library(
|
|||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
deps = [
|
deps = [
|
||||||
"//federation/client/clientset_generated/federation_internalclientset:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset:go_default_library",
|
||||||
|
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library",
|
||||||
|
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake:go_default_library",
|
||||||
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library",
|
"//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library",
|
||||||
|
@ -20,6 +20,8 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apimachinery/pkg/watch"
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset"
|
clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset"
|
||||||
|
internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
|
||||||
|
fakeinternalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake"
|
||||||
internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion"
|
internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion"
|
||||||
fakeinternalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake"
|
fakeinternalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake"
|
||||||
internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion"
|
internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion"
|
||||||
@ -72,6 +74,11 @@ func (c *Clientset) Core() internalversioncore.CoreInterface {
|
|||||||
return &fakeinternalversioncore.FakeCore{Fake: &c.Fake}
|
return &fakeinternalversioncore.FakeCore{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Autoscaling retrieves the AutoscalingClient
|
||||||
|
func (c *Clientset) Autoscaling() internalversionautoscaling.AutoscalingInterface {
|
||||||
|
return &fakeinternalversionautoscaling.FakeAutoscaling{Fake: &c.Fake}
|
||||||
|
}
|
||||||
|
|
||||||
// Batch retrieves the BatchClient
|
// Batch retrieves the BatchClient
|
||||||
func (c *Clientset) Batch() internalversionbatch.BatchInterface {
|
func (c *Clientset) Batch() internalversionbatch.BatchInterface {
|
||||||
return &fakeinternalversionbatch.FakeBatch{Fake: &c.Fake}
|
return &fakeinternalversionbatch.FakeBatch{Fake: &c.Fake}
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// This package has the automatically generated fake clientset.
|
// This package has the automatically generated fake clientset.
|
||||||
package fake
|
package fake
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"autoscaling_client.go",
|
||||||
|
"doc.go",
|
||||||
|
"generated_expansion.go",
|
||||||
|
"horizontalpodautoscaler.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//pkg/api:go_default_library",
|
||||||
|
"//pkg/apis/autoscaling:go_default_library",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||||
|
"//vendor:k8s.io/client-go/rest",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [
|
||||||
|
":package-srcs",
|
||||||
|
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake:all-srcs",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
@ -0,0 +1,98 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
)
|
||||||
|
|
||||||
|
type AutoscalingInterface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
HorizontalPodAutoscalersGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// AutoscalingClient is used to interact with features provided by the autoscaling group.
|
||||||
|
type AutoscalingClient struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
|
||||||
|
return newHorizontalPodAutoscalers(c, namespace)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new AutoscalingClient for the given config.
|
||||||
|
func NewForConfig(c *rest.Config) (*AutoscalingClient, error) {
|
||||||
|
config := *c
|
||||||
|
if err := setConfigDefaults(&config); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
client, err := rest.RESTClientFor(&config)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &AutoscalingClient{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new AutoscalingClient for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *AutoscalingClient {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new AutoscalingClient for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *AutoscalingClient {
|
||||||
|
return &AutoscalingClient{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
// if autoscaling group is not registered, return an error
|
||||||
|
g, err := api.Registry.Group("autoscaling")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
config.APIPath = "/apis"
|
||||||
|
if config.UserAgent == "" {
|
||||||
|
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||||
|
}
|
||||||
|
if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
|
||||||
|
copyGroupVersion := g.GroupVersion
|
||||||
|
config.GroupVersion = ©GroupVersion
|
||||||
|
}
|
||||||
|
config.NegotiatedSerializer = api.Codecs
|
||||||
|
|
||||||
|
if config.QPS == 0 {
|
||||||
|
config.QPS = 5
|
||||||
|
}
|
||||||
|
if config.Burst == 0 {
|
||||||
|
config.Burst = 10
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *AutoscalingClient) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
|
// This package has the automatically generated typed clients.
|
||||||
|
package internalversion
|
@ -0,0 +1,43 @@
|
|||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
licenses(["notice"])
|
||||||
|
|
||||||
|
load(
|
||||||
|
"@io_bazel_rules_go//go:def.bzl",
|
||||||
|
"go_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "go_default_library",
|
||||||
|
srcs = [
|
||||||
|
"doc.go",
|
||||||
|
"fake_autoscaling_client.go",
|
||||||
|
"fake_horizontalpodautoscaler.go",
|
||||||
|
],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
deps = [
|
||||||
|
"//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library",
|
||||||
|
"//pkg/api:go_default_library",
|
||||||
|
"//pkg/apis/autoscaling:go_default_library",
|
||||||
|
"//pkg/client/testing/core:go_default_library",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||||
|
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||||
|
"//vendor:k8s.io/client-go/rest",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
)
|
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
|
// Package fake has the automatically generated clients.
|
||||||
|
package fake
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
|
||||||
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeAutoscaling struct {
|
||||||
|
*core.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) internalversion.HorizontalPodAutoscalerInterface {
|
||||||
|
return &FakeHorizontalPodAutoscalers{c, namespace}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeAutoscaling) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
@ -0,0 +1,129 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
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"
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
|
||||||
|
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
||||||
|
type FakeHorizontalPodAutoscalers struct {
|
||||||
|
Fake *FakeAutoscaling
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "", Resource: "horizontalpodautoscalers"}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
|
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &autoscaling.HorizontalPodAutoscalerList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &autoscaling.HorizontalPodAutoscalerList{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := core.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &autoscaling.HorizontalPodAutoscalerList{}
|
||||||
|
for _, item := range obj.(*autoscaling.HorizontalPodAutoscalerList).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 horizontalPodAutoscalers.
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||||
|
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling.HorizontalPodAutoscaler{})
|
||||||
|
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
type HorizontalPodAutoscalerExpansion interface{}
|
@ -0,0 +1,172 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package internalversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type HorizontalPodAutoscalersGetter interface {
|
||||||
|
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
|
||||||
|
type HorizontalPodAutoscalerInterface interface {
|
||||||
|
Create(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
|
||||||
|
Update(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
|
||||||
|
UpdateStatus(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error)
|
||||||
|
Delete(name string, options *api.DeleteOptions) error
|
||||||
|
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*autoscaling.HorizontalPodAutoscaler, error)
|
||||||
|
List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error)
|
||||||
|
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error)
|
||||||
|
HorizontalPodAutoscalerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
||||||
|
type horizontalPodAutoscalers struct {
|
||||||
|
client rest.Interface
|
||||||
|
ns string
|
||||||
|
}
|
||||||
|
|
||||||
|
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
|
||||||
|
func newHorizontalPodAutoscalers(c *AutoscalingClient, namespace string) *horizontalPodAutoscalers {
|
||||||
|
return &horizontalPodAutoscalers{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
ns: namespace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||||
|
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &autoscaling.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Body(horizontalPodAutoscaler).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||||
|
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &autoscaling.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(horizontalPodAutoscaler.Name).
|
||||||
|
Body(horizontalPodAutoscaler).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateStatus was generated because the type contains a Status member.
|
||||||
|
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
||||||
|
|
||||||
|
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &autoscaling.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(horizontalPodAutoscaler.Name).
|
||||||
|
SubResource("status").
|
||||||
|
Body(horizontalPodAutoscaler).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
VersionedParams(&listOptions, api.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
||||||
|
func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &autoscaling.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, api.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||||
|
func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) {
|
||||||
|
result = &autoscaling.HorizontalPodAutoscalerList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||||
|
func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.client.Get().
|
||||||
|
Prefix("watch").
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
VersionedParams(&opts, api.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||||
|
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) {
|
||||||
|
result = &autoscaling.HorizontalPodAutoscaler{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Namespace(c.ns).
|
||||||
|
Resource("horizontalpodautoscalers").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package internalversion
|
package internalversion
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package internalversion
|
package internalversion
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package internalversion
|
package internalversion
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
// This package has the automatically generated typed clients.
|
||||||
package internalversion
|
package internalversion
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/]
|
// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/]
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
// Package fake has the automatically generated clients.
|
||||||
package fake
|
package fake
|
||||||
|
Loading…
Reference in New Issue
Block a user