Commit b0af4024 authored by Solly Ross's avatar Solly Ross

Move Autoscaling v2{alpha1 --> beta1}

This commit renames autoscaling/v2alpha1 to autoscaling/v2beta1. Only the API-related code is moved in this commit.
parent 2f543f32
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
"description": "API at /apis/autoscaling/v1" "description": "API at /apis/autoscaling/v1"
}, },
{ {
"path": "/apis/autoscaling/v2alpha1", "path": "/apis/autoscaling/v2beta1",
"description": "API at /apis/autoscaling/v2alpha1" "description": "API at /apis/autoscaling/v2beta1"
}, },
{ {
"path": "/apis/autoscaling", "path": "/apis/autoscaling",
......
...@@ -180,7 +180,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ ...@@ -180,7 +180,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
{Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15},
{Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9}, {Group: "authorization.k8s.io", Version: "v1beta1"}: {group: 17600, version: 9},
{Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15},
{Group: "autoscaling", Version: "v2alpha1"}: {group: 17500, version: 9}, {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9},
{Group: "batch", Version: "v1"}: {group: 17400, version: 15}, {Group: "batch", Version: "v1"}: {group: 17400, version: 15},
{Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9}, {Group: "batch", Version: "v1beta1"}: {group: 17400, version: 9},
{Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9}, {Group: "batch", Version: "v2alpha1"}: {group: 17400, version: 9},
......
...@@ -14099,7 +14099,7 @@ ...@@ -14099,7 +14099,7 @@
}, },
{ {
"group": "autoscaling", "group": "autoscaling",
"version": "v2alpha1", "version": "v2beta1",
"kind": "DeleteOptions" "kind": "DeleteOptions"
}, },
{ {
...@@ -14613,7 +14613,7 @@ ...@@ -14613,7 +14613,7 @@
}, },
{ {
"group": "autoscaling", "group": "autoscaling",
"version": "v2alpha1", "version": "v2beta1",
"kind": "WatchEvent" "kind": "WatchEvent"
}, },
{ {
......
...@@ -512,7 +512,7 @@ staging/src/k8s.io/api/authentication/v1beta1 ...@@ -512,7 +512,7 @@ staging/src/k8s.io/api/authentication/v1beta1
staging/src/k8s.io/api/authorization/v1 staging/src/k8s.io/api/authorization/v1
staging/src/k8s.io/api/authorization/v1beta1 staging/src/k8s.io/api/authorization/v1beta1
staging/src/k8s.io/api/autoscaling/v1 staging/src/k8s.io/api/autoscaling/v1
staging/src/k8s.io/api/autoscaling/v2alpha1 staging/src/k8s.io/api/autoscaling/v2beta1
staging/src/k8s.io/api/batch/v1 staging/src/k8s.io/api/batch/v1
staging/src/k8s.io/api/batch/v1beta1 staging/src/k8s.io/api/batch/v1beta1
staging/src/k8s.io/api/batch/v2alpha1 staging/src/k8s.io/api/batch/v2alpha1
...@@ -697,8 +697,8 @@ staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1 ...@@ -697,8 +697,8 @@ staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1
staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake
staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1 staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1
staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake
staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1 staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1
staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake
staging/src/k8s.io/client-go/kubernetes/typed/batch/v1 staging/src/k8s.io/client-go/kubernetes/typed/batch/v1
staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake
staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1 staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1
......
...@@ -61,7 +61,7 @@ authentication.k8s.io/v1beta1 \ ...@@ -61,7 +61,7 @@ authentication.k8s.io/v1beta1 \
authorization.k8s.io/v1 \ authorization.k8s.io/v1 \
authorization.k8s.io/v1beta1 \ authorization.k8s.io/v1beta1 \
autoscaling/v1 \ autoscaling/v1 \
autoscaling/v2alpha1 \ autoscaling/v2beta1 \
batch/v1 \ batch/v1 \
batch/v1beta1 \ batch/v1beta1 \
batch/v2alpha1 \ batch/v2alpha1 \
......
...@@ -76,8 +76,8 @@ func TestDefaulting(t *testing.T) { ...@@ -76,8 +76,8 @@ func TestDefaulting(t *testing.T) {
{Group: "apps", Version: "v1beta2", Kind: "StatefulSetList"}: {}, {Group: "apps", Version: "v1beta2", Kind: "StatefulSetList"}: {},
{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {}, {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {},
{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {}, {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {},
{Group: "autoscaling", Version: "v2alpha1", Kind: "HorizontalPodAutoscaler"}: {}, {Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"}: {},
{Group: "autoscaling", Version: "v2alpha1", Kind: "HorizontalPodAutoscalerList"}: {}, {Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscalerList"}: {},
{Group: "batch", Version: "v1", Kind: "Job"}: {}, {Group: "batch", Version: "v1", Kind: "Job"}: {},
{Group: "batch", Version: "v1", Kind: "JobList"}: {}, {Group: "batch", Version: "v1", Kind: "JobList"}: {},
{Group: "batch", Version: "v1beta1", Kind: "CronJob"}: {}, {Group: "batch", Version: "v1beta1", Kind: "CronJob"}: {},
......
...@@ -38,7 +38,7 @@ filegroup( ...@@ -38,7 +38,7 @@ filegroup(
"//pkg/apis/autoscaling/fuzzer:all-srcs", "//pkg/apis/autoscaling/fuzzer:all-srcs",
"//pkg/apis/autoscaling/install:all-srcs", "//pkg/apis/autoscaling/install:all-srcs",
"//pkg/apis/autoscaling/v1:all-srcs", "//pkg/apis/autoscaling/v1:all-srcs",
"//pkg/apis/autoscaling/v2alpha1:all-srcs", "//pkg/apis/autoscaling/v2beta1:all-srcs",
"//pkg/apis/autoscaling/validation:all-srcs", "//pkg/apis/autoscaling/validation:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
......
...@@ -17,18 +17,18 @@ limitations under the License. ...@@ -17,18 +17,18 @@ limitations under the License.
package autoscaling package autoscaling
// MetricSpecsAnnotation is the annotation which holds non-CPU-utilization HPA metric // MetricSpecsAnnotation is the annotation which holds non-CPU-utilization HPA metric
// specs when converting the `Metrics` field from autoscaling/v2alpha1 // specs when converting the `Metrics` field from autoscaling/v2beta1
const MetricSpecsAnnotation = "autoscaling.alpha.kubernetes.io/metrics" const MetricSpecsAnnotation = "autoscaling.alpha.kubernetes.io/metrics"
// MetricStatusesAnnotation is the annotation which holds non-CPU-utilization HPA metric // MetricStatusesAnnotation is the annotation which holds non-CPU-utilization HPA metric
// statuses when converting the `CurrentMetrics` field from autoscaling/v2alpha1 // statuses when converting the `CurrentMetrics` field from autoscaling/v2beta1
const MetricStatusesAnnotation = "autoscaling.alpha.kubernetes.io/current-metrics" const MetricStatusesAnnotation = "autoscaling.alpha.kubernetes.io/current-metrics"
// HorizontalPodAutoscalerConditionsAnnotation is the annotation which holds the conditions // HorizontalPodAutoscalerConditionsAnnotation is the annotation which holds the conditions
// of an HPA when converting the `Conditions` field from autoscaling/v2alpha1 // of an HPA when converting the `Conditions` field from autoscaling/v2beta1
const HorizontalPodAutoscalerConditionsAnnotation = "autoscaling.alpha.kubernetes.io/conditions" const HorizontalPodAutoscalerConditionsAnnotation = "autoscaling.alpha.kubernetes.io/conditions"
// DefaultCPUUtilization is the default value for CPU utilization, provided no other // DefaultCPUUtilization is the default value for CPU utilization, provided no other
// metrics are present. This is here because it's used by both the v2alpha1 defaulting // metrics are present. This is here because it's used by both the v2beta1 defaulting
// logic, and the pseudo-defaulting done in v1 conversion. // logic, and the pseudo-defaulting done in v1 conversion.
const DefaultCPUUtilization = 80 const DefaultCPUUtilization = 80
...@@ -12,7 +12,7 @@ go_library( ...@@ -12,7 +12,7 @@ go_library(
"//pkg/api:go_default_library", "//pkg/api:go_default_library",
"//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling:go_default_library",
"//pkg/apis/autoscaling/v1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library",
"//pkg/apis/autoscaling/v2alpha1:go_default_library", "//pkg/apis/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling"
"k8s.io/kubernetes/pkg/apis/autoscaling/v1" "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
"k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1" "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1"
) )
func init() { func init() {
...@@ -37,12 +37,12 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r ...@@ -37,12 +37,12 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
if err := announced.NewGroupMetaFactory( if err := announced.NewGroupMetaFactory(
&announced.GroupMetaFactoryArgs{ &announced.GroupMetaFactoryArgs{
GroupName: autoscaling.GroupName, GroupName: autoscaling.GroupName,
VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version}, VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v2beta1.SchemeGroupVersion.Version},
AddInternalObjectsToScheme: autoscaling.AddToScheme, AddInternalObjectsToScheme: autoscaling.AddToScheme,
}, },
announced.VersionToSchemeFunc{ announced.VersionToSchemeFunc{
v1.SchemeGroupVersion.Version: v1.AddToScheme, v1.SchemeGroupVersion.Version: v1.AddToScheme,
v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme, v2beta1.SchemeGroupVersion.Version: v2beta1.AddToScheme,
}, },
).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
panic(err) panic(err)
......
...@@ -351,7 +351,7 @@ type HorizontalPodAutoscaler struct { ...@@ -351,7 +351,7 @@ type HorizontalPodAutoscaler struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. // HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
type HorizontalPodAutoscalerList struct { type HorizontalPodAutoscalerList struct {
metav1.TypeMeta metav1.TypeMeta
// Metadata is the standard list metadata. // Metadata is the standard list metadata.
......
...@@ -156,7 +156,7 @@ func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(i ...@@ -156,7 +156,7 @@ func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(i
delete(out.Annotations, autoscaling.MetricStatusesAnnotation) delete(out.Annotations, autoscaling.MetricStatusesAnnotation)
} }
// autoscaling/v1 formerly had an implicit default applied in the controller. In v2alpha1, we apply it explicitly. // autoscaling/v1 formerly had an implicit default applied in the controller. In v2beta1, we apply it explicitly.
// We apply it here, explicitly, since we have access to the full set of metrics from the annotation. // We apply it here, explicitly, since we have access to the full set of metrics from the annotation.
if len(out.Spec.Metrics) == 0 { if len(out.Spec.Metrics) == 0 {
// no other metrics, no explicit CPU value set // no other metrics, no explicit CPU value set
......
...@@ -18,7 +18,7 @@ go_library( ...@@ -18,7 +18,7 @@ go_library(
deps = [ deps = [
"//pkg/api:go_default_library", "//pkg/api:go_default_library",
"//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling:go_default_library",
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
...@@ -50,7 +50,7 @@ go_test( ...@@ -50,7 +50,7 @@ go_test(
"//pkg/api/install:go_default_library", "//pkg/api/install:go_default_library",
"//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling:go_default_library",
"//pkg/apis/autoscaling/install:go_default_library", "//pkg/apis/autoscaling/install:go_default_library",
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
......
...@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and ...@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
import ( import (
autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling"
...@@ -27,7 +27,7 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { ...@@ -27,7 +27,7 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
return RegisterDefaults(scheme) return RegisterDefaults(scheme)
} }
func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2alpha1.HorizontalPodAutoscaler) { func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2beta1.HorizontalPodAutoscaler) {
if obj.Spec.MinReplicas == nil { if obj.Spec.MinReplicas == nil {
minReplicas := int32(1) minReplicas := int32(1)
obj.Spec.MinReplicas = &minReplicas obj.Spec.MinReplicas = &minReplicas
...@@ -35,10 +35,10 @@ func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2alpha1.HorizontalPodA ...@@ -35,10 +35,10 @@ func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2alpha1.HorizontalPodA
if len(obj.Spec.Metrics) == 0 { if len(obj.Spec.Metrics) == 0 {
utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization) utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization)
obj.Spec.Metrics = []autoscalingv2alpha1.MetricSpec{ obj.Spec.Metrics = []autoscalingv2beta1.MetricSpec{
{ {
Type: autoscalingv2alpha1.ResourceMetricSourceType, Type: autoscalingv2beta1.ResourceMetricSourceType,
Resource: &autoscalingv2alpha1.ResourceMetricSource{ Resource: &autoscalingv2beta1.ResourceMetricSource{
Name: v1.ResourceCPU, Name: v1.ResourceCPU,
TargetAverageUtilization: &utilizationDefaultVal, TargetAverageUtilization: &utilizationDefaultVal,
}, },
......
...@@ -14,13 +14,13 @@ See the License for the specific language governing permissions and ...@@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1_test package v2beta1_test
import ( import (
"reflect" "reflect"
"testing" "testing"
autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
apiequality "k8s.io/apimachinery/pkg/api/equality" apiequality "k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
...@@ -28,16 +28,16 @@ import ( ...@@ -28,16 +28,16 @@ import (
_ "k8s.io/kubernetes/pkg/api/install" _ "k8s.io/kubernetes/pkg/api/install"
"k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling"
_ "k8s.io/kubernetes/pkg/apis/autoscaling/install" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install"
. "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1" . "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1"
) )
func TestSetDefaultHPA(t *testing.T) { func TestSetDefaultHPA(t *testing.T) {
utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization) utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization)
defaultReplicas := newInt32(1) defaultReplicas := newInt32(1)
defaultTemplate := []autoscalingv2alpha1.MetricSpec{ defaultTemplate := []autoscalingv2beta1.MetricSpec{
{ {
Type: autoscalingv2alpha1.ResourceMetricSourceType, Type: autoscalingv2beta1.ResourceMetricSourceType,
Resource: &autoscalingv2alpha1.ResourceMetricSource{ Resource: &autoscalingv2beta1.ResourceMetricSource{
Name: v1.ResourceCPU, Name: v1.ResourceCPU,
TargetAverageUtilization: &utilizationDefaultVal, TargetAverageUtilization: &utilizationDefaultVal,
}, },
...@@ -45,44 +45,44 @@ func TestSetDefaultHPA(t *testing.T) { ...@@ -45,44 +45,44 @@ func TestSetDefaultHPA(t *testing.T) {
} }
tests := []struct { tests := []struct {
original *autoscalingv2alpha1.HorizontalPodAutoscaler original *autoscalingv2beta1.HorizontalPodAutoscaler
expected *autoscalingv2alpha1.HorizontalPodAutoscaler expected *autoscalingv2beta1.HorizontalPodAutoscaler
}{ }{
{ // MinReplicas default value { // MinReplicas default value
original: &autoscalingv2alpha1.HorizontalPodAutoscaler{ original: &autoscalingv2beta1.HorizontalPodAutoscaler{
Spec: autoscalingv2alpha1.HorizontalPodAutoscalerSpec{ Spec: autoscalingv2beta1.HorizontalPodAutoscalerSpec{
Metrics: defaultTemplate, Metrics: defaultTemplate,
}, },
}, },
expected: &autoscalingv2alpha1.HorizontalPodAutoscaler{ expected: &autoscalingv2beta1.HorizontalPodAutoscaler{
Spec: autoscalingv2alpha1.HorizontalPodAutoscalerSpec{ Spec: autoscalingv2beta1.HorizontalPodAutoscalerSpec{
MinReplicas: defaultReplicas, MinReplicas: defaultReplicas,
Metrics: defaultTemplate, Metrics: defaultTemplate,
}, },
}, },
}, },
{ // MinReplicas update { // MinReplicas update
original: &autoscalingv2alpha1.HorizontalPodAutoscaler{ original: &autoscalingv2beta1.HorizontalPodAutoscaler{
Spec: autoscalingv2alpha1.HorizontalPodAutoscalerSpec{ Spec: autoscalingv2beta1.HorizontalPodAutoscalerSpec{
MinReplicas: newInt32(3), MinReplicas: newInt32(3),
Metrics: defaultTemplate, Metrics: defaultTemplate,
}, },
}, },
expected: &autoscalingv2alpha1.HorizontalPodAutoscaler{ expected: &autoscalingv2beta1.HorizontalPodAutoscaler{
Spec: autoscalingv2alpha1.HorizontalPodAutoscalerSpec{ Spec: autoscalingv2beta1.HorizontalPodAutoscalerSpec{
MinReplicas: newInt32(3), MinReplicas: newInt32(3),
Metrics: defaultTemplate, Metrics: defaultTemplate,
}, },
}, },
}, },
{ // Metrics default value { // Metrics default value
original: &autoscalingv2alpha1.HorizontalPodAutoscaler{ original: &autoscalingv2beta1.HorizontalPodAutoscaler{
Spec: autoscalingv2alpha1.HorizontalPodAutoscalerSpec{ Spec: autoscalingv2beta1.HorizontalPodAutoscalerSpec{
MinReplicas: defaultReplicas, MinReplicas: defaultReplicas,
}, },
}, },
expected: &autoscalingv2alpha1.HorizontalPodAutoscaler{ expected: &autoscalingv2beta1.HorizontalPodAutoscaler{
Spec: autoscalingv2alpha1.HorizontalPodAutoscalerSpec{ Spec: autoscalingv2beta1.HorizontalPodAutoscalerSpec{
MinReplicas: defaultReplicas, MinReplicas: defaultReplicas,
Metrics: defaultTemplate, Metrics: defaultTemplate,
}, },
...@@ -94,7 +94,7 @@ func TestSetDefaultHPA(t *testing.T) { ...@@ -94,7 +94,7 @@ func TestSetDefaultHPA(t *testing.T) {
original := test.original original := test.original
expected := test.expected expected := test.expected
obj2 := roundTrip(t, runtime.Object(original)) obj2 := roundTrip(t, runtime.Object(original))
got, ok := obj2.(*autoscalingv2alpha1.HorizontalPodAutoscaler) got, ok := obj2.(*autoscalingv2beta1.HorizontalPodAutoscaler)
if !ok { if !ok {
t.Fatalf("(%d) unexpected object: %v", i, obj2) t.Fatalf("(%d) unexpected object: %v", i, obj2)
} }
......
...@@ -15,8 +15,8 @@ limitations under the License. ...@@ -15,8 +15,8 @@ limitations under the License.
*/ */
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/autoscaling/v2alpha1 // +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/autoscaling/v2beta1
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/autoscaling/v2alpha1 // +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/autoscaling/v2beta1
package v2alpha1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1" package v2beta1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1"
...@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and ...@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
import ( import (
autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
) )
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
const GroupName = "autoscaling" const GroupName = "autoscaling"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {
...@@ -33,7 +33,7 @@ func Resource(resource string) schema.GroupResource { ...@@ -33,7 +33,7 @@ func Resource(resource string) schema.GroupResource {
} }
var ( var (
localSchemeBuilder = &autoscalingv2alpha1.SchemeBuilder localSchemeBuilder = &autoscalingv2beta1.SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme AddToScheme = localSchemeBuilder.AddToScheme
) )
......
...@@ -18,10 +18,10 @@ limitations under the License. ...@@ -18,10 +18,10 @@ limitations under the License.
// This file was autogenerated by defaulter-gen. Do not edit it manually! // This file was autogenerated by defaulter-gen. Do not edit it manually!
package v2alpha1 package v2beta1
import ( import (
v2alpha1 "k8s.io/api/autoscaling/v2alpha1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
...@@ -29,20 +29,20 @@ import ( ...@@ -29,20 +29,20 @@ import (
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters. // All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error { func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&v2alpha1.HorizontalPodAutoscaler{}, func(obj interface{}) { scheme.AddTypeDefaultingFunc(&v2beta1.HorizontalPodAutoscaler{}, func(obj interface{}) {
SetObjectDefaults_HorizontalPodAutoscaler(obj.(*v2alpha1.HorizontalPodAutoscaler)) SetObjectDefaults_HorizontalPodAutoscaler(obj.(*v2beta1.HorizontalPodAutoscaler))
}) })
scheme.AddTypeDefaultingFunc(&v2alpha1.HorizontalPodAutoscalerList{}, func(obj interface{}) { scheme.AddTypeDefaultingFunc(&v2beta1.HorizontalPodAutoscalerList{}, func(obj interface{}) {
SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*v2alpha1.HorizontalPodAutoscalerList)) SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*v2beta1.HorizontalPodAutoscalerList))
}) })
return nil return nil
} }
func SetObjectDefaults_HorizontalPodAutoscaler(in *v2alpha1.HorizontalPodAutoscaler) { func SetObjectDefaults_HorizontalPodAutoscaler(in *v2beta1.HorizontalPodAutoscaler) {
SetDefaults_HorizontalPodAutoscaler(in) SetDefaults_HorizontalPodAutoscaler(in)
} }
func SetObjectDefaults_HorizontalPodAutoscalerList(in *v2alpha1.HorizontalPodAutoscalerList) { func SetObjectDefaults_HorizontalPodAutoscalerList(in *v2beta1.HorizontalPodAutoscalerList) {
for i := range in.Items { for i := range in.Items {
a := &in.Items[i] a := &in.Items[i]
SetObjectDefaults_HorizontalPodAutoscaler(a) SetObjectDefaults_HorizontalPodAutoscaler(a)
......
...@@ -27,7 +27,7 @@ openapi_library( ...@@ -27,7 +27,7 @@ openapi_library(
"k8s.io/api/authorization/v1", "k8s.io/api/authorization/v1",
"k8s.io/api/authorization/v1beta1", "k8s.io/api/authorization/v1beta1",
"k8s.io/api/autoscaling/v1", "k8s.io/api/autoscaling/v1",
"k8s.io/api/autoscaling/v2alpha1", "k8s.io/api/autoscaling/v2beta1",
"k8s.io/api/batch/v1", "k8s.io/api/batch/v1",
"k8s.io/api/batch/v1beta1", "k8s.io/api/batch/v1beta1",
"k8s.io/api/batch/v2alpha1", "k8s.io/api/batch/v2alpha1",
......
...@@ -598,7 +598,7 @@ func (f *fakeAPIFactory) KubernetesClientSet() (*kubernetes.Clientset, error) { ...@@ -598,7 +598,7 @@ func (f *fakeAPIFactory) KubernetesClientSet() (*kubernetes.Clientset, error) {
clientset.AuthorizationV1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.AuthorizationV1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
clientset.AuthorizationV1beta1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.AuthorizationV1beta1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
clientset.AutoscalingV1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.AutoscalingV1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
clientset.AutoscalingV2alpha1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.AutoscalingV2beta1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
clientset.BatchV1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.BatchV1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
clientset.BatchV2alpha1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.BatchV2alpha1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
clientset.CertificatesV1beta1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client clientset.CertificatesV1beta1().RESTClient().(*restclient.RESTClient).Client = fakeClient.Client
......
...@@ -13,7 +13,7 @@ go_library( ...@@ -13,7 +13,7 @@ go_library(
"//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling:go_default_library",
"//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library", "//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library",
"//vendor/k8s.io/api/autoscaling/v1:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
"//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
"//vendor/k8s.io/apiserver/pkg/server:go_default_library", "//vendor/k8s.io/apiserver/pkg/server:go_default_library",
......
...@@ -18,7 +18,7 @@ package rest ...@@ -18,7 +18,7 @@ package rest
import ( import (
autoscalingapiv1 "k8s.io/api/autoscaling/v1" autoscalingapiv1 "k8s.io/api/autoscaling/v1"
autoscalingapiv2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscalingapiv2beta1 "k8s.io/api/autoscaling/v2beta1"
"k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/registry/rest"
genericapiserver "k8s.io/apiserver/pkg/server" genericapiserver "k8s.io/apiserver/pkg/server"
...@@ -35,9 +35,9 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag ...@@ -35,9 +35,9 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
// If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities. // If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities.
// TODO refactor the plumbing to provide the information in the APIGroupInfo // TODO refactor the plumbing to provide the information in the APIGroupInfo
if apiResourceConfigSource.AnyResourcesForVersionEnabled(autoscalingapiv2alpha1.SchemeGroupVersion) { if apiResourceConfigSource.AnyResourcesForVersionEnabled(autoscalingapiv2beta1.SchemeGroupVersion) {
apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2alpha1.SchemeGroupVersion.Version] = p.v2alpha1Storage(apiResourceConfigSource, restOptionsGetter) apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2beta1.SchemeGroupVersion.Version] = p.v2beta1Storage(apiResourceConfigSource, restOptionsGetter)
apiGroupInfo.GroupMeta.GroupVersion = autoscalingapiv2alpha1.SchemeGroupVersion apiGroupInfo.GroupMeta.GroupVersion = autoscalingapiv2beta1.SchemeGroupVersion
} }
if apiResourceConfigSource.AnyResourcesForVersionEnabled(autoscalingapiv1.SchemeGroupVersion) { if apiResourceConfigSource.AnyResourcesForVersionEnabled(autoscalingapiv1.SchemeGroupVersion) {
apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv1.SchemeGroupVersion.Version] = p.v1Storage(apiResourceConfigSource, restOptionsGetter) apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv1.SchemeGroupVersion.Version] = p.v1Storage(apiResourceConfigSource, restOptionsGetter)
...@@ -59,8 +59,8 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API ...@@ -59,8 +59,8 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API
return storage return storage
} }
func (p RESTStorageProvider) v2alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { func (p RESTStorageProvider) v2beta1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
version := autoscalingapiv2alpha1.SchemeGroupVersion version := autoscalingapiv2beta1.SchemeGroupVersion
storage := map[string]rest.Storage{} storage := map[string]rest.Storage{}
if apiResourceConfigSource.ResourceEnabled(version.WithResource("horizontalpodautoscalers")) { if apiResourceConfigSource.ResourceEnabled(version.WithResource("horizontalpodautoscalers")) {
......
...@@ -37,7 +37,7 @@ filegroup( ...@@ -37,7 +37,7 @@ filegroup(
"//staging/src/k8s.io/api/authorization/v1:all-srcs", "//staging/src/k8s.io/api/authorization/v1:all-srcs",
"//staging/src/k8s.io/api/authorization/v1beta1:all-srcs", "//staging/src/k8s.io/api/authorization/v1beta1:all-srcs",
"//staging/src/k8s.io/api/autoscaling/v1:all-srcs", "//staging/src/k8s.io/api/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/api/autoscaling/v2alpha1:all-srcs", "//staging/src/k8s.io/api/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/api/batch/v1:all-srcs", "//staging/src/k8s.io/api/batch/v1:all-srcs",
"//staging/src/k8s.io/api/batch/v1beta1:all-srcs", "//staging/src/k8s.io/api/batch/v1beta1:all-srcs",
"//staging/src/k8s.io/api/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/api/batch/v2alpha1:all-srcs",
...@@ -154,7 +154,7 @@ filegroup( ...@@ -154,7 +154,7 @@ filegroup(
"//staging/src/k8s.io/client-go/listers/authorization/v1:all-srcs", "//staging/src/k8s.io/client-go/listers/authorization/v1:all-srcs",
"//staging/src/k8s.io/client-go/listers/authorization/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/listers/authorization/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/listers/autoscaling/v1:all-srcs", "//staging/src/k8s.io/client-go/listers/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/listers/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/client-go/listers/batch/v1:all-srcs", "//staging/src/k8s.io/client-go/listers/batch/v1:all-srcs",
"//staging/src/k8s.io/client-go/listers/batch/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/listers/batch/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs",
......
...@@ -17,4 +17,4 @@ limitations under the License. ...@@ -17,4 +17,4 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register // +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true // +k8s:openapi-gen=true
package v2alpha1 // import "k8s.io/api/autoscaling/v2alpha1" package v2beta1 // import "k8s.io/api/autoscaling/v2beta1"
...@@ -19,7 +19,7 @@ limitations under the License. ...@@ -19,7 +19,7 @@ limitations under the License.
syntax = 'proto2'; syntax = 'proto2';
package k8s.io.api.autoscaling.v2alpha1; package k8s.io.api.autoscaling.v2beta1;
import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
...@@ -29,7 +29,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; ...@@ -29,7 +29,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
// Package-wide variables from generator "generated". // Package-wide variables from generator "generated".
option go_package = "v2alpha1"; option go_package = "v2beta1";
// CrossVersionObjectReference contains enough information to let you identify the referred resource. // CrossVersionObjectReference contains enough information to let you identify the referred resource.
message CrossVersionObjectReference { message CrossVersionObjectReference {
......
...@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
...@@ -26,7 +26,7 @@ import ( ...@@ -26,7 +26,7 @@ import (
const GroupName = "autoscaling" const GroupName = "autoscaling"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta1"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {
......
...@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
import ( import (
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
......
...@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and ...@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
// This file contains a collection of methods that can be used from go-restful to // This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more // generate Swagger API documentation for its models. Please read this PR for more
......
...@@ -18,7 +18,7 @@ limitations under the License. ...@@ -18,7 +18,7 @@ limitations under the License.
// This file was autogenerated by deepcopy-gen. Do not edit it manually! // This file was autogenerated by deepcopy-gen. Do not edit it manually!
package v2alpha1 package v2beta1
import ( import (
resource "k8s.io/apimachinery/pkg/api/resource" resource "k8s.io/apimachinery/pkg/api/resource"
......
...@@ -16,7 +16,7 @@ go_library( ...@@ -16,7 +16,7 @@ go_library(
"//vendor/k8s.io/api/apps/v1beta1:go_default_library", "//vendor/k8s.io/api/apps/v1beta1:go_default_library",
"//vendor/k8s.io/api/apps/v1beta2:go_default_library", "//vendor/k8s.io/api/apps/v1beta2:go_default_library",
"//vendor/k8s.io/api/autoscaling/v1:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/api/batch/v1:go_default_library", "//vendor/k8s.io/api/batch/v1:go_default_library",
"//vendor/k8s.io/api/batch/v1beta1:go_default_library", "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
"//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["interface.go"], srcs = ["interface.go"],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/client-go/informers/autoscaling/v1:go_default_library", "//vendor/k8s.io/client-go/informers/autoscaling/v1:go_default_library",
"//vendor/k8s.io/client-go/informers/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/informers/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library",
], ],
) )
...@@ -27,7 +23,8 @@ filegroup( ...@@ -27,7 +23,8 @@ filegroup(
srcs = [ srcs = [
":package-srcs", ":package-srcs",
"//staging/src/k8s.io/client-go/informers/autoscaling/v1:all-srcs", "//staging/src/k8s.io/client-go/informers/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/client-go/informers/autoscaling/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/informers/autoscaling/v2beta1:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -20,7 +20,7 @@ package autoscaling ...@@ -20,7 +20,7 @@ package autoscaling
import ( import (
v1 "k8s.io/client-go/informers/autoscaling/v1" v1 "k8s.io/client-go/informers/autoscaling/v1"
v2alpha1 "k8s.io/client-go/informers/autoscaling/v2alpha1" v2beta1 "k8s.io/client-go/informers/autoscaling/v2beta1"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
) )
...@@ -28,8 +28,8 @@ import ( ...@@ -28,8 +28,8 @@ import (
type Interface interface { type Interface interface {
// V1 provides access to shared informers for resources in V1. // V1 provides access to shared informers for resources in V1.
V1() v1.Interface V1() v1.Interface
// V2alpha1 provides access to shared informers for resources in V2alpha1. // V2beta1 provides access to shared informers for resources in V2beta1.
V2alpha1() v2alpha1.Interface V2beta1() v2beta1.Interface
} }
type group struct { type group struct {
...@@ -46,7 +46,7 @@ func (g *group) V1() v1.Interface { ...@@ -46,7 +46,7 @@ func (g *group) V1() v1.Interface {
return v1.New(g.SharedInformerFactory) return v1.New(g.SharedInformerFactory)
} }
// V2alpha1 returns a new v2alpha1.Interface. // V2beta1 returns a new v2beta1.Interface.
func (g *group) V2alpha1() v2alpha1.Interface { func (g *group) V2beta1() v2beta1.Interface {
return v2alpha1.New(g.SharedInformerFactory) return v2beta1.New(g.SharedInformerFactory)
} }
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -11,6 +6,7 @@ go_library( ...@@ -11,6 +6,7 @@ go_library(
"horizontalpodautoscaler.go", "horizontalpodautoscaler.go",
"interface.go", "interface.go",
], ],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/api/autoscaling/v1:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
...@@ -34,4 +30,5 @@ filegroup( ...@@ -34,4 +30,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -11,14 +6,15 @@ go_library( ...@@ -11,14 +6,15 @@ go_library(
"horizontalpodautoscaler.go", "horizontalpodautoscaler.go",
"interface.go", "interface.go",
], ],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library", "//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/listers/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/listers/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library", "//vendor/k8s.io/client-go/tools/cache:go_default_library",
], ],
) )
...@@ -34,4 +30,5 @@ filegroup( ...@@ -34,4 +30,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -16,16 +16,16 @@ limitations under the License. ...@@ -16,16 +16,16 @@ limitations under the License.
// This file was automatically generated by informer-gen // This file was automatically generated by informer-gen
package v2alpha1 package v2beta1
import ( import (
autoscaling_v2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v2alpha1 "k8s.io/client-go/listers/autoscaling/v2alpha1" v2beta1 "k8s.io/client-go/listers/autoscaling/v2beta1"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
time "time" time "time"
) )
...@@ -34,7 +34,7 @@ import ( ...@@ -34,7 +34,7 @@ import (
// HorizontalPodAutoscalers. // HorizontalPodAutoscalers.
type HorizontalPodAutoscalerInformer interface { type HorizontalPodAutoscalerInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v2alpha1.HorizontalPodAutoscalerLister Lister() v2beta1.HorizontalPodAutoscalerLister
} }
type horizontalPodAutoscalerInformer struct { type horizontalPodAutoscalerInformer struct {
...@@ -48,13 +48,13 @@ func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace s ...@@ -48,13 +48,13 @@ func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace s
return cache.NewSharedIndexInformer( return cache.NewSharedIndexInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) { ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
return client.AutoscalingV2alpha1().HorizontalPodAutoscalers(namespace).List(options) return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).List(options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
return client.AutoscalingV2alpha1().HorizontalPodAutoscalers(namespace).Watch(options) return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(options)
}, },
}, },
&autoscaling_v2alpha1.HorizontalPodAutoscaler{}, &autoscaling_v2beta1.HorizontalPodAutoscaler{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
...@@ -65,9 +65,9 @@ func defaultHorizontalPodAutoscalerInformer(client kubernetes.Interface, resyncP ...@@ -65,9 +65,9 @@ func defaultHorizontalPodAutoscalerInformer(client kubernetes.Interface, resyncP
} }
func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer { func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&autoscaling_v2alpha1.HorizontalPodAutoscaler{}, defaultHorizontalPodAutoscalerInformer) return f.factory.InformerFor(&autoscaling_v2beta1.HorizontalPodAutoscaler{}, defaultHorizontalPodAutoscalerInformer)
} }
func (f *horizontalPodAutoscalerInformer) Lister() v2alpha1.HorizontalPodAutoscalerLister { func (f *horizontalPodAutoscalerInformer) Lister() v2beta1.HorizontalPodAutoscalerLister {
return v2alpha1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer()) return v2beta1.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer())
} }
...@@ -16,7 +16,7 @@ limitations under the License. ...@@ -16,7 +16,7 @@ limitations under the License.
// This file was automatically generated by informer-gen // This file was automatically generated by informer-gen
package v2alpha1 package v2beta1
import ( import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
......
...@@ -24,10 +24,10 @@ import ( ...@@ -24,10 +24,10 @@ import (
v1beta1 "k8s.io/api/apps/v1beta1" v1beta1 "k8s.io/api/apps/v1beta1"
v1beta2 "k8s.io/api/apps/v1beta2" v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/api/autoscaling/v1" v1 "k8s.io/api/autoscaling/v1"
v2alpha1 "k8s.io/api/autoscaling/v2alpha1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
batch_v1 "k8s.io/api/batch/v1" batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1" batch_v1beta1 "k8s.io/api/batch/v1beta1"
batch_v2alpha1 "k8s.io/api/batch/v2alpha1" v2alpha1 "k8s.io/api/batch/v2alpha1"
certificates_v1beta1 "k8s.io/api/certificates/v1beta1" certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
core_v1 "k8s.io/api/core/v1" core_v1 "k8s.io/api/core/v1"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1" extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
...@@ -100,9 +100,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource ...@@ -100,9 +100,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): case v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil
// Group=Autoscaling, Version=V2alpha1 // Group=Autoscaling, Version=V2beta1
case v2alpha1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2alpha1().HorizontalPodAutoscalers().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil
// Group=Batch, Version=V1 // Group=Batch, Version=V1
case batch_v1.SchemeGroupVersion.WithResource("jobs"): case batch_v1.SchemeGroupVersion.WithResource("jobs"):
...@@ -113,7 +113,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource ...@@ -113,7 +113,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil
// Group=Batch, Version=V2alpha1 // Group=Batch, Version=V2alpha1
case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"): case v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
// Group=Certificates, Version=V1beta1 // Group=Certificates, Version=V1beta1
......
...@@ -23,7 +23,7 @@ go_library( ...@@ -23,7 +23,7 @@ go_library(
"//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
...@@ -65,7 +65,7 @@ filegroup( ...@@ -65,7 +65,7 @@ filegroup(
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs",
......
...@@ -27,7 +27,7 @@ import ( ...@@ -27,7 +27,7 @@ import (
authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
...@@ -67,7 +67,7 @@ type Interface interface { ...@@ -67,7 +67,7 @@ type Interface interface {
AutoscalingV1() autoscalingv1.AutoscalingV1Interface AutoscalingV1() autoscalingv1.AutoscalingV1Interface
// Deprecated: please explicitly pick a version if possible. // Deprecated: please explicitly pick a version if possible.
Autoscaling() autoscalingv1.AutoscalingV1Interface Autoscaling() autoscalingv1.AutoscalingV1Interface
AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface
BatchV1() batchv1.BatchV1Interface BatchV1() batchv1.BatchV1Interface
// Deprecated: please explicitly pick a version if possible. // Deprecated: please explicitly pick a version if possible.
Batch() batchv1.BatchV1Interface Batch() batchv1.BatchV1Interface
...@@ -117,7 +117,7 @@ type Clientset struct { ...@@ -117,7 +117,7 @@ type Clientset struct {
authorizationV1 *authorizationv1.AuthorizationV1Client authorizationV1 *authorizationv1.AuthorizationV1Client
authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client
autoscalingV1 *autoscalingv1.AutoscalingV1Client autoscalingV1 *autoscalingv1.AutoscalingV1Client
autoscalingV2alpha1 *autoscalingv2alpha1.AutoscalingV2alpha1Client autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client
batchV1 *batchv1.BatchV1Client batchV1 *batchv1.BatchV1Client
batchV1beta1 *batchv1beta1.BatchV1beta1Client batchV1beta1 *batchv1beta1.BatchV1beta1Client
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
...@@ -205,9 +205,9 @@ func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface { ...@@ -205,9 +205,9 @@ func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
return c.autoscalingV1 return c.autoscalingV1
} }
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client
func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface { func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface {
return c.autoscalingV2alpha1 return c.autoscalingV2beta1
} }
// BatchV1 retrieves the BatchV1Client // BatchV1 retrieves the BatchV1Client
...@@ -393,7 +393,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { ...@@ -393,7 +393,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
cs.autoscalingV2alpha1, err = autoscalingv2alpha1.NewForConfig(&configShallowCopy) cs.autoscalingV2beta1, err = autoscalingv2beta1.NewForConfig(&configShallowCopy)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -478,7 +478,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { ...@@ -478,7 +478,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c) cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c)
cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c) cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c)
cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c) cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
cs.autoscalingV2alpha1 = autoscalingv2alpha1.NewForConfigOrDie(c) cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c)
cs.batchV1 = batchv1.NewForConfigOrDie(c) cs.batchV1 = batchv1.NewForConfigOrDie(c)
cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c) cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c) cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
...@@ -510,7 +510,7 @@ func New(c rest.Interface) *Clientset { ...@@ -510,7 +510,7 @@ func New(c rest.Interface) *Clientset {
cs.authorizationV1 = authorizationv1.New(c) cs.authorizationV1 = authorizationv1.New(c)
cs.authorizationV1beta1 = authorizationv1beta1.New(c) cs.authorizationV1beta1 = authorizationv1beta1.New(c)
cs.autoscalingV1 = autoscalingv1.New(c) cs.autoscalingV1 = autoscalingv1.New(c)
cs.autoscalingV2alpha1 = autoscalingv2alpha1.New(c) cs.autoscalingV2beta1 = autoscalingv2beta1.New(c)
cs.batchV1 = batchv1.New(c) cs.batchV1 = batchv1.New(c)
cs.batchV1beta1 = batchv1beta1.New(c) cs.batchV1beta1 = batchv1beta1.New(c)
cs.batchV2alpha1 = batchv2alpha1.New(c) cs.batchV2alpha1 = batchv2alpha1.New(c)
......
...@@ -21,7 +21,7 @@ go_library( ...@@ -21,7 +21,7 @@ go_library(
"//vendor/k8s.io/api/authorization/v1:go_default_library", "//vendor/k8s.io/api/authorization/v1:go_default_library",
"//vendor/k8s.io/api/authorization/v1beta1:go_default_library", "//vendor/k8s.io/api/authorization/v1beta1:go_default_library",
"//vendor/k8s.io/api/autoscaling/v1:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/api/batch/v1:go_default_library", "//vendor/k8s.io/api/batch/v1:go_default_library",
"//vendor/k8s.io/api/batch/v1beta1:go_default_library", "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
"//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
...@@ -61,8 +61,8 @@ go_library( ...@@ -61,8 +61,8 @@ go_library(
"//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
......
...@@ -38,8 +38,8 @@ import ( ...@@ -38,8 +38,8 @@ import (
fakeauthorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake" fakeauthorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake"
autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake" fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
fakeautoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake" fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake"
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake" fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
...@@ -171,9 +171,9 @@ func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface { ...@@ -171,9 +171,9 @@ func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake} return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake}
} }
// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client
func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface { func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface {
return &fakeautoscalingv2alpha1.FakeAutoscalingV2alpha1{Fake: &c.Fake} return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake}
} }
// BatchV1 retrieves the BatchV1Client // BatchV1 retrieves the BatchV1Client
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
authorizationv1 "k8s.io/api/authorization/v1" authorizationv1 "k8s.io/api/authorization/v1"
authorizationv1beta1 "k8s.io/api/authorization/v1beta1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1" batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1" batchv2alpha1 "k8s.io/api/batch/v2alpha1"
...@@ -79,7 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) { ...@@ -79,7 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) {
authorizationv1.AddToScheme(scheme) authorizationv1.AddToScheme(scheme)
authorizationv1beta1.AddToScheme(scheme) authorizationv1beta1.AddToScheme(scheme)
autoscalingv1.AddToScheme(scheme) autoscalingv1.AddToScheme(scheme)
autoscalingv2alpha1.AddToScheme(scheme) autoscalingv2beta1.AddToScheme(scheme)
batchv1.AddToScheme(scheme) batchv1.AddToScheme(scheme)
batchv1beta1.AddToScheme(scheme) batchv1beta1.AddToScheme(scheme)
batchv2alpha1.AddToScheme(scheme) batchv2alpha1.AddToScheme(scheme)
......
...@@ -20,7 +20,7 @@ go_library( ...@@ -20,7 +20,7 @@ go_library(
"//vendor/k8s.io/api/authorization/v1:go_default_library", "//vendor/k8s.io/api/authorization/v1:go_default_library",
"//vendor/k8s.io/api/authorization/v1beta1:go_default_library", "//vendor/k8s.io/api/authorization/v1beta1:go_default_library",
"//vendor/k8s.io/api/autoscaling/v1:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/api/batch/v1:go_default_library", "//vendor/k8s.io/api/batch/v1:go_default_library",
"//vendor/k8s.io/api/batch/v1beta1:go_default_library", "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
"//vendor/k8s.io/api/batch/v2alpha1:go_default_library", "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
authorizationv1 "k8s.io/api/authorization/v1" authorizationv1 "k8s.io/api/authorization/v1"
authorizationv1beta1 "k8s.io/api/authorization/v1beta1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1" batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1" batchv2alpha1 "k8s.io/api/batch/v2alpha1"
...@@ -79,7 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) { ...@@ -79,7 +79,7 @@ func AddToScheme(scheme *runtime.Scheme) {
authorizationv1.AddToScheme(scheme) authorizationv1.AddToScheme(scheme)
authorizationv1beta1.AddToScheme(scheme) authorizationv1beta1.AddToScheme(scheme)
autoscalingv1.AddToScheme(scheme) autoscalingv1.AddToScheme(scheme)
autoscalingv2alpha1.AddToScheme(scheme) autoscalingv2beta1.AddToScheme(scheme)
batchv1.AddToScheme(scheme) batchv1.AddToScheme(scheme)
batchv1beta1.AddToScheme(scheme) batchv1beta1.AddToScheme(scheme)
batchv2alpha1.AddToScheme(scheme) batchv2alpha1.AddToScheme(scheme)
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -13,8 +8,9 @@ go_library( ...@@ -13,8 +8,9 @@ go_library(
"generated_expansion.go", "generated_expansion.go",
"horizontalpodautoscaler.go", "horizontalpodautoscaler.go",
], ],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
...@@ -35,7 +31,8 @@ filegroup( ...@@ -35,7 +31,8 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [ srcs = [
":package-srcs", ":package-srcs",
"//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake:all-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -14,31 +14,31 @@ See the License for the specific language governing permissions and ...@@ -14,31 +14,31 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
import ( import (
v2alpha1 "k8s.io/api/autoscaling/v2alpha1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
serializer "k8s.io/apimachinery/pkg/runtime/serializer" serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
type AutoscalingV2alpha1Interface interface { type AutoscalingV2beta1Interface interface {
RESTClient() rest.Interface RESTClient() rest.Interface
HorizontalPodAutoscalersGetter HorizontalPodAutoscalersGetter
} }
// AutoscalingV2alpha1Client is used to interact with features provided by the autoscaling group. // AutoscalingV2beta1Client is used to interact with features provided by the autoscaling group.
type AutoscalingV2alpha1Client struct { type AutoscalingV2beta1Client struct {
restClient rest.Interface restClient rest.Interface
} }
func (c *AutoscalingV2alpha1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { func (c *AutoscalingV2beta1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
return newHorizontalPodAutoscalers(c, namespace) return newHorizontalPodAutoscalers(c, namespace)
} }
// NewForConfig creates a new AutoscalingV2alpha1Client for the given config. // NewForConfig creates a new AutoscalingV2beta1Client for the given config.
func NewForConfig(c *rest.Config) (*AutoscalingV2alpha1Client, error) { func NewForConfig(c *rest.Config) (*AutoscalingV2beta1Client, error) {
config := *c config := *c
if err := setConfigDefaults(&config); err != nil { if err := setConfigDefaults(&config); err != nil {
return nil, err return nil, err
...@@ -47,12 +47,12 @@ func NewForConfig(c *rest.Config) (*AutoscalingV2alpha1Client, error) { ...@@ -47,12 +47,12 @@ func NewForConfig(c *rest.Config) (*AutoscalingV2alpha1Client, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &AutoscalingV2alpha1Client{client}, nil return &AutoscalingV2beta1Client{client}, nil
} }
// NewForConfigOrDie creates a new AutoscalingV2alpha1Client for the given config and // NewForConfigOrDie creates a new AutoscalingV2beta1Client for the given config and
// panics if there is an error in the config. // panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AutoscalingV2alpha1Client { func NewForConfigOrDie(c *rest.Config) *AutoscalingV2beta1Client {
client, err := NewForConfig(c) client, err := NewForConfig(c)
if err != nil { if err != nil {
panic(err) panic(err)
...@@ -60,13 +60,13 @@ func NewForConfigOrDie(c *rest.Config) *AutoscalingV2alpha1Client { ...@@ -60,13 +60,13 @@ func NewForConfigOrDie(c *rest.Config) *AutoscalingV2alpha1Client {
return client return client
} }
// New creates a new AutoscalingV2alpha1Client for the given RESTClient. // New creates a new AutoscalingV2beta1Client for the given RESTClient.
func New(c rest.Interface) *AutoscalingV2alpha1Client { func New(c rest.Interface) *AutoscalingV2beta1Client {
return &AutoscalingV2alpha1Client{c} return &AutoscalingV2beta1Client{c}
} }
func setConfigDefaults(config *rest.Config) error { func setConfigDefaults(config *rest.Config) error {
gv := v2alpha1.SchemeGroupVersion gv := v2beta1.SchemeGroupVersion
config.GroupVersion = &gv config.GroupVersion = &gv
config.APIPath = "/apis" config.APIPath = "/apis"
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
...@@ -80,7 +80,7 @@ func setConfigDefaults(config *rest.Config) error { ...@@ -80,7 +80,7 @@ func setConfigDefaults(config *rest.Config) error {
// RESTClient returns a RESTClient that is used to communicate // RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation. // with API server by this client implementation.
func (c *AutoscalingV2alpha1Client) RESTClient() rest.Interface { func (c *AutoscalingV2beta1Client) RESTClient() rest.Interface {
if c == nil { if c == nil {
return nil return nil
} }
......
...@@ -17,4 +17,4 @@ limitations under the License. ...@@ -17,4 +17,4 @@ limitations under the License.
// This package is generated by client-gen with custom arguments. // This package is generated by client-gen with custom arguments.
// This package has the automatically generated typed clients. // This package has the automatically generated typed clients.
package v2alpha1 package v2beta1
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -12,14 +7,15 @@ go_library( ...@@ -12,14 +7,15 @@ go_library(
"fake_autoscaling_client.go", "fake_autoscaling_client.go",
"fake_horizontalpodautoscaler.go", "fake_horizontalpodautoscaler.go",
], ],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library",
"//vendor/k8s.io/client-go/testing:go_default_library", "//vendor/k8s.io/client-go/testing:go_default_library",
], ],
...@@ -36,4 +32,5 @@ filegroup( ...@@ -36,4 +32,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -17,22 +17,22 @@ limitations under the License. ...@@ -17,22 +17,22 @@ limitations under the License.
package fake package fake
import ( import (
v2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1" v2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
type FakeAutoscalingV2alpha1 struct { type FakeAutoscalingV2beta1 struct {
*testing.Fake *testing.Fake
} }
func (c *FakeAutoscalingV2alpha1) HorizontalPodAutoscalers(namespace string) v2alpha1.HorizontalPodAutoscalerInterface { func (c *FakeAutoscalingV2beta1) HorizontalPodAutoscalers(namespace string) v2beta1.HorizontalPodAutoscalerInterface {
return &FakeHorizontalPodAutoscalers{c, namespace} return &FakeHorizontalPodAutoscalers{c, namespace}
} }
// RESTClient returns a RESTClient that is used to communicate // RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation. // with API server by this client implementation.
func (c *FakeAutoscalingV2alpha1) RESTClient() rest.Interface { func (c *FakeAutoscalingV2beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient var ret *rest.RESTClient
return ret return ret
} }
...@@ -17,7 +17,7 @@ limitations under the License. ...@@ -17,7 +17,7 @@ limitations under the License.
package fake package fake
import ( import (
v2alpha1 "k8s.io/api/autoscaling/v2alpha1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema" schema "k8s.io/apimachinery/pkg/runtime/schema"
...@@ -28,29 +28,29 @@ import ( ...@@ -28,29 +28,29 @@ import (
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface // FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type FakeHorizontalPodAutoscalers struct { type FakeHorizontalPodAutoscalers struct {
Fake *FakeAutoscalingV2alpha1 Fake *FakeAutoscalingV2beta1
ns string ns string
} }
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2alpha1", Resource: "horizontalpodautoscalers"} var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta1", Resource: "horizontalpodautoscalers"}
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2alpha1", Kind: "HorizontalPodAutoscaler"} var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2alpha1.HorizontalPodAutoscaler{}) Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v2alpha1.HorizontalPodAutoscaler), err return obj.(*v2beta1.HorizontalPodAutoscaler), err
} }
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.HorizontalPodAutoscalerList, err error) { func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2alpha1.HorizontalPodAutoscalerList{}) Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta1.HorizontalPodAutoscalerList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
...@@ -60,8 +60,8 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alph ...@@ -60,8 +60,8 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alph
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
list := &v2alpha1.HorizontalPodAutoscalerList{} list := &v2beta1.HorizontalPodAutoscalerList{}
for _, item := range obj.(*v2alpha1.HorizontalPodAutoscalerList).Items { for _, item := range obj.(*v2beta1.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) { if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item) list.Items = append(list.Items, item)
} }
...@@ -77,43 +77,43 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interfa ...@@ -77,43 +77,43 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interfa
} }
// 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. // 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 *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2alpha1.HorizontalPodAutoscaler{}) Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v2alpha1.HorizontalPodAutoscaler), err return obj.(*v2beta1.HorizontalPodAutoscaler), err
} }
// 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. // 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 *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2alpha1.HorizontalPodAutoscaler{}) Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v2alpha1.HorizontalPodAutoscaler), err return obj.(*v2beta1.HorizontalPodAutoscaler), err
} }
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) { func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2alpha1.HorizontalPodAutoscaler{}) Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v2alpha1.HorizontalPodAutoscaler), err return obj.(*v2beta1.HorizontalPodAutoscaler), err
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2alpha1.HorizontalPodAutoscaler{}) Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{})
return err return err
} }
...@@ -122,17 +122,17 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt ...@@ -122,17 +122,17 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2alpha1.HorizontalPodAutoscalerList{}) _, err := c.Fake.Invokes(action, &v2beta1.HorizontalPodAutoscalerList{})
return err return err
} }
// Patch applies the patch and returns the patched horizontalPodAutoscaler. // Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v2alpha1.HorizontalPodAutoscaler{}) Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v2beta1.HorizontalPodAutoscaler{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
return obj.(*v2alpha1.HorizontalPodAutoscaler), err return obj.(*v2beta1.HorizontalPodAutoscaler), err
} }
...@@ -14,6 +14,6 @@ See the License for the specific language governing permissions and ...@@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
type HorizontalPodAutoscalerExpansion interface{} type HorizontalPodAutoscalerExpansion interface{}
...@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and ...@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v2alpha1 package v2beta1
import ( import (
v2alpha1 "k8s.io/api/autoscaling/v2alpha1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
...@@ -33,15 +33,15 @@ type HorizontalPodAutoscalersGetter interface { ...@@ -33,15 +33,15 @@ type HorizontalPodAutoscalersGetter interface {
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface { type HorizontalPodAutoscalerInterface interface {
Create(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) Create(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
Update(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) Update(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
UpdateStatus(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error) UpdateStatus(*v2beta1.HorizontalPodAutoscaler) (*v2beta1.HorizontalPodAutoscaler, error)
Delete(name string, options *v1.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2alpha1.HorizontalPodAutoscaler, error) Get(name string, options v1.GetOptions) (*v2beta1.HorizontalPodAutoscaler, error)
List(opts v1.ListOptions) (*v2alpha1.HorizontalPodAutoscalerList, error) List(opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion HorizontalPodAutoscalerExpansion
} }
...@@ -52,7 +52,7 @@ type horizontalPodAutoscalers struct { ...@@ -52,7 +52,7 @@ type horizontalPodAutoscalers struct {
} }
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers // newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
func newHorizontalPodAutoscalers(c *AutoscalingV2alpha1Client, namespace string) *horizontalPodAutoscalers { func newHorizontalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) *horizontalPodAutoscalers {
return &horizontalPodAutoscalers{ return &horizontalPodAutoscalers{
client: c.RESTClient(), client: c.RESTClient(),
ns: namespace, ns: namespace,
...@@ -60,8 +60,8 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2alpha1Client, namespace string) ...@@ -60,8 +60,8 @@ func newHorizontalPodAutoscalers(c *AutoscalingV2alpha1Client, namespace string)
} }
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. // 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 *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2alpha1.HorizontalPodAutoscaler{} result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -73,8 +73,8 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu ...@@ -73,8 +73,8 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu
} }
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.HorizontalPodAutoscalerList, err error) { func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
result = &v2alpha1.HorizontalPodAutoscalerList{} result = &v2beta1.HorizontalPodAutoscalerList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -95,8 +95,8 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, ...@@ -95,8 +95,8 @@ func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface,
} }
// 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. // 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 *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2alpha1.HorizontalPodAutoscaler{} result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Post(). err = c.client.Post().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -107,8 +107,8 @@ func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2alpha1.Hori ...@@ -107,8 +107,8 @@ func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2alpha1.Hori
} }
// 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. // 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 *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2alpha1.HorizontalPodAutoscaler{} result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -122,8 +122,8 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2alpha1.Hori ...@@ -122,8 +122,8 @@ func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2alpha1.Hori
// UpdateStatus was generated because the type contains a Status member. // UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2alpha1.HorizontalPodAutoscaler{} result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Put(). err = c.client.Put().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -158,8 +158,8 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l ...@@ -158,8 +158,8 @@ func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, l
} }
// Patch applies the patch and returns the patched horizontalPodAutoscaler. // Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) { func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
result = &v2alpha1.HorizontalPodAutoscaler{} result = &v2beta1.HorizontalPodAutoscaler{}
err = c.client.Patch(pt). err = c.client.Patch(pt).
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
......
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -11,6 +6,7 @@ go_library( ...@@ -11,6 +6,7 @@ go_library(
"expansion_generated.go", "expansion_generated.go",
"horizontalpodautoscaler.go", "horizontalpodautoscaler.go",
], ],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/api/autoscaling/v1:go_default_library", "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
...@@ -30,4 +26,5 @@ filegroup( ...@@ -30,4 +26,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
package(default_visibility = ["//visibility:public"]) load("@io_bazel_rules_go//go:def.bzl", "go_library")
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library( go_library(
name = "go_default_library", name = "go_default_library",
...@@ -11,8 +6,9 @@ go_library( ...@@ -11,8 +6,9 @@ go_library(
"expansion_generated.go", "expansion_generated.go",
"horizontalpodautoscaler.go", "horizontalpodautoscaler.go",
], ],
visibility = ["//visibility:public"],
deps = [ deps = [
"//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library", "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library", "//vendor/k8s.io/client-go/tools/cache:go_default_library",
...@@ -30,4 +26,5 @@ filegroup( ...@@ -30,4 +26,5 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [":package-srcs"],
tags = ["automanaged"], tags = ["automanaged"],
visibility = ["//visibility:public"],
) )
...@@ -16,7 +16,7 @@ limitations under the License. ...@@ -16,7 +16,7 @@ limitations under the License.
// This file was automatically generated by lister-gen // This file was automatically generated by lister-gen
package v2alpha1 package v2beta1
// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to // HorizontalPodAutoscalerListerExpansion allows custom methods to be added to
// HorizontalPodAutoscalerLister. // HorizontalPodAutoscalerLister.
......
...@@ -16,10 +16,10 @@ limitations under the License. ...@@ -16,10 +16,10 @@ limitations under the License.
// This file was automatically generated by lister-gen // This file was automatically generated by lister-gen
package v2alpha1 package v2beta1
import ( import (
v2alpha1 "k8s.io/api/autoscaling/v2alpha1" v2beta1 "k8s.io/api/autoscaling/v2beta1"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
...@@ -28,7 +28,7 @@ import ( ...@@ -28,7 +28,7 @@ import (
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. // HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
type HorizontalPodAutoscalerLister interface { type HorizontalPodAutoscalerLister interface {
// List lists all HorizontalPodAutoscalers in the indexer. // List lists all HorizontalPodAutoscalers in the indexer.
List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
HorizontalPodAutoscalerListerExpansion HorizontalPodAutoscalerListerExpansion
...@@ -45,9 +45,9 @@ func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutosc ...@@ -45,9 +45,9 @@ func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutosc
} }
// List lists all HorizontalPodAutoscalers in the indexer. // List lists all HorizontalPodAutoscalers in the indexer.
func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) { func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) { err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.HorizontalPodAutoscaler)) ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler))
}) })
return ret, err return ret, err
} }
...@@ -60,9 +60,9 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin ...@@ -60,9 +60,9 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. // HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
type HorizontalPodAutoscalerNamespaceLister interface { type HorizontalPodAutoscalerNamespaceLister interface {
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace. // List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
Get(name string) (*v2alpha1.HorizontalPodAutoscaler, error) Get(name string) (*v2beta1.HorizontalPodAutoscaler, error)
HorizontalPodAutoscalerNamespaceListerExpansion HorizontalPodAutoscalerNamespaceListerExpansion
} }
...@@ -74,21 +74,21 @@ type horizontalPodAutoscalerNamespaceLister struct { ...@@ -74,21 +74,21 @@ type horizontalPodAutoscalerNamespaceLister struct {
} }
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace. // List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.HorizontalPodAutoscaler, err error) { func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.HorizontalPodAutoscaler)) ret = append(ret, m.(*v2beta1.HorizontalPodAutoscaler))
}) })
return ret, err return ret, err
} }
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2alpha1.HorizontalPodAutoscaler, error) { func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2beta1.HorizontalPodAutoscaler, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if !exists { if !exists {
return nil, errors.NewNotFound(v2alpha1.Resource("horizontalpodautoscaler"), name) return nil, errors.NewNotFound(v2beta1.Resource("horizontalpodautoscaler"), name)
} }
return obj.(*v2alpha1.HorizontalPodAutoscaler), nil return obj.(*v2beta1.HorizontalPodAutoscaler), nil
} }
...@@ -76,7 +76,7 @@ func New() *Generator { ...@@ -76,7 +76,7 @@ func New() *Generator {
`k8s.io/api/extensions/v1beta1`, `k8s.io/api/extensions/v1beta1`,
`k8s.io/api/autoscaling/v1`, `k8s.io/api/autoscaling/v1`,
`k8s.io/api/authorization/v1`, `k8s.io/api/authorization/v1`,
`k8s.io/api/autoscaling/v2alpha1`, `k8s.io/api/autoscaling/v2beta1`,
`k8s.io/api/authorization/v1beta1`, `k8s.io/api/authorization/v1beta1`,
`k8s.io/api/batch/v1`, `k8s.io/api/batch/v1`,
`k8s.io/api/batch/v1beta1`, `k8s.io/api/batch/v1beta1`,
......
...@@ -181,8 +181,8 @@ var etcdStorageData = map[schema.GroupVersionResource]struct { ...@@ -181,8 +181,8 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
}, },
// -- // --
// k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1 // k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1
gvr("autoscaling", "v2alpha1", "horizontalpodautoscalers"): { gvr("autoscaling", "v2beta1", "horizontalpodautoscalers"): {
stub: `{"metadata": {"name": "hpa1"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`, stub: `{"metadata": {"name": "hpa1"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`,
expectedEtcdPath: "/registry/horizontalpodautoscalers/etcdstoragepathtestnamespace/hpa1", expectedEtcdPath: "/registry/horizontalpodautoscalers/etcdstoragepathtestnamespace/hpa1",
expectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"), expectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment