mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Autogenerated conversions, deep copies, types
This commit is contained in:
parent
90c647eff9
commit
e96515f590
30
api/swagger-spec/autoscaling.json
Normal file
30
api/swagger-spec/autoscaling.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"swaggerVersion": "1.2",
|
||||||
|
"apiVersion": "",
|
||||||
|
"basePath": "https://10.10.10.10:6443",
|
||||||
|
"resourcePath": "/apis/autoscaling",
|
||||||
|
"apis": [
|
||||||
|
{
|
||||||
|
"path": "/apis/autoscaling",
|
||||||
|
"description": "get information of a group",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "void",
|
||||||
|
"method": "GET",
|
||||||
|
"summary": "get information of a group",
|
||||||
|
"nickname": "getAPIGroup",
|
||||||
|
"parameters": [],
|
||||||
|
"produces": [
|
||||||
|
"application/json",
|
||||||
|
"application/yaml"
|
||||||
|
],
|
||||||
|
"consumes": [
|
||||||
|
"application/json",
|
||||||
|
"application/yaml"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"models": {}
|
||||||
|
}
|
1192
api/swagger-spec/autoscaling_v1.json
Normal file
1192
api/swagger-spec/autoscaling_v1.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,14 @@
|
|||||||
{
|
{
|
||||||
"path": "/apis/extensions",
|
"path": "/apis/extensions",
|
||||||
"description": "get information of a group"
|
"description": "get information of a group"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/apis/autoscaling/v1",
|
||||||
|
"description": "API at /apis/autoscaling/v1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/apis/autoscaling",
|
||||||
|
"description": "get information of a group"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"apiVersion": "",
|
"apiVersion": "",
|
||||||
|
@ -102,7 +102,7 @@ kube-apiserver
|
|||||||
--service-node-port-range=: A port range to reserve for services with NodePort visibility. Example: '30000-32767'. Inclusive at both ends of the range.
|
--service-node-port-range=: A port range to reserve for services with NodePort visibility. Example: '30000-32767'. Inclusive at both ends of the range.
|
||||||
--ssh-keyfile="": If non-empty, use secure SSH proxy to the nodes, using this user keyfile
|
--ssh-keyfile="": If non-empty, use secure SSH proxy to the nodes, using this user keyfile
|
||||||
--ssh-user="": If non-empty, use secure SSH proxy to the nodes, using this user name
|
--ssh-user="": If non-empty, use secure SSH proxy to the nodes, using this user name
|
||||||
--storage-versions="authorization.k8s.io/v1beta1,componentconfig/v1alpha1,extensions/v1beta1,metrics/v1alpha1,v1": The versions to store resources with. Different groups may be stored in different versions. Specified in the format "group1/version1,group2/version2...". This flag expects a complete list of storage versions of ALL groups registered in the server. It defaults to a list of preferred versions of all registered groups, which is derived from the KUBE_API_VERSIONS environment variable.
|
--storage-versions="authorization.k8s.io/v1beta1,autoscaling/v1,componentconfig/v1alpha1,extensions/v1beta1,metrics/v1alpha1,v1": The per-group version to store resources in. Specified in the format "group1/version1,group2/version2,...". In the case where objects are moved from one group to the other, you may specify the format "group1=group2/v1beta1,group3/v1beta1,...". You only need to pass the groups you wish to change from the defaults. It defaults to a list of preferred versions of all registered groups, which is derived from the KUBE_API_VERSIONS environment variable.
|
||||||
--tls-cert-file="": File containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If HTTPS serving is enabled, and --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to /var/run/kubernetes.
|
--tls-cert-file="": File containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If HTTPS serving is enabled, and --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to /var/run/kubernetes.
|
||||||
--tls-private-key-file="": File containing x509 private key matching --tls-cert-file.
|
--tls-private-key-file="": File containing x509 private key matching --tls-cert-file.
|
||||||
--token-auth-file="": If set, the file that will be used to secure the secure port of the API server via token authentication.
|
--token-auth-file="": If set, the file that will be used to secure the secure port of the API server via token authentication.
|
||||||
@ -110,7 +110,7 @@ kube-apiserver
|
|||||||
--watch-cache-sizes=[]: List of watch cache sizes for every resource (pods, nodes, etc.), comma separated. The individual override format: resource#size, where size is a number. It takes effect when watch-cache is enabled.
|
--watch-cache-sizes=[]: List of watch cache sizes for every resource (pods, nodes, etc.), comma separated. The individual override format: resource#size, where size is a number. It takes effect when watch-cache is enabled.
|
||||||
```
|
```
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 10-Feb-2016
|
###### Auto generated by spf13/cobra on 15-Feb-2016
|
||||||
|
|
||||||
|
|
||||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||||
|
29
pkg/apis/autoscaling/deep_copy_generated.go
Normal file
29
pkg/apis/autoscaling/deep_copy_generated.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS AUTO-GENERATED BY $KUBEROOT/hack/update-generated-deep-copies.sh.
|
||||||
|
|
||||||
|
package autoscaling
|
||||||
|
|
||||||
|
import api "k8s.io/kubernetes/pkg/api"
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
err := api.Scheme.AddGeneratedDeepCopyFuncs()
|
||||||
|
if err != nil {
|
||||||
|
// if one of the deep copy functions is malformed, detect it immediately.
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
352
pkg/apis/autoscaling/v1/conversion_generated.go
Normal file
352
pkg/apis/autoscaling/v1/conversion_generated.go
Normal file
@ -0,0 +1,352 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS AUTO-GENERATED BY $KUBEROOT/hack/update-generated-conversions.sh
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
reflect "reflect"
|
||||||
|
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
|
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||||
|
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||||
|
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||||
|
)
|
||||||
|
|
||||||
|
func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *v1.ObjectMeta, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*api.ObjectMeta))(in)
|
||||||
|
}
|
||||||
|
out.Name = in.Name
|
||||||
|
out.GenerateName = in.GenerateName
|
||||||
|
out.Namespace = in.Namespace
|
||||||
|
out.SelfLink = in.SelfLink
|
||||||
|
out.UID = in.UID
|
||||||
|
out.ResourceVersion = in.ResourceVersion
|
||||||
|
out.Generation = in.Generation
|
||||||
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// unable to generate simple pointer conversion for unversioned.Time -> unversioned.Time
|
||||||
|
if in.DeletionTimestamp != nil {
|
||||||
|
out.DeletionTimestamp = new(unversioned.Time)
|
||||||
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(in.DeletionTimestamp, out.DeletionTimestamp, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.DeletionTimestamp = nil
|
||||||
|
}
|
||||||
|
if in.DeletionGracePeriodSeconds != nil {
|
||||||
|
out.DeletionGracePeriodSeconds = new(int64)
|
||||||
|
*out.DeletionGracePeriodSeconds = *in.DeletionGracePeriodSeconds
|
||||||
|
} else {
|
||||||
|
out.DeletionGracePeriodSeconds = nil
|
||||||
|
}
|
||||||
|
if in.Labels != nil {
|
||||||
|
out.Labels = make(map[string]string)
|
||||||
|
for key, val := range in.Labels {
|
||||||
|
out.Labels[key] = val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Labels = nil
|
||||||
|
}
|
||||||
|
if in.Annotations != nil {
|
||||||
|
out.Annotations = make(map[string]string)
|
||||||
|
for key, val := range in.Annotations {
|
||||||
|
out.Annotations[key] = val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Annotations = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *v1.ObjectMeta, s conversion.Scope) error {
|
||||||
|
return autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *v1.ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*v1.ObjectMeta))(in)
|
||||||
|
}
|
||||||
|
out.Name = in.Name
|
||||||
|
out.GenerateName = in.GenerateName
|
||||||
|
out.Namespace = in.Namespace
|
||||||
|
out.SelfLink = in.SelfLink
|
||||||
|
out.UID = in.UID
|
||||||
|
out.ResourceVersion = in.ResourceVersion
|
||||||
|
out.Generation = in.Generation
|
||||||
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// unable to generate simple pointer conversion for unversioned.Time -> unversioned.Time
|
||||||
|
if in.DeletionTimestamp != nil {
|
||||||
|
out.DeletionTimestamp = new(unversioned.Time)
|
||||||
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(in.DeletionTimestamp, out.DeletionTimestamp, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.DeletionTimestamp = nil
|
||||||
|
}
|
||||||
|
if in.DeletionGracePeriodSeconds != nil {
|
||||||
|
out.DeletionGracePeriodSeconds = new(int64)
|
||||||
|
*out.DeletionGracePeriodSeconds = *in.DeletionGracePeriodSeconds
|
||||||
|
} else {
|
||||||
|
out.DeletionGracePeriodSeconds = nil
|
||||||
|
}
|
||||||
|
if in.Labels != nil {
|
||||||
|
out.Labels = make(map[string]string)
|
||||||
|
for key, val := range in.Labels {
|
||||||
|
out.Labels[key] = val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Labels = nil
|
||||||
|
}
|
||||||
|
if in.Annotations != nil {
|
||||||
|
out.Annotations = make(map[string]string)
|
||||||
|
for key, val := range in.Annotations {
|
||||||
|
out.Annotations[key] = val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Annotations = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_ObjectMeta_To_api_ObjectMeta(in *v1.ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_HorizontalPodAutoscaler_To_extensions_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *extensions.HorizontalPodAutoscaler, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*HorizontalPodAutoscaler))(in)
|
||||||
|
}
|
||||||
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_v1_HorizontalPodAutoscalerSpec_To_extensions_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_HorizontalPodAutoscaler_To_extensions_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *extensions.HorizontalPodAutoscaler, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_HorizontalPodAutoscaler_To_extensions_HorizontalPodAutoscaler(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_HorizontalPodAutoscalerList_To_extensions_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *extensions.HorizontalPodAutoscalerList, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*HorizontalPodAutoscalerList))(in)
|
||||||
|
}
|
||||||
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if in.Items != nil {
|
||||||
|
out.Items = make([]extensions.HorizontalPodAutoscaler, len(in.Items))
|
||||||
|
for i := range in.Items {
|
||||||
|
if err := Convert_v1_HorizontalPodAutoscaler_To_extensions_HorizontalPodAutoscaler(&in.Items[i], &out.Items[i], s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Items = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_HorizontalPodAutoscalerList_To_extensions_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *extensions.HorizontalPodAutoscalerList, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_HorizontalPodAutoscalerList_To_extensions_HorizontalPodAutoscalerList(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_HorizontalPodAutoscalerSpec_To_extensions_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *extensions.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*HorizontalPodAutoscalerSpec))(in)
|
||||||
|
}
|
||||||
|
// in.ScaleTargetRef has no peer in out
|
||||||
|
if in.MinReplicas != nil {
|
||||||
|
out.MinReplicas = new(int)
|
||||||
|
*out.MinReplicas = int(*in.MinReplicas)
|
||||||
|
} else {
|
||||||
|
out.MinReplicas = nil
|
||||||
|
}
|
||||||
|
out.MaxReplicas = int(in.MaxReplicas)
|
||||||
|
// in.TargetCPUUtilizationPercentage has no peer in out
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *extensions.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*HorizontalPodAutoscalerStatus))(in)
|
||||||
|
}
|
||||||
|
if in.ObservedGeneration != nil {
|
||||||
|
out.ObservedGeneration = new(int64)
|
||||||
|
*out.ObservedGeneration = *in.ObservedGeneration
|
||||||
|
} else {
|
||||||
|
out.ObservedGeneration = nil
|
||||||
|
}
|
||||||
|
// unable to generate simple pointer conversion for unversioned.Time -> unversioned.Time
|
||||||
|
if in.LastScaleTime != nil {
|
||||||
|
out.LastScaleTime = new(unversioned.Time)
|
||||||
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(in.LastScaleTime, out.LastScaleTime, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.LastScaleTime = nil
|
||||||
|
}
|
||||||
|
out.CurrentReplicas = int(in.CurrentReplicas)
|
||||||
|
out.DesiredReplicas = int(in.DesiredReplicas)
|
||||||
|
if in.CurrentCPUUtilizationPercentage != nil {
|
||||||
|
out.CurrentCPUUtilizationPercentage = new(int)
|
||||||
|
*out.CurrentCPUUtilizationPercentage = int(*in.CurrentCPUUtilizationPercentage)
|
||||||
|
} else {
|
||||||
|
out.CurrentCPUUtilizationPercentage = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *extensions.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_extensions_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *extensions.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*extensions.HorizontalPodAutoscaler))(in)
|
||||||
|
}
|
||||||
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_extensions_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := Convert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_extensions_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *extensions.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
|
||||||
|
return autoConvert_extensions_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_extensions_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *extensions.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*extensions.HorizontalPodAutoscalerList))(in)
|
||||||
|
}
|
||||||
|
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if in.Items != nil {
|
||||||
|
out.Items = make([]HorizontalPodAutoscaler, len(in.Items))
|
||||||
|
for i := range in.Items {
|
||||||
|
if err := Convert_extensions_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(&in.Items[i], &out.Items[i], s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Items = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_extensions_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *extensions.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
|
||||||
|
return autoConvert_extensions_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_extensions_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *extensions.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*extensions.HorizontalPodAutoscalerSpec))(in)
|
||||||
|
}
|
||||||
|
// in.ScaleRef has no peer in out
|
||||||
|
if in.MinReplicas != nil {
|
||||||
|
out.MinReplicas = new(int32)
|
||||||
|
*out.MinReplicas = int32(*in.MinReplicas)
|
||||||
|
} else {
|
||||||
|
out.MinReplicas = nil
|
||||||
|
}
|
||||||
|
out.MaxReplicas = int32(in.MaxReplicas)
|
||||||
|
// in.CPUUtilization has no peer in out
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *extensions.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
|
||||||
|
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||||
|
defaulting.(func(*extensions.HorizontalPodAutoscalerStatus))(in)
|
||||||
|
}
|
||||||
|
if in.ObservedGeneration != nil {
|
||||||
|
out.ObservedGeneration = new(int64)
|
||||||
|
*out.ObservedGeneration = *in.ObservedGeneration
|
||||||
|
} else {
|
||||||
|
out.ObservedGeneration = nil
|
||||||
|
}
|
||||||
|
// unable to generate simple pointer conversion for unversioned.Time -> unversioned.Time
|
||||||
|
if in.LastScaleTime != nil {
|
||||||
|
out.LastScaleTime = new(unversioned.Time)
|
||||||
|
if err := api.Convert_unversioned_Time_To_unversioned_Time(in.LastScaleTime, out.LastScaleTime, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.LastScaleTime = nil
|
||||||
|
}
|
||||||
|
out.CurrentReplicas = int32(in.CurrentReplicas)
|
||||||
|
out.DesiredReplicas = int32(in.DesiredReplicas)
|
||||||
|
if in.CurrentCPUUtilizationPercentage != nil {
|
||||||
|
out.CurrentCPUUtilizationPercentage = new(int32)
|
||||||
|
*out.CurrentCPUUtilizationPercentage = int32(*in.CurrentCPUUtilizationPercentage)
|
||||||
|
} else {
|
||||||
|
out.CurrentCPUUtilizationPercentage = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *extensions.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
|
||||||
|
return autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
err := api.Scheme.AddGeneratedConversionFuncs(
|
||||||
|
autoConvert_api_ObjectMeta_To_v1_ObjectMeta,
|
||||||
|
autoConvert_extensions_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList,
|
||||||
|
autoConvert_extensions_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec,
|
||||||
|
autoConvert_extensions_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus,
|
||||||
|
autoConvert_extensions_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler,
|
||||||
|
autoConvert_v1_HorizontalPodAutoscalerList_To_extensions_HorizontalPodAutoscalerList,
|
||||||
|
autoConvert_v1_HorizontalPodAutoscalerSpec_To_extensions_HorizontalPodAutoscalerSpec,
|
||||||
|
autoConvert_v1_HorizontalPodAutoscalerStatus_To_extensions_HorizontalPodAutoscalerStatus,
|
||||||
|
autoConvert_v1_HorizontalPodAutoscaler_To_extensions_HorizontalPodAutoscaler,
|
||||||
|
autoConvert_v1_ObjectMeta_To_api_ObjectMeta,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
// If one of the conversion functions is malformed, detect it immediately.
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
200
pkg/apis/autoscaling/v1/deep_copy_generated.go
Normal file
200
pkg/apis/autoscaling/v1/deep_copy_generated.go
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// DO NOT EDIT. THIS FILE IS AUTO-GENERATED BY $KUBEROOT/hack/update-generated-deep-copies.sh.
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
api "k8s.io/kubernetes/pkg/api"
|
||||||
|
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||||
|
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||||
|
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||||
|
)
|
||||||
|
|
||||||
|
func deepCopy_unversioned_ListMeta(in unversioned.ListMeta, out *unversioned.ListMeta, c *conversion.Cloner) error {
|
||||||
|
out.SelfLink = in.SelfLink
|
||||||
|
out.ResourceVersion = in.ResourceVersion
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_unversioned_Time(in unversioned.Time, out *unversioned.Time, c *conversion.Cloner) error {
|
||||||
|
if newVal, err := c.DeepCopy(in.Time); err != nil {
|
||||||
|
return err
|
||||||
|
} else {
|
||||||
|
out.Time = newVal.(time.Time)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_unversioned_TypeMeta(in unversioned.TypeMeta, out *unversioned.TypeMeta, c *conversion.Cloner) error {
|
||||||
|
out.Kind = in.Kind
|
||||||
|
out.APIVersion = in.APIVersion
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_v1_ObjectMeta(in v1.ObjectMeta, out *v1.ObjectMeta, c *conversion.Cloner) error {
|
||||||
|
out.Name = in.Name
|
||||||
|
out.GenerateName = in.GenerateName
|
||||||
|
out.Namespace = in.Namespace
|
||||||
|
out.SelfLink = in.SelfLink
|
||||||
|
out.UID = in.UID
|
||||||
|
out.ResourceVersion = in.ResourceVersion
|
||||||
|
out.Generation = in.Generation
|
||||||
|
if err := deepCopy_unversioned_Time(in.CreationTimestamp, &out.CreationTimestamp, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if in.DeletionTimestamp != nil {
|
||||||
|
out.DeletionTimestamp = new(unversioned.Time)
|
||||||
|
if err := deepCopy_unversioned_Time(*in.DeletionTimestamp, out.DeletionTimestamp, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.DeletionTimestamp = nil
|
||||||
|
}
|
||||||
|
if in.DeletionGracePeriodSeconds != nil {
|
||||||
|
out.DeletionGracePeriodSeconds = new(int64)
|
||||||
|
*out.DeletionGracePeriodSeconds = *in.DeletionGracePeriodSeconds
|
||||||
|
} else {
|
||||||
|
out.DeletionGracePeriodSeconds = nil
|
||||||
|
}
|
||||||
|
if in.Labels != nil {
|
||||||
|
out.Labels = make(map[string]string)
|
||||||
|
for key, val := range in.Labels {
|
||||||
|
out.Labels[key] = val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Labels = nil
|
||||||
|
}
|
||||||
|
if in.Annotations != nil {
|
||||||
|
out.Annotations = make(map[string]string)
|
||||||
|
for key, val := range in.Annotations {
|
||||||
|
out.Annotations[key] = val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Annotations = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_v1_CrossVersionObjectReference(in CrossVersionObjectReference, out *CrossVersionObjectReference, c *conversion.Cloner) error {
|
||||||
|
out.Kind = in.Kind
|
||||||
|
out.Name = in.Name
|
||||||
|
out.APIVersion = in.APIVersion
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_v1_HorizontalPodAutoscaler(in HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, c *conversion.Cloner) error {
|
||||||
|
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := deepCopy_v1_HorizontalPodAutoscalerSpec(in.Spec, &out.Spec, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := deepCopy_v1_HorizontalPodAutoscalerStatus(in.Status, &out.Status, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_v1_HorizontalPodAutoscalerList(in HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, c *conversion.Cloner) error {
|
||||||
|
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if in.Items != nil {
|
||||||
|
out.Items = make([]HorizontalPodAutoscaler, len(in.Items))
|
||||||
|
for i := range in.Items {
|
||||||
|
if err := deepCopy_v1_HorizontalPodAutoscaler(in.Items[i], &out.Items[i], c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Items = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_v1_HorizontalPodAutoscalerSpec(in HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, c *conversion.Cloner) error {
|
||||||
|
if err := deepCopy_v1_CrossVersionObjectReference(in.ScaleTargetRef, &out.ScaleTargetRef, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if in.MinReplicas != nil {
|
||||||
|
out.MinReplicas = new(int32)
|
||||||
|
*out.MinReplicas = *in.MinReplicas
|
||||||
|
} else {
|
||||||
|
out.MinReplicas = nil
|
||||||
|
}
|
||||||
|
out.MaxReplicas = in.MaxReplicas
|
||||||
|
if in.TargetCPUUtilizationPercentage != nil {
|
||||||
|
out.TargetCPUUtilizationPercentage = new(int32)
|
||||||
|
*out.TargetCPUUtilizationPercentage = *in.TargetCPUUtilizationPercentage
|
||||||
|
} else {
|
||||||
|
out.TargetCPUUtilizationPercentage = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func deepCopy_v1_HorizontalPodAutoscalerStatus(in HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, c *conversion.Cloner) error {
|
||||||
|
if in.ObservedGeneration != nil {
|
||||||
|
out.ObservedGeneration = new(int64)
|
||||||
|
*out.ObservedGeneration = *in.ObservedGeneration
|
||||||
|
} else {
|
||||||
|
out.ObservedGeneration = nil
|
||||||
|
}
|
||||||
|
if in.LastScaleTime != nil {
|
||||||
|
out.LastScaleTime = new(unversioned.Time)
|
||||||
|
if err := deepCopy_unversioned_Time(*in.LastScaleTime, out.LastScaleTime, c); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.LastScaleTime = nil
|
||||||
|
}
|
||||||
|
out.CurrentReplicas = in.CurrentReplicas
|
||||||
|
out.DesiredReplicas = in.DesiredReplicas
|
||||||
|
if in.CurrentCPUUtilizationPercentage != nil {
|
||||||
|
out.CurrentCPUUtilizationPercentage = new(int32)
|
||||||
|
*out.CurrentCPUUtilizationPercentage = *in.CurrentCPUUtilizationPercentage
|
||||||
|
} else {
|
||||||
|
out.CurrentCPUUtilizationPercentage = nil
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
err := api.Scheme.AddGeneratedDeepCopyFuncs(
|
||||||
|
deepCopy_unversioned_ListMeta,
|
||||||
|
deepCopy_unversioned_Time,
|
||||||
|
deepCopy_unversioned_TypeMeta,
|
||||||
|
deepCopy_v1_ObjectMeta,
|
||||||
|
deepCopy_v1_CrossVersionObjectReference,
|
||||||
|
deepCopy_v1_HorizontalPodAutoscaler,
|
||||||
|
deepCopy_v1_HorizontalPodAutoscalerList,
|
||||||
|
deepCopy_v1_HorizontalPodAutoscalerSpec,
|
||||||
|
deepCopy_v1_HorizontalPodAutoscalerStatus,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
// if one of the deep copy functions is malformed, detect it immediately.
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
1937
pkg/apis/autoscaling/v1/types.generated.go
Normal file
1937
pkg/apis/autoscaling/v1/types.generated.go
Normal file
File diff suppressed because it is too large
Load Diff
87
pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
Normal file
87
pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package v1
|
||||||
|
|
||||||
|
// This file contains a collection of methods that can be used from go-resful to
|
||||||
|
// generate Swagger API documentation for its models. Please read this PR for more
|
||||||
|
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||||
|
//
|
||||||
|
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||||
|
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||||
|
// Any context after a --- is ignored.
|
||||||
|
//
|
||||||
|
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||||
|
|
||||||
|
// AUTO-GENERATED FUNCTIONS START HERE
|
||||||
|
var map_CrossVersionObjectReference = map[string]string{
|
||||||
|
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
|
"kind": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"",
|
||||||
|
"name": "Name of the referent; More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
|
||||||
|
"apiVersion": "API version of the referent",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
||||||
|
return map_CrossVersionObjectReference
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_HorizontalPodAutoscaler = map[string]string{
|
||||||
|
"": "configuration of a horizontal pod autoscaler.",
|
||||||
|
"metadata": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||||
|
"spec": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.",
|
||||||
|
"status": "current information about the autoscaler.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
|
||||||
|
return map_HorizontalPodAutoscaler
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_HorizontalPodAutoscalerList = map[string]string{
|
||||||
|
"": "list of horizontal pod autoscaler objects.",
|
||||||
|
"metadata": "Standard list metadata.",
|
||||||
|
"items": "list of horizontal pod autoscaler objects.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
|
||||||
|
return map_HorizontalPodAutoscalerList
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_HorizontalPodAutoscalerSpec = map[string]string{
|
||||||
|
"": "specification of a horizontal pod autoscaler.",
|
||||||
|
"scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.",
|
||||||
|
"minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.",
|
||||||
|
"maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
||||||
|
"targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods;",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
|
||||||
|
return map_HorizontalPodAutoscalerSpec
|
||||||
|
}
|
||||||
|
|
||||||
|
var map_HorizontalPodAutoscalerStatus = map[string]string{
|
||||||
|
"": "current status of a horizontal pod autoscaler",
|
||||||
|
"observedGeneration": "most recent generation observed by this autoscaler.",
|
||||||
|
"lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
|
||||||
|
"currentReplicas": "current number of replicas of pods managed by this autoscaler.",
|
||||||
|
"desiredReplicas": "desired number of replicas of pods managed by this autoscaler.",
|
||||||
|
"currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
|
||||||
|
return map_HorizontalPodAutoscalerStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
// AUTO-GENERATED FUNCTIONS END HERE
|
Loading…
Reference in New Issue
Block a user