Commit 77f58131 authored by Daniel Smith's avatar Daniel Smith

update generated files, including the client

parent bd7d7cc0
...@@ -25,10 +25,17 @@ import ( ...@@ -25,10 +25,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1beta1_Cluster_To_federation_Cluster, Convert_v1beta1_Cluster_To_federation_Cluster,
Convert_federation_Cluster_To_v1beta1_Cluster, Convert_federation_Cluster_To_v1beta1_Cluster,
Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition, Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition,
...@@ -41,10 +48,7 @@ func init() { ...@@ -41,10 +48,7 @@ func init() {
Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus, Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus,
Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR, Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR,
Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR, Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error {
......
...@@ -21,24 +21,27 @@ limitations under the License. ...@@ -21,24 +21,27 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Cluster, InType: reflect.TypeOf(&Cluster{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Cluster, InType: reflect.TypeOf(&Cluster{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterCondition, InType: reflect.TypeOf(&ClusterCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterCondition, InType: reflect.TypeOf(&ClusterCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterList, InType: reflect.TypeOf(&ClusterList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterList, InType: reflect.TypeOf(&ClusterList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterSpec, InType: reflect.TypeOf(&ClusterSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterSpec, InType: reflect.TypeOf(&ClusterSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterStatus, InType: reflect.TypeOf(&ClusterStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterStatus, InType: reflect.TypeOf(&ClusterStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -23,11 +23,18 @@ package federation ...@@ -23,11 +23,18 @@ package federation
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_Cluster, InType: reflect.TypeOf(&Cluster{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_Cluster, InType: reflect.TypeOf(&Cluster{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterCondition, InType: reflect.TypeOf(&ClusterCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterCondition, InType: reflect.TypeOf(&ClusterCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterList, InType: reflect.TypeOf(&ClusterList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterList, InType: reflect.TypeOf(&ClusterList{})},
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterStatus, InType: reflect.TypeOf(&ClusterStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ClusterStatus, InType: reflect.TypeOf(&ClusterStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_FederatedReplicaSetPreferences, InType: reflect.TypeOf(&FederatedReplicaSetPreferences{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_FederatedReplicaSetPreferences, InType: reflect.TypeOf(&FederatedReplicaSetPreferences{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_federation_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_federation_Cluster(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_federation_Cluster(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -29,7 +29,13 @@ import ( ...@@ -29,7 +29,13 @@ import (
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource, Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource, Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
Convert_v1_Affinity_To_api_Affinity, Convert_v1_Affinity_To_api_Affinity,
...@@ -334,10 +340,7 @@ func init() { ...@@ -334,10 +340,7 @@ func init() {
Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource, Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource,
Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm, Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm,
Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm, Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error { func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
......
...@@ -21,7 +21,6 @@ limitations under the License. ...@@ -21,7 +21,6 @@ limitations under the License.
package v1 package v1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime" runtime "k8s.io/kubernetes/pkg/runtime"
...@@ -30,7 +29,13 @@ import ( ...@@ -30,7 +29,13 @@ import (
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Affinity, InType: reflect.TypeOf(&Affinity{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Affinity, InType: reflect.TypeOf(&Affinity{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
...@@ -183,10 +188,7 @@ func init() { ...@@ -183,10 +188,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -31,7 +31,13 @@ import ( ...@@ -31,7 +31,13 @@ import (
) )
func init() { func init() {
if err := Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Affinity, InType: reflect.TypeOf(&Affinity{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Affinity, InType: reflect.TypeOf(&Affinity{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
...@@ -186,10 +192,7 @@ func init() { ...@@ -186,10 +192,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
apps "k8s.io/kubernetes/pkg/apis/apps" apps "k8s.io/kubernetes/pkg/apis/apps"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_PetSet_To_apps_PetSet, Convert_v1alpha1_PetSet_To_apps_PetSet,
Convert_apps_PetSet_To_v1alpha1_PetSet, Convert_apps_PetSet_To_v1alpha1_PetSet,
Convert_v1alpha1_PetSetList_To_apps_PetSetList, Convert_v1alpha1_PetSetList_To_apps_PetSetList,
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec, Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus, Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus,
Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus, Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error { func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
......
...@@ -21,23 +21,26 @@ limitations under the License. ...@@ -21,23 +21,26 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,19 +24,23 @@ import ( ...@@ -24,19 +24,23 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(&PetSet{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(&PetSet{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(&PetSetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
authentication "k8s.io/kubernetes/pkg/apis/authentication" authentication "k8s.io/kubernetes/pkg/apis/authentication"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1beta1_TokenReview_To_authentication_TokenReview, Convert_v1beta1_TokenReview_To_authentication_TokenReview,
Convert_authentication_TokenReview_To_v1beta1_TokenReview, Convert_authentication_TokenReview_To_v1beta1_TokenReview,
Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec, Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec,
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus, Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus,
Convert_v1beta1_UserInfo_To_authentication_UserInfo, Convert_v1beta1_UserInfo_To_authentication_UserInfo,
Convert_authentication_UserInfo_To_v1beta1_UserInfo, Convert_authentication_UserInfo_To_v1beta1_UserInfo,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
......
...@@ -21,22 +21,25 @@ limitations under the License. ...@@ -21,22 +21,25 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(&TokenReview{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(&UserInfo{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -23,19 +23,23 @@ package authentication ...@@ -23,19 +23,23 @@ package authentication
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
authorization "k8s.io/kubernetes/pkg/apis/authorization" authorization "k8s.io/kubernetes/pkg/apis/authorization"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview, Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview,
Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview, Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview,
Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes, Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes,
...@@ -44,10 +51,7 @@ func init() { ...@@ -44,10 +51,7 @@ func init() {
Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec, Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec,
Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus, Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus, Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
......
...@@ -21,14 +21,20 @@ limitations under the License. ...@@ -21,14 +21,20 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
...@@ -37,10 +43,7 @@ func init() { ...@@ -37,10 +43,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -23,11 +23,18 @@ package authorization ...@@ -23,11 +23,18 @@ package authorization
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference, Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference,
Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference, Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference,
Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
...@@ -44,10 +51,7 @@ func init() { ...@@ -44,10 +51,7 @@ func init() {
Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec, Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec,
Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus, Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus,
Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus, Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
......
...@@ -21,15 +21,21 @@ limitations under the License. ...@@ -21,15 +21,21 @@ limitations under the License.
package v1 package v1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
api_v1 "k8s.io/kubernetes/pkg/api/v1" api_v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
...@@ -38,10 +44,7 @@ func init() { ...@@ -38,10 +44,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,11 +24,18 @@ import ( ...@@ -24,11 +24,18 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
...@@ -37,10 +44,7 @@ func init() { ...@@ -37,10 +44,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -26,10 +26,17 @@ import ( ...@@ -26,10 +26,17 @@ import (
api_v1 "k8s.io/kubernetes/pkg/api/v1" api_v1 "k8s.io/kubernetes/pkg/api/v1"
batch "k8s.io/kubernetes/pkg/apis/batch" batch "k8s.io/kubernetes/pkg/apis/batch"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1_Job_To_batch_Job, Convert_v1_Job_To_batch_Job,
Convert_batch_Job_To_v1_Job, Convert_batch_Job_To_v1_Job,
Convert_v1_JobCondition_To_batch_JobCondition, Convert_v1_JobCondition_To_batch_JobCondition,
...@@ -44,10 +51,7 @@ func init() { ...@@ -44,10 +51,7 @@ func init() {
Convert_unversioned_LabelSelector_To_v1_LabelSelector, Convert_unversioned_LabelSelector_To_v1_LabelSelector,
Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement, Convert_v1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement, Convert_unversioned_LabelSelectorRequirement_To_v1_LabelSelectorRequirement,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
......
...@@ -21,15 +21,21 @@ limitations under the License. ...@@ -21,15 +21,21 @@ limitations under the License.
package v1 package v1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
api_v1 "k8s.io/kubernetes/pkg/api/v1" api_v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Job, InType: reflect.TypeOf(&Job{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Job, InType: reflect.TypeOf(&Job{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobCondition, InType: reflect.TypeOf(&JobCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobList, InType: reflect.TypeOf(&JobList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobList, InType: reflect.TypeOf(&JobList{})},
...@@ -37,10 +43,7 @@ func init() { ...@@ -37,10 +43,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobStatus, InType: reflect.TypeOf(&JobStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -26,10 +26,17 @@ import ( ...@@ -26,10 +26,17 @@ import (
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
batch "k8s.io/kubernetes/pkg/apis/batch" batch "k8s.io/kubernetes/pkg/apis/batch"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v2alpha1_Job_To_batch_Job, Convert_v2alpha1_Job_To_batch_Job,
Convert_batch_Job_To_v2alpha1_Job, Convert_batch_Job_To_v2alpha1_Job,
Convert_v2alpha1_JobCondition_To_batch_JobCondition, Convert_v2alpha1_JobCondition_To_batch_JobCondition,
...@@ -56,10 +63,7 @@ func init() { ...@@ -56,10 +63,7 @@ func init() {
Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec, Convert_batch_ScheduledJobSpec_To_v2alpha1_ScheduledJobSpec,
Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus, Convert_v2alpha1_ScheduledJobStatus_To_batch_ScheduledJobStatus,
Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus, Convert_batch_ScheduledJobStatus_To_v2alpha1_ScheduledJobStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
......
...@@ -21,15 +21,21 @@ limitations under the License. ...@@ -21,15 +21,21 @@ limitations under the License.
package v2alpha1 package v2alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_Job, InType: reflect.TypeOf(&Job{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_Job, InType: reflect.TypeOf(&Job{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobCondition, InType: reflect.TypeOf(&JobCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobList, InType: reflect.TypeOf(&JobList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobList, InType: reflect.TypeOf(&JobList{})},
...@@ -43,10 +49,7 @@ func init() { ...@@ -43,10 +49,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,11 +24,18 @@ import ( ...@@ -24,11 +24,18 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_Job, InType: reflect.TypeOf(&Job{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_Job, InType: reflect.TypeOf(&Job{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobCondition, InType: reflect.TypeOf(&JobCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobList, InType: reflect.TypeOf(&JobList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobList, InType: reflect.TypeOf(&JobList{})},
...@@ -40,10 +47,7 @@ func init() { ...@@ -40,10 +47,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobList, InType: reflect.TypeOf(&ScheduledJobList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobSpec, InType: reflect.TypeOf(&ScheduledJobSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_ScheduledJobStatus, InType: reflect.TypeOf(&ScheduledJobStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
certificates "k8s.io/kubernetes/pkg/apis/certificates" certificates "k8s.io/kubernetes/pkg/apis/certificates"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest,
Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest, Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest,
Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition,
...@@ -38,10 +45,7 @@ func init() { ...@@ -38,10 +45,7 @@ func init() {
Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec, Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec,
Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus,
Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus, Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
......
...@@ -21,23 +21,26 @@ limitations under the License. ...@@ -21,23 +21,26 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -23,20 +23,24 @@ package certificates ...@@ -23,20 +23,24 @@ package certificates
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,11 +24,18 @@ import ( ...@@ -24,11 +24,18 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
componentconfig "k8s.io/kubernetes/pkg/apis/componentconfig" componentconfig "k8s.io/kubernetes/pkg/apis/componentconfig"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
config "k8s.io/kubernetes/pkg/util/config" config "k8s.io/kubernetes/pkg/util/config"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration, Convert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration,
Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration, Convert_componentconfig_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration,
Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration, Convert_v1alpha1_KubeSchedulerConfiguration_To_componentconfig_KubeSchedulerConfiguration,
...@@ -37,10 +44,7 @@ func init() { ...@@ -37,10 +44,7 @@ func init() {
Convert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfiguration, Convert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfiguration,
Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration, Convert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderElectionConfiguration,
Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration, Convert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderElectionConfiguration,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error { func autoConvert_v1alpha1_KubeProxyConfiguration_To_componentconfig_KubeProxyConfiguration(in *KubeProxyConfiguration, out *componentconfig.KubeProxyConfiguration, s conversion.Scope) error {
......
...@@ -21,21 +21,24 @@ limitations under the License. ...@@ -21,21 +21,24 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeProxyConfiguration, InType: reflect.TypeOf(&KubeProxyConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeProxyConfiguration, InType: reflect.TypeOf(&KubeProxyConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeSchedulerConfiguration, InType: reflect.TypeOf(&KubeSchedulerConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeSchedulerConfiguration, InType: reflect.TypeOf(&KubeSchedulerConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeletConfiguration, InType: reflect.TypeOf(&KubeletConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_KubeletConfiguration, InType: reflect.TypeOf(&KubeletConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_LeaderElectionConfiguration, InType: reflect.TypeOf(&LeaderElectionConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_LeaderElectionConfiguration, InType: reflect.TypeOf(&LeaderElectionConfiguration{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1alpha1_KubeProxyConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1alpha1_KubeProxyConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -21,14 +21,20 @@ limitations under the License. ...@@ -21,14 +21,20 @@ limitations under the License.
package componentconfig package componentconfig
import ( import (
api "k8s.io/kubernetes/pkg/api"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
config "k8s.io/kubernetes/pkg/util/config" config "k8s.io/kubernetes/pkg/util/config"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_IPVar, InType: reflect.TypeOf(&IPVar{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_IPVar, InType: reflect.TypeOf(&IPVar{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeControllerManagerConfiguration, InType: reflect.TypeOf(&KubeControllerManagerConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeControllerManagerConfiguration, InType: reflect.TypeOf(&KubeControllerManagerConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeProxyConfiguration, InType: reflect.TypeOf(&KubeProxyConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_KubeProxyConfiguration, InType: reflect.TypeOf(&KubeProxyConfiguration{})},
...@@ -38,10 +44,7 @@ func init() { ...@@ -38,10 +44,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_PersistentVolumeRecyclerConfiguration, InType: reflect.TypeOf(&PersistentVolumeRecyclerConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_PersistentVolumeRecyclerConfiguration, InType: reflect.TypeOf(&PersistentVolumeRecyclerConfiguration{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_PortRangeVar, InType: reflect.TypeOf(&PortRangeVar{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_PortRangeVar, InType: reflect.TypeOf(&PortRangeVar{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_VolumeConfiguration, InType: reflect.TypeOf(&VolumeConfiguration{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_componentconfig_VolumeConfiguration, InType: reflect.TypeOf(&VolumeConfiguration{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_componentconfig_IPVar(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_componentconfig_IPVar(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -28,10 +28,17 @@ import ( ...@@ -28,10 +28,17 @@ import (
batch "k8s.io/kubernetes/pkg/apis/batch" batch "k8s.io/kubernetes/pkg/apis/batch"
extensions "k8s.io/kubernetes/pkg/apis/extensions" extensions "k8s.io/kubernetes/pkg/apis/extensions"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1beta1_APIVersion_To_extensions_APIVersion, Convert_v1beta1_APIVersion_To_extensions_APIVersion,
Convert_extensions_APIVersion_To_v1beta1_APIVersion, Convert_extensions_APIVersion_To_v1beta1_APIVersion,
Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus, Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus,
...@@ -170,10 +177,7 @@ func init() { ...@@ -170,10 +177,7 @@ func init() {
Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList, Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList,
Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList, Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList,
Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList, Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error { func autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
......
...@@ -21,16 +21,22 @@ limitations under the License. ...@@ -21,16 +21,22 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
intstr "k8s.io/kubernetes/pkg/util/intstr" intstr "k8s.io/kubernetes/pkg/util/intstr"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_APIVersion, InType: reflect.TypeOf(&APIVersion{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_APIVersion, InType: reflect.TypeOf(&APIVersion{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CPUTargetUtilization, InType: reflect.TypeOf(&CPUTargetUtilization{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CPUTargetUtilization, InType: reflect.TypeOf(&CPUTargetUtilization{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})},
...@@ -102,10 +108,7 @@ func init() { ...@@ -102,10 +108,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1beta1_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,12 +24,19 @@ import ( ...@@ -24,12 +24,19 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
intstr "k8s.io/kubernetes/pkg/util/intstr" intstr "k8s.io/kubernetes/pkg/util/intstr"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_APIVersion, InType: reflect.TypeOf(&APIVersion{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_APIVersion, InType: reflect.TypeOf(&APIVersion{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})},
...@@ -86,10 +93,7 @@ func init() { ...@@ -86,10 +93,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_extensions_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_extensions_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
policy "k8s.io/kubernetes/pkg/apis/policy" policy "k8s.io/kubernetes/pkg/apis/policy"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget, Convert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget,
Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget, Convert_policy_PodDisruptionBudget_To_v1alpha1_PodDisruptionBudget,
Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList, Convert_v1alpha1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList,
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec, Convert_policy_PodDisruptionBudgetSpec_To_v1alpha1_PodDisruptionBudgetSpec,
Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus, Convert_v1alpha1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus,
Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus, Convert_policy_PodDisruptionBudgetStatus_To_v1alpha1_PodDisruptionBudgetStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { func autoConvert_v1alpha1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
......
...@@ -21,23 +21,26 @@ limitations under the License. ...@@ -21,23 +21,26 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1alpha1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1alpha1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,19 +24,23 @@ import ( ...@@ -24,19 +24,23 @@ import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -28,7 +28,13 @@ import ( ...@@ -28,7 +28,13 @@ import (
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole, Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole,
Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole, Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole,
Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding, Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
...@@ -49,10 +55,7 @@ func init() { ...@@ -49,10 +55,7 @@ func init() {
Convert_rbac_RoleList_To_v1alpha1_RoleList, Convert_rbac_RoleList_To_v1alpha1_RoleList,
Convert_v1alpha1_Subject_To_rbac_Subject, Convert_v1alpha1_Subject_To_rbac_Subject,
Convert_rbac_Subject_To_v1alpha1_Subject, Convert_rbac_Subject_To_v1alpha1_Subject,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
......
...@@ -21,7 +21,6 @@ limitations under the License. ...@@ -21,7 +21,6 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
conversion "k8s.io/kubernetes/pkg/conversion" conversion "k8s.io/kubernetes/pkg/conversion"
runtime "k8s.io/kubernetes/pkg/runtime" runtime "k8s.io/kubernetes/pkg/runtime"
...@@ -29,7 +28,13 @@ import ( ...@@ -29,7 +28,13 @@ import (
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
...@@ -40,10 +45,7 @@ func init() { ...@@ -40,10 +45,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleList, InType: reflect.TypeOf(&RoleList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleList, InType: reflect.TypeOf(&RoleList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Subject, InType: reflect.TypeOf(&Subject{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Subject, InType: reflect.TypeOf(&Subject{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -28,7 +28,13 @@ import ( ...@@ -28,7 +28,13 @@ import (
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
}
// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
...@@ -39,10 +45,7 @@ func init() { ...@@ -39,10 +45,7 @@ func init() {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleList, InType: reflect.TypeOf(&RoleList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleList, InType: reflect.TypeOf(&RoleList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Subject, InType: reflect.TypeOf(&Subject{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Subject, InType: reflect.TypeOf(&Subject{})},
); err != nil { )
// if one of the deep copy functions is malformed, detect it immediately.
panic(err)
}
} }
func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -32,6 +32,7 @@ import ( ...@@ -32,6 +32,7 @@ import (
"k8s.io/client-go/1.4/pkg/conversion/queryparams" "k8s.io/client-go/1.4/pkg/conversion/queryparams"
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
"k8s.io/client-go/1.4/pkg/runtime/serializer" "k8s.io/client-go/1.4/pkg/runtime/serializer"
"k8s.io/client-go/1.4/pkg/util/flowcontrol"
"k8s.io/client-go/1.4/pkg/watch" "k8s.io/client-go/1.4/pkg/watch"
"k8s.io/client-go/1.4/rest" "k8s.io/client-go/1.4/rest"
) )
...@@ -54,13 +55,9 @@ func NewClient(conf *rest.Config) (*Client, error) { ...@@ -54,13 +55,9 @@ func NewClient(conf *rest.Config) (*Client, error) {
confCopy := *conf confCopy := *conf
conf = &confCopy conf = &confCopy
codec := dynamicCodec{}
// TODO: it's questionable that this should be using anything other than unstructured schema and JSON // TODO: it's questionable that this should be using anything other than unstructured schema and JSON
conf.ContentType = runtime.ContentTypeJSON conf.ContentType = runtime.ContentTypeJSON
conf.AcceptContentTypes = runtime.ContentTypeJSON conf.AcceptContentTypes = runtime.ContentTypeJSON
streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
conf.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}, streamingInfo)
if conf.APIPath == "" { if conf.APIPath == "" {
conf.APIPath = "/api" conf.APIPath = "/api"
...@@ -69,6 +66,10 @@ func NewClient(conf *rest.Config) (*Client, error) { ...@@ -69,6 +66,10 @@ func NewClient(conf *rest.Config) (*Client, error) {
if len(conf.UserAgent) == 0 { if len(conf.UserAgent) == 0 {
conf.UserAgent = rest.DefaultKubernetesUserAgent() conf.UserAgent = rest.DefaultKubernetesUserAgent()
} }
if conf.NegotiatedSerializer == nil {
streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
conf.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: dynamicCodec{}}, streamingInfo)
}
cl, err := rest.RESTClientFor(conf) cl, err := rest.RESTClientFor(conf)
if err != nil { if err != nil {
...@@ -78,6 +79,11 @@ func NewClient(conf *rest.Config) (*Client, error) { ...@@ -78,6 +79,11 @@ func NewClient(conf *rest.Config) (*Client, error) {
return &Client{cl: cl}, nil return &Client{cl: cl}, nil
} }
// GetRateLimiter returns rate limier.
func (c *Client) GetRateLimiter() flowcontrol.RateLimiter {
return c.cl.GetRateLimiter()
}
// Resource returns an API interface to the specified resource for this client's // Resource returns an API interface to the specified resource for this client's
// group and version. If resource is not a namespaced resource, then namespace // group and version. If resource is not a namespaced resource, then namespace
// is ignored. // is ignored.
...@@ -119,19 +125,17 @@ type ResourceClient struct { ...@@ -119,19 +125,17 @@ type ResourceClient struct {
} }
// List returns a list of objects for this resource. // List returns a list of objects for this resource.
func (rc *ResourceClient) List(opts runtime.Object) (*runtime.UnstructuredList, error) { func (rc *ResourceClient) List(opts runtime.Object) (runtime.Object, error) {
result := new(runtime.UnstructuredList)
parameterEncoder := rc.parameterCodec parameterEncoder := rc.parameterCodec
if parameterEncoder == nil { if parameterEncoder == nil {
parameterEncoder = defaultParameterEncoder parameterEncoder = defaultParameterEncoder
} }
err := rc.cl.Get(). return rc.cl.Get().
NamespaceIfScoped(rc.ns, rc.resource.Namespaced). NamespaceIfScoped(rc.ns, rc.resource.Namespaced).
Resource(rc.resource.Name). Resource(rc.resource.Name).
VersionedParams(opts, parameterEncoder). VersionedParams(opts, parameterEncoder).
Do(). Do().
Into(result) Get()
return result, err
} }
// Get gets the resource with the specified name. // Get gets the resource with the specified name.
......
...@@ -19,7 +19,10 @@ package dynamic ...@@ -19,7 +19,10 @@ package dynamic
import ( import (
"sync" "sync"
"k8s.io/client-go/1.4/pkg/api"
"k8s.io/client-go/1.4/pkg/api/unversioned" "k8s.io/client-go/1.4/pkg/api/unversioned"
"k8s.io/client-go/1.4/pkg/runtime"
"k8s.io/client-go/1.4/pkg/runtime/serializer"
"k8s.io/client-go/1.4/rest" "k8s.io/client-go/1.4/rest"
) )
...@@ -77,6 +80,12 @@ func (c *clientPoolImpl) ClientForGroupVersion(groupVersion unversioned.GroupVer ...@@ -77,6 +80,12 @@ func (c *clientPoolImpl) ClientForGroupVersion(groupVersion unversioned.GroupVer
// we need to make a client // we need to make a client
conf.GroupVersion = &groupVersion conf.GroupVersion = &groupVersion
if conf.NegotiatedSerializer == nil {
streamingInfo, _ := api.Codecs.StreamingSerializerForMediaType("application/json;stream=watch", nil)
conf.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: dynamicCodec{}}, streamingInfo)
}
dynamicClient, err := NewClient(conf) dynamicClient, err := NewClient(conf)
if err != nil { if err != nil {
return nil, err return nil, err
......
...@@ -24,23 +24,14 @@ import ( ...@@ -24,23 +24,14 @@ import (
"k8s.io/client-go/1.4/pkg/conversion" "k8s.io/client-go/1.4/pkg/conversion"
"k8s.io/client-go/1.4/pkg/fields" "k8s.io/client-go/1.4/pkg/fields"
"k8s.io/client-go/1.4/pkg/labels" "k8s.io/client-go/1.4/pkg/labels"
"k8s.io/client-go/1.4/pkg/runtime"
"k8s.io/client-go/1.4/pkg/util/intstr" "k8s.io/client-go/1.4/pkg/util/intstr"
utillabels "k8s.io/client-go/1.4/pkg/util/labels" utillabels "k8s.io/client-go/1.4/pkg/util/labels"
"k8s.io/client-go/1.4/pkg/util/validation/field" "k8s.io/client-go/1.4/pkg/util/validation/field"
) )
func init() { func addConversionFuncs(scheme *runtime.Scheme) error {
Scheme.AddDefaultingFuncs( return scheme.AddConversionFuncs(
func(obj *ListOptions) {
if obj.LabelSelector == nil {
obj.LabelSelector = labels.Everything()
}
if obj.FieldSelector == nil {
obj.FieldSelector = fields.Everything()
}
},
)
Scheme.AddConversionFuncs(
Convert_unversioned_TypeMeta_To_unversioned_TypeMeta, Convert_unversioned_TypeMeta_To_unversioned_TypeMeta,
Convert_unversioned_ListMeta_To_unversioned_ListMeta, Convert_unversioned_ListMeta_To_unversioned_ListMeta,
...@@ -234,6 +225,9 @@ func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out * ...@@ -234,6 +225,9 @@ func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *
} }
func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *unversioned.LabelSelector, s conversion.Scope) error { func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *unversioned.LabelSelector, s conversion.Scope) error {
if in == nil {
return nil
}
out = new(unversioned.LabelSelector) out = new(unversioned.LabelSelector)
for labelKey, labelValue := range *in { for labelKey, labelValue := range *in {
utillabels.AddLabelToSelector(out, labelKey, labelValue) utillabels.AddLabelToSelector(out, labelKey, labelValue)
......
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package api
import (
"k8s.io/client-go/1.4/pkg/fields"
"k8s.io/client-go/1.4/pkg/labels"
"k8s.io/client-go/1.4/pkg/runtime"
)
func addDefaultingFuncs(scheme *runtime.Scheme) error {
return scheme.AddDefaultingFuncs(
func(obj *ListOptions) {
if obj.LabelSelector == nil {
obj.LabelSelector = labels.Everything()
}
if obj.FieldSelector == nil {
obj.FieldSelector = fields.Everything()
}
},
)
}
...@@ -29,10 +29,8 @@ import ( ...@@ -29,10 +29,8 @@ import (
"k8s.io/client-go/1.4/pkg/api/v1" "k8s.io/client-go/1.4/pkg/api/v1"
"k8s.io/client-go/1.4/pkg/apimachinery" "k8s.io/client-go/1.4/pkg/apimachinery"
"k8s.io/client-go/1.4/pkg/apimachinery/registered" "k8s.io/client-go/1.4/pkg/apimachinery/registered"
"k8s.io/client-go/1.4/pkg/conversion"
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
"k8s.io/client-go/1.4/pkg/util/sets" "k8s.io/client-go/1.4/pkg/util/sets"
"k8s.io/client-go/1.4/pkg/watch/versioned"
) )
const importPrefix = "k8s.io/client-go/1.4/pkg/api" const importPrefix = "k8s.io/client-go/1.4/pkg/api"
...@@ -140,7 +138,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e ...@@ -140,7 +138,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme // add the internal version to Scheme
api.AddToScheme(api.Scheme) if err := api.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
// add the enabled external versions to Scheme // add the enabled external versions to Scheme
for _, v := range externalVersions { for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) { if !registered.IsEnabledVersion(v) {
...@@ -149,103 +150,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { ...@@ -149,103 +150,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
} }
switch v { switch v {
case v1.SchemeGroupVersion: case v1.SchemeGroupVersion:
v1.AddToScheme(api.Scheme) if err := v1.AddToScheme(api.Scheme); err != nil {
} // Programmer error, detect immediately
} panic(err)
// This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are
// converted the most in the cluster.
// TODO: generate one of these for every external API group - this is to prove the impact
api.Scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
switch a := objA.(type) {
case *v1.Pod:
switch b := objB.(type) {
case *api.Pod:
return true, v1.Convert_v1_Pod_To_api_Pod(a, b, s)
}
case *api.Pod:
switch b := objB.(type) {
case *v1.Pod:
return true, v1.Convert_api_Pod_To_v1_Pod(a, b, s)
}
case *v1.Event:
switch b := objB.(type) {
case *api.Event:
return true, v1.Convert_v1_Event_To_api_Event(a, b, s)
}
case *api.Event:
switch b := objB.(type) {
case *v1.Event:
return true, v1.Convert_api_Event_To_v1_Event(a, b, s)
}
case *v1.ReplicationController:
switch b := objB.(type) {
case *api.ReplicationController:
return true, v1.Convert_v1_ReplicationController_To_api_ReplicationController(a, b, s)
}
case *api.ReplicationController:
switch b := objB.(type) {
case *v1.ReplicationController:
return true, v1.Convert_api_ReplicationController_To_v1_ReplicationController(a, b, s)
}
case *v1.Node:
switch b := objB.(type) {
case *api.Node:
return true, v1.Convert_v1_Node_To_api_Node(a, b, s)
}
case *api.Node:
switch b := objB.(type) {
case *v1.Node:
return true, v1.Convert_api_Node_To_v1_Node(a, b, s)
}
case *v1.Namespace:
switch b := objB.(type) {
case *api.Namespace:
return true, v1.Convert_v1_Namespace_To_api_Namespace(a, b, s)
}
case *api.Namespace:
switch b := objB.(type) {
case *v1.Namespace:
return true, v1.Convert_api_Namespace_To_v1_Namespace(a, b, s)
}
case *v1.Service:
switch b := objB.(type) {
case *api.Service:
return true, v1.Convert_v1_Service_To_api_Service(a, b, s)
}
case *api.Service:
switch b := objB.(type) {
case *v1.Service:
return true, v1.Convert_api_Service_To_v1_Service(a, b, s)
}
case *v1.Endpoints:
switch b := objB.(type) {
case *api.Endpoints:
return true, v1.Convert_v1_Endpoints_To_api_Endpoints(a, b, s)
}
case *api.Endpoints:
switch b := objB.(type) {
case *v1.Endpoints:
return true, v1.Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
}
case *versioned.Event:
switch b := objB.(type) {
case *versioned.InternalEvent:
return true, versioned.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
}
case *versioned.InternalEvent:
switch b := objB.(type) {
case *versioned.Event:
return true, versioned.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
} }
} }
return false, nil }
})
} }
...@@ -23,6 +23,10 @@ import ( ...@@ -23,6 +23,10 @@ import (
) )
// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered. // Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
// NOTE: If you are copying this file to start a new api group, STOP! Copy the
// extensions group instead. This Scheme is special and should appear ONLY in
// the api group, unless you really know what you're doing.
// TODO(lavalamp): make the above error impossible.
var Scheme = runtime.NewScheme() var Scheme = runtime.NewScheme()
// Codecs provides access to encoding and decoding for the scheme // Codecs provides access to encoding and decoding for the scheme
...@@ -51,10 +55,29 @@ func Resource(resource string) unversioned.GroupResource { ...@@ -51,10 +55,29 @@ func Resource(resource string) unversioned.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource() return SchemeGroupVersion.WithResource(resource).GroupResource()
} }
func AddToScheme(scheme *runtime.Scheme) { var (
if err := Scheme.AddIgnoredConversionType(&unversioned.TypeMeta{}, &unversioned.TypeMeta{}); err != nil { SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
AddToScheme = SchemeBuilder.AddToScheme
)
func init() {
// TODO(lavalamp): move this call to scheme builder above. Can't
// remove it from here because lots of people inapropriately rely on it
// (specifically the unversioned time conversion). Can't have it in
// both places because then it gets double registered. Consequence of
// current state is that it only ever gets registered in the main
// api.Scheme, even though everyone that uses anything from unversioned
// needs these.
if err := addConversionFuncs(Scheme); err != nil {
// Programmer error.
panic(err) panic(err)
} }
}
func addKnownTypes(scheme *runtime.Scheme) error {
if err := scheme.AddIgnoredConversionType(&unversioned.TypeMeta{}, &unversioned.TypeMeta{}); err != nil {
return err
}
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&Pod{}, &Pod{},
&PodList{}, &PodList{},
...@@ -104,7 +127,7 @@ func AddToScheme(scheme *runtime.Scheme) { ...@@ -104,7 +127,7 @@ func AddToScheme(scheme *runtime.Scheme) {
) )
// Register Unversioned types under their own special group // Register Unversioned types under their own special group
Scheme.AddUnversionedTypes(Unversioned, scheme.AddUnversionedTypes(Unversioned,
&unversioned.ExportOptions{}, &unversioned.ExportOptions{},
&unversioned.Status{}, &unversioned.Status{},
&unversioned.APIVersions{}, &unversioned.APIVersions{},
...@@ -112,4 +135,5 @@ func AddToScheme(scheme *runtime.Scheme) { ...@@ -112,4 +135,5 @@ func AddToScheme(scheme *runtime.Scheme) {
&unversioned.APIGroup{}, &unversioned.APIGroup{},
&unversioned.APIResourceList{}, &unversioned.APIResourceList{},
) )
return nil
} }
...@@ -38,9 +38,32 @@ var _ = proto.Marshal ...@@ -38,9 +38,32 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *Quantity) Reset() { *m = Quantity{} } // This is a compile-time assertion to ensure that this generated file
func (*Quantity) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *Quantity) Reset() { *m = Quantity{} }
func (*Quantity) ProtoMessage() {}
func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func init() { func init() {
proto.RegisterType((*Quantity)(nil), "k8s.io.client-go.1.4.pkg.api.resource.Quantity") proto.RegisterType((*Quantity)(nil), "k8s.io.client-go.1.4.pkg.api.resource.Quantity")
} }
var fileDescriptorGenerated = []byte{
// 222 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xca, 0xb6, 0x28, 0xd6,
0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2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00, 0x00, 0xff, 0xff, 0x90, 0x1c, 0x7f, 0xff, 0x20, 0x01, 0x00, 0x00,
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -26,6 +26,7 @@ import ( ...@@ -26,6 +26,7 @@ import (
"k8s.io/client-go/1.4/pkg/conversion" "k8s.io/client-go/1.4/pkg/conversion"
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
"k8s.io/client-go/1.4/pkg/util/validation/field" "k8s.io/client-go/1.4/pkg/util/validation/field"
"k8s.io/client-go/1.4/pkg/watch/versioned"
) )
const ( const (
...@@ -39,7 +40,106 @@ const ( ...@@ -39,7 +40,106 @@ const (
NonConvertibleAnnotationPrefix = "kubernetes.io/non-convertible" NonConvertibleAnnotationPrefix = "kubernetes.io/non-convertible"
) )
func addConversionFuncs(scheme *runtime.Scheme) { // This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are
// converted the most in the cluster.
// TODO: generate one of these for every external API group - this is to prove the impact
func addFastPathConversionFuncs(scheme *runtime.Scheme) error {
scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
switch a := objA.(type) {
case *Pod:
switch b := objB.(type) {
case *api.Pod:
return true, Convert_v1_Pod_To_api_Pod(a, b, s)
}
case *api.Pod:
switch b := objB.(type) {
case *Pod:
return true, Convert_api_Pod_To_v1_Pod(a, b, s)
}
case *Event:
switch b := objB.(type) {
case *api.Event:
return true, Convert_v1_Event_To_api_Event(a, b, s)
}
case *api.Event:
switch b := objB.(type) {
case *Event:
return true, Convert_api_Event_To_v1_Event(a, b, s)
}
case *ReplicationController:
switch b := objB.(type) {
case *api.ReplicationController:
return true, Convert_v1_ReplicationController_To_api_ReplicationController(a, b, s)
}
case *api.ReplicationController:
switch b := objB.(type) {
case *ReplicationController:
return true, Convert_api_ReplicationController_To_v1_ReplicationController(a, b, s)
}
case *Node:
switch b := objB.(type) {
case *api.Node:
return true, Convert_v1_Node_To_api_Node(a, b, s)
}
case *api.Node:
switch b := objB.(type) {
case *Node:
return true, Convert_api_Node_To_v1_Node(a, b, s)
}
case *Namespace:
switch b := objB.(type) {
case *api.Namespace:
return true, Convert_v1_Namespace_To_api_Namespace(a, b, s)
}
case *api.Namespace:
switch b := objB.(type) {
case *Namespace:
return true, Convert_api_Namespace_To_v1_Namespace(a, b, s)
}
case *Service:
switch b := objB.(type) {
case *api.Service:
return true, Convert_v1_Service_To_api_Service(a, b, s)
}
case *api.Service:
switch b := objB.(type) {
case *Service:
return true, Convert_api_Service_To_v1_Service(a, b, s)
}
case *Endpoints:
switch b := objB.(type) {
case *api.Endpoints:
return true, Convert_v1_Endpoints_To_api_Endpoints(a, b, s)
}
case *api.Endpoints:
switch b := objB.(type) {
case *Endpoints:
return true, Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
}
case *versioned.Event:
switch b := objB.(type) {
case *versioned.InternalEvent:
return true, versioned.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
}
case *versioned.InternalEvent:
switch b := objB.(type) {
case *versioned.Event:
return true, versioned.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
}
}
return false, nil
})
return nil
}
func addConversionFuncs(scheme *runtime.Scheme) error {
// Add non-generated conversion functions // Add non-generated conversion functions
err := scheme.AddConversionFuncs( err := scheme.AddConversionFuncs(
Convert_api_Pod_To_v1_Pod, Convert_api_Pod_To_v1_Pod,
...@@ -60,8 +160,7 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -60,8 +160,7 @@ func addConversionFuncs(scheme *runtime.Scheme) {
Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus, Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus,
) )
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
// Add field label conversions for kinds having selectable nothing but ObjectMeta fields. // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
...@@ -82,10 +181,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -82,10 +181,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label %q not supported for %q", label, kind) return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
} }
...@@ -108,10 +207,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -108,10 +207,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Node", err = api.Scheme.AddFieldLabelConversionFunc("v1", "Node",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
...@@ -123,10 +222,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -123,10 +222,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("v1", "ReplicationController", err = api.Scheme.AddFieldLabelConversionFunc("v1", "ReplicationController",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
...@@ -140,8 +239,7 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -140,8 +239,7 @@ func addConversionFuncs(scheme *runtime.Scheme) {
} }
}) })
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Event", err = api.Scheme.AddFieldLabelConversionFunc("v1", "Event",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
...@@ -162,10 +260,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -162,10 +260,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Namespace", err = api.Scheme.AddFieldLabelConversionFunc("v1", "Namespace",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
...@@ -176,10 +274,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -176,10 +274,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume", err = api.Scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
...@@ -189,10 +287,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -189,10 +287,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("v1", "Secret", err = api.Scheme.AddFieldLabelConversionFunc("v1", "Secret",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
...@@ -204,11 +302,12 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -204,11 +302,12 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
)
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
return nil
} }
func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error { func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error {
......
...@@ -23,8 +23,8 @@ import ( ...@@ -23,8 +23,8 @@ import (
"k8s.io/client-go/1.4/pkg/util/parsers" "k8s.io/client-go/1.4/pkg/util/parsers"
) )
func addDefaultingFuncs(scheme *runtime.Scheme) { func addDefaultingFuncs(scheme *runtime.Scheme) error {
scheme.AddDefaultingFuncs( return scheme.AddDefaultingFuncs(
SetDefaults_PodExecOptions, SetDefaults_PodExecOptions,
SetDefaults_PodAttachOptions, SetDefaults_PodAttachOptions,
SetDefaults_ReplicationController, SetDefaults_ReplicationController,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -28,15 +28,13 @@ const GroupName = "" ...@@ -28,15 +28,13 @@ const GroupName = ""
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"} var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
func AddToScheme(scheme *runtime.Scheme) { var (
// Add the API to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs)
addKnownTypes(scheme) AddToScheme = SchemeBuilder.AddToScheme
addConversionFuncs(scheme) )
addDefaultingFuncs(scheme)
}
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&Pod{}, &Pod{},
&PodList{}, &PodList{},
...@@ -91,4 +89,5 @@ func addKnownTypes(scheme *runtime.Scheme) { ...@@ -91,4 +89,5 @@ func addKnownTypes(scheme *runtime.Scheme) {
// Add the watch version that applies // Add the watch version that applies
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -29,7 +29,13 @@ import ( ...@@ -29,7 +29,13 @@ import (
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource, Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource, Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
Convert_v1_Affinity_To_api_Affinity, Convert_v1_Affinity_To_api_Affinity,
...@@ -334,10 +340,7 @@ func init() { ...@@ -334,10 +340,7 @@ func init() {
Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource, Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource,
Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm, Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm,
Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm, Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error { func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
......
...@@ -598,7 +598,7 @@ func validateGitRepoVolumeSource(gitRepo *api.GitRepoVolumeSource, fldPath *fiel ...@@ -598,7 +598,7 @@ func validateGitRepoVolumeSource(gitRepo *api.GitRepoVolumeSource, fldPath *fiel
allErrs = append(allErrs, field.Required(fldPath.Child("repository"), "")) allErrs = append(allErrs, field.Required(fldPath.Child("repository"), ""))
} }
pathErrs := validateVolumeSourcePath(gitRepo.Directory, fldPath.Child("directory")) pathErrs := validateLocalDescendingPath(gitRepo.Directory, fldPath.Child("directory"))
allErrs = append(allErrs, pathErrs...) allErrs = append(allErrs, pathErrs...)
return allErrs return allErrs
} }
...@@ -660,6 +660,11 @@ func validateSecretVolumeSource(secretSource *api.SecretVolumeSource, fldPath *f ...@@ -660,6 +660,11 @@ func validateSecretVolumeSource(secretSource *api.SecretVolumeSource, fldPath *f
if len(secretSource.SecretName) == 0 { if len(secretSource.SecretName) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("secretName"), "")) allErrs = append(allErrs, field.Required(fldPath.Child("secretName"), ""))
} }
itemsPath := fldPath.Child("items")
for i, kp := range secretSource.Items {
itemPath := itemsPath.Index(i)
allErrs = append(allErrs, validateKeyToPath(&kp, itemPath)...)
}
return allErrs return allErrs
} }
...@@ -668,6 +673,23 @@ func validateConfigMapVolumeSource(configMapSource *api.ConfigMapVolumeSource, f ...@@ -668,6 +673,23 @@ func validateConfigMapVolumeSource(configMapSource *api.ConfigMapVolumeSource, f
if len(configMapSource.Name) == 0 { if len(configMapSource.Name) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
} }
itemsPath := fldPath.Child("items")
for i, kp := range configMapSource.Items {
itemPath := itemsPath.Index(i)
allErrs = append(allErrs, validateKeyToPath(&kp, itemPath)...)
}
return allErrs
}
func validateKeyToPath(kp *api.KeyToPath, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
if len(kp.Key) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("key"), ""))
}
if len(kp.Path) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
}
allErrs = append(allErrs, validateLocalNonReservedPath(kp.Path, fldPath.Child("path"))...)
return allErrs return allErrs
} }
...@@ -715,22 +737,26 @@ func validateFlockerVolumeSource(flocker *api.FlockerVolumeSource, fldPath *fiel ...@@ -715,22 +737,26 @@ func validateFlockerVolumeSource(flocker *api.FlockerVolumeSource, fldPath *fiel
return allErrs return allErrs
} }
var validDownwardAPIFieldPathExpressions = sets.NewString("metadata.name", "metadata.namespace", "metadata.labels", "metadata.annotations") var validDownwardAPIFieldPathExpressions = sets.NewString(
"metadata.name",
"metadata.namespace",
"metadata.labels",
"metadata.annotations")
func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource, fldPath *field.Path) field.ErrorList { func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{} allErrs := field.ErrorList{}
for _, downwardAPIVolumeFile := range downwardAPIVolume.Items { for _, file := range downwardAPIVolume.Items {
if len(downwardAPIVolumeFile.Path) == 0 { if len(file.Path) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("path"), "")) allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
} }
allErrs = append(allErrs, validateVolumeSourcePath(downwardAPIVolumeFile.Path, fldPath.Child("path"))...) allErrs = append(allErrs, validateLocalNonReservedPath(file.Path, fldPath.Child("path"))...)
if downwardAPIVolumeFile.FieldRef != nil { if file.FieldRef != nil {
allErrs = append(allErrs, validateObjectFieldSelector(downwardAPIVolumeFile.FieldRef, &validDownwardAPIFieldPathExpressions, fldPath.Child("fieldRef"))...) allErrs = append(allErrs, validateObjectFieldSelector(file.FieldRef, &validDownwardAPIFieldPathExpressions, fldPath.Child("fieldRef"))...)
if downwardAPIVolumeFile.ResourceFieldRef != nil { if file.ResourceFieldRef != nil {
allErrs = append(allErrs, field.Invalid(fldPath, "resource", "fieldRef and resourceFieldRef can not be specified simultaneously")) allErrs = append(allErrs, field.Invalid(fldPath, "resource", "fieldRef and resourceFieldRef can not be specified simultaneously"))
} }
} else if downwardAPIVolumeFile.ResourceFieldRef != nil { } else if file.ResourceFieldRef != nil {
allErrs = append(allErrs, validateContainerResourceFieldSelector(downwardAPIVolumeFile.ResourceFieldRef, &validContainerResourceFieldPathExpressions, fldPath.Child("resourceFieldRef"), true)...) allErrs = append(allErrs, validateContainerResourceFieldSelector(file.ResourceFieldRef, &validContainerResourceFieldPathExpressions, fldPath.Child("resourceFieldRef"), true)...)
} else { } else {
allErrs = append(allErrs, field.Required(fldPath, "one of fieldRef and resourceFieldRef is required")) allErrs = append(allErrs, field.Required(fldPath, "one of fieldRef and resourceFieldRef is required"))
} }
...@@ -740,44 +766,33 @@ func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSou ...@@ -740,44 +766,33 @@ func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSou
// This validate will make sure targetPath: // This validate will make sure targetPath:
// 1. is not abs path // 1. is not abs path
// 2. does not start with '../' // 2. does not have any element which is ".."
// 3. does not contain '/../' func validateLocalDescendingPath(targetPath string, fldPath *field.Path) field.ErrorList {
// 4. does not end with '/..'
func validateSubPath(targetPath string, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{} allErrs := field.ErrorList{}
if path.IsAbs(targetPath) { if path.IsAbs(targetPath) {
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must be a relative path")) allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must be a relative path"))
} }
if strings.HasPrefix(targetPath, "../") {
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not start with '../'")) // TODO: this assumes the OS of apiserver & nodes are the same
} parts := strings.Split(targetPath, string(os.PathSeparator))
if strings.Contains(targetPath, "/../") { for _, item := range parts {
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '/../'")) if item == ".." {
} allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
if strings.HasSuffix(targetPath, "/..") { break // even for `../../..`, one error is sufficient to make the point
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not end with '/..'")) }
} }
return allErrs return allErrs
} }
// This validate will make sure targetPath: // This validate will make sure targetPath:
// 1. is not abs path // 1. is not abs path
// 2. does not contain '..' // 2. does not contain any '..' elements
// 3. does not start with '..' // 3. does not start with '..'
func validateVolumeSourcePath(targetPath string, fldPath *field.Path) field.ErrorList { func validateLocalNonReservedPath(targetPath string, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{} allErrs := field.ErrorList{}
if path.IsAbs(targetPath) { allErrs = append(allErrs, validateLocalDescendingPath(targetPath, fldPath)...)
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must be a relative path")) // Don't report this error if the check for .. elements already caught it.
} if strings.HasPrefix(targetPath, "..") && !strings.HasPrefix(targetPath, "../") {
// TODO assume OS of api server & nodes are the same for now
items := strings.Split(targetPath, string(os.PathSeparator))
for _, item := range items {
if item == ".." {
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
}
}
if strings.HasPrefix(items[0], "..") && len(items[0]) > 2 {
allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not start with '..'")) allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not start with '..'"))
} }
return allErrs return allErrs
...@@ -1262,7 +1277,7 @@ func validateVolumeMounts(mounts []api.VolumeMount, volumes sets.String, fldPath ...@@ -1262,7 +1277,7 @@ func validateVolumeMounts(mounts []api.VolumeMount, volumes sets.String, fldPath
} }
mountpoints.Insert(mnt.MountPath) mountpoints.Insert(mnt.MountPath)
if len(mnt.SubPath) > 0 { if len(mnt.SubPath) > 0 {
allErrs = append(allErrs, validateSubPath(mnt.SubPath, fldPath.Child("subPath"))...) allErrs = append(allErrs, validateLocalDescendingPath(mnt.SubPath, fldPath.Child("subPath"))...)
} }
} }
return allErrs return allErrs
...@@ -1918,7 +1933,7 @@ func validateSeccompProfile(p string, fldPath *field.Path) field.ErrorList { ...@@ -1918,7 +1933,7 @@ func validateSeccompProfile(p string, fldPath *field.Path) field.ErrorList {
return nil return nil
} }
if strings.HasPrefix(p, "localhost/") { if strings.HasPrefix(p, "localhost/") {
return validateSubPath(strings.TrimPrefix(p, "localhost/"), fldPath) return validateLocalDescendingPath(strings.TrimPrefix(p, "localhost/"), fldPath)
} }
return field.ErrorList{field.Invalid(fldPath, p, "must be a valid seccomp profile")} return field.ErrorList{field.Invalid(fldPath, p, "must be a valid seccomp profile")}
} }
......
...@@ -110,7 +110,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e ...@@ -110,7 +110,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme // add the internal version to Scheme
apps.AddToScheme(api.Scheme) if err := apps.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
// add the enabled external versions to Scheme // add the enabled external versions to Scheme
for _, v := range externalVersions { for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) { if !registered.IsEnabledVersion(v) {
...@@ -119,7 +122,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { ...@@ -119,7 +122,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
} }
switch v { switch v {
case v1alpha1.SchemeGroupVersion: case v1alpha1.SchemeGroupVersion:
v1alpha1.AddToScheme(api.Scheme) if err := v1alpha1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
} }
} }
} }
...@@ -22,10 +22,10 @@ import ( ...@@ -22,10 +22,10 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func AddToScheme(scheme *runtime.Scheme) { var (
// Add the API to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
addKnownTypes(scheme) AddToScheme = SchemeBuilder.AddToScheme
} )
// GroupName is the group name use in this package // GroupName is the group name use in this package
const GroupName = "apps" const GroupName = "apps"
...@@ -44,11 +44,12 @@ func Resource(resource string) unversioned.GroupResource { ...@@ -44,11 +44,12 @@ func Resource(resource string) unversioned.GroupResource {
} }
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
// TODO this will get cleaned up with the scheme types are fixed // TODO this will get cleaned up with the scheme types are fixed
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&PetSet{}, &PetSet{},
&PetSetList{}, &PetSetList{},
&api.ListOptions{}, &api.ListOptions{},
) )
return nil
} }
...@@ -27,7 +27,7 @@ import ( ...@@ -27,7 +27,7 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addConversionFuncs(scheme *runtime.Scheme) { func addConversionFuncs(scheme *runtime.Scheme) error {
// Add non-generated conversion functions to handle the *int32 -> int // Add non-generated conversion functions to handle the *int32 -> int
// conversion. A pointer is useful in the versioned type so we can default // conversion. A pointer is useful in the versioned type so we can default
// it, but a plain int32 is more convenient in the internal type. These // it, but a plain int32 is more convenient in the internal type. These
...@@ -37,11 +37,10 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -37,11 +37,10 @@ func addConversionFuncs(scheme *runtime.Scheme) {
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec, Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
) )
if err != nil { if err != nil {
// If one of the conversion functions is malformed, detect it immediately. return err
panic(err)
} }
err = api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "PetSet", return api.Scheme.AddFieldLabelConversionFunc("apps/v1alpha1", "PetSet",
func(label, value string) (string, string, error) { func(label, value string) (string, string, error) {
switch label { switch label {
case "metadata.name", "metadata.namespace", "status.successful": case "metadata.name", "metadata.namespace", "status.successful":
...@@ -49,11 +48,8 @@ func addConversionFuncs(scheme *runtime.Scheme) { ...@@ -49,11 +48,8 @@ func addConversionFuncs(scheme *runtime.Scheme) {
default: default:
return "", "", fmt.Errorf("field label not supported: %s", label) return "", "", fmt.Errorf("field label not supported: %s", label)
} }
}) },
if err != nil { )
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error { func Convert_v1alpha1_PetSetSpec_To_apps_PetSetSpec(in *PetSetSpec, out *apps.PetSetSpec, s conversion.Scope) error {
......
...@@ -21,8 +21,8 @@ import ( ...@@ -21,8 +21,8 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addDefaultingFuncs(scheme *runtime.Scheme) { func addDefaultingFuncs(scheme *runtime.Scheme) error {
scheme.AddDefaultingFuncs( return scheme.AddDefaultingFuncs(
SetDefaults_PetSet, SetDefaults_PetSet,
) )
} }
......
...@@ -49,17 +49,25 @@ var _ = proto.Marshal ...@@ -49,17 +49,25 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *PetSet) Reset() { *m = PetSet{} } // This is a compile-time assertion to ensure that this generated file
func (*PetSet) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *PetSetList) Reset() { *m = PetSetList{} } func (m *PetSet) Reset() { *m = PetSet{} }
func (*PetSetList) ProtoMessage() {} func (*PetSet) ProtoMessage() {}
func (*PetSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *PetSetSpec) Reset() { *m = PetSetSpec{} } func (m *PetSetList) Reset() { *m = PetSetList{} }
func (*PetSetSpec) ProtoMessage() {} func (*PetSetList) ProtoMessage() {}
func (*PetSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *PetSetStatus) Reset() { *m = PetSetStatus{} } func (m *PetSetSpec) Reset() { *m = PetSetSpec{} }
func (*PetSetStatus) ProtoMessage() {} func (*PetSetSpec) ProtoMessage() {}
func (*PetSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *PetSetStatus) Reset() { *m = PetSetStatus{} }
func (*PetSetStatus) ProtoMessage() {}
func (*PetSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func init() { func init() {
proto.RegisterType((*PetSet)(nil), "k8s.io.client-go.1.4.pkg.apis.apps.v1alpha1.PetSet") proto.RegisterType((*PetSet)(nil), "k8s.io.client-go.1.4.pkg.apis.apps.v1alpha1.PetSet")
...@@ -1022,3 +1030,46 @@ var ( ...@@ -1022,3 +1030,46 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 611 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6f, 0xd3, 0x4c,
0x10, 0xc6, 0xeb, 0xa6, 0xa9, 0xfc, 0x6e, 0xf3, 0x22, 0xb4, 0x54, 0x28, 0x8a, 0x50, 0x8a, 0x72,
0x8a, 0x50, 0xb3, 0x26, 0x85, 0xa2, 0x9e, 0x8d, 0x04, 0x42, 0x02, 0x5a, 0x39, 0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0x00, 0xff, 0xff, 0x14, 0xcf, 0x45, 0x01, 0xd8,
0x05, 0x00, 0x00,
}
...@@ -29,14 +29,13 @@ const GroupName = "apps" ...@@ -29,14 +29,13 @@ const GroupName = "apps"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"}
func AddToScheme(scheme *runtime.Scheme) { var (
addKnownTypes(scheme) SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
addDefaultingFuncs(scheme) AddToScheme = SchemeBuilder.AddToScheme
addConversionFuncs(scheme) )
}
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&PetSet{}, &PetSet{},
&PetSetList{}, &PetSetList{},
...@@ -44,6 +43,7 @@ func addKnownTypes(scheme *runtime.Scheme) { ...@@ -44,6 +43,7 @@ func addKnownTypes(scheme *runtime.Scheme) {
&v1.DeleteOptions{}, &v1.DeleteOptions{},
) )
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
} }
func (obj *PetSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *PetSet) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
apps "k8s.io/client-go/1.4/pkg/apis/apps" apps "k8s.io/client-go/1.4/pkg/apis/apps"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1alpha1_PetSet_To_apps_PetSet, Convert_v1alpha1_PetSet_To_apps_PetSet,
Convert_apps_PetSet_To_v1alpha1_PetSet, Convert_apps_PetSet_To_v1alpha1_PetSet,
Convert_v1alpha1_PetSetList_To_apps_PetSetList, Convert_v1alpha1_PetSetList_To_apps_PetSetList,
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec, Convert_apps_PetSetSpec_To_v1alpha1_PetSetSpec,
Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus, Convert_v1alpha1_PetSetStatus_To_apps_PetSetStatus,
Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus, Convert_apps_PetSetStatus_To_v1alpha1_PetSetStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error { func autoConvert_v1alpha1_PetSet_To_apps_PetSet(in *PetSet, out *apps.PetSet, s conversion.Scope) error {
......
...@@ -21,23 +21,26 @@ limitations under the License. ...@@ -21,23 +21,26 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
api "k8s.io/client-go/1.4/pkg/api"
unversioned "k8s.io/client-go/1.4/pkg/api/unversioned" unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
v1 "k8s.io/client-go/1.4/pkg/api/v1" v1 "k8s.io/client-go/1.4/pkg/api/v1"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(func() *PetSet { var x *PetSet; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(func() *PetSetList { var x *PetSetList; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(func() *PetSetSpec { var x *PetSetSpec; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(func() *PetSetStatus { var x *PetSetStatus; return x }())}, // to allow building arbitrary schemes.
); err != nil { func RegisterDeepCopies(scheme *runtime.Scheme) error {
// if one of the deep copy functions is malformed, detect it immediately. return scheme.AddGeneratedDeepCopyFuncs(
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSet, InType: reflect.TypeOf(&PetSet{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
)
} }
func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1alpha1_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,19 +24,23 @@ import ( ...@@ -24,19 +24,23 @@ import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
unversioned "k8s.io/client-go/1.4/pkg/api/unversioned" unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(func() *PetSet { var x *PetSet; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(func() *PetSetList { var x *PetSetList; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(func() *PetSetSpec { var x *PetSetSpec; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(func() *PetSetStatus { var x *PetSetStatus; return x }())}, // to allow building arbitrary schemes.
); err != nil { func RegisterDeepCopies(scheme *runtime.Scheme) error {
// if one of the deep copy functions is malformed, detect it immediately. return scheme.AddGeneratedDeepCopyFuncs(
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSet, InType: reflect.TypeOf(&PetSet{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetList, InType: reflect.TypeOf(&PetSetList{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetSpec, InType: reflect.TypeOf(&PetSetSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_PetSetStatus, InType: reflect.TypeOf(&PetSetStatus{})},
)
} }
func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_apps_PetSet(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -89,7 +89,10 @@ func enableVersions(externalVersions []unversioned.GroupVersion) error { ...@@ -89,7 +89,10 @@ func enableVersions(externalVersions []unversioned.GroupVersion) error {
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme // add the internal version to Scheme
authentication.AddToScheme(api.Scheme) if err := authentication.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
// add the enabled external versions to Scheme // add the enabled external versions to Scheme
for _, v := range externalVersions { for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) { if !registered.IsEnabledVersion(v) {
...@@ -98,7 +101,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { ...@@ -98,7 +101,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
} }
switch v { switch v {
case v1beta1.SchemeGroupVersion: case v1beta1.SchemeGroupVersion:
v1beta1.AddToScheme(api.Scheme) if err := v1beta1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
} }
} }
} }
......
...@@ -38,11 +38,12 @@ func Resource(resource string) unversioned.GroupResource { ...@@ -38,11 +38,12 @@ func Resource(resource string) unversioned.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource() return SchemeGroupVersion.WithResource(resource).GroupResource()
} }
func AddToScheme(scheme *runtime.Scheme) { var (
addKnownTypes(scheme) SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
} AddToScheme = SchemeBuilder.AddToScheme
)
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&api.ListOptions{}, &api.ListOptions{},
&api.DeleteOptions{}, &api.DeleteOptions{},
...@@ -50,4 +51,5 @@ func addKnownTypes(scheme *runtime.Scheme) { ...@@ -50,4 +51,5 @@ func addKnownTypes(scheme *runtime.Scheme) {
&TokenReview{}, &TokenReview{},
) )
return nil
} }
...@@ -20,11 +20,7 @@ import ( ...@@ -20,11 +20,7 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addConversionFuncs(scheme *runtime.Scheme) { func addConversionFuncs(scheme *runtime.Scheme) error {
// Add non-generated conversion functions // Add non-generated conversion functions
err := scheme.AddConversionFuncs() return scheme.AddConversionFuncs()
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
...@@ -20,6 +20,6 @@ import ( ...@@ -20,6 +20,6 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addDefaultingFuncs(scheme *runtime.Scheme) { func addDefaultingFuncs(scheme *runtime.Scheme) error {
scheme.AddDefaultingFuncs() return scheme.AddDefaultingFuncs()
} }
...@@ -48,20 +48,29 @@ var _ = proto.Marshal ...@@ -48,20 +48,29 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *ExtraValue) Reset() { *m = ExtraValue{} } // This is a compile-time assertion to ensure that this generated file
func (*ExtraValue) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *TokenReview) Reset() { *m = TokenReview{} } func (m *ExtraValue) Reset() { *m = ExtraValue{} }
func (*TokenReview) ProtoMessage() {} func (*ExtraValue) ProtoMessage() {}
func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} } func (m *TokenReview) Reset() { *m = TokenReview{} }
func (*TokenReviewSpec) ProtoMessage() {} func (*TokenReview) ProtoMessage() {}
func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} } func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
func (*TokenReviewStatus) ProtoMessage() {} func (*TokenReviewSpec) ProtoMessage() {}
func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
func (*UserInfo) ProtoMessage() {} func (*TokenReviewStatus) ProtoMessage() {}
func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *UserInfo) Reset() { *m = UserInfo{} }
func (*UserInfo) ProtoMessage() {}
func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func init() { func init() {
proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.1.4.pkg.apis.authentication.v1beta1.ExtraValue") proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.1.4.pkg.apis.authentication.v1beta1.ExtraValue")
...@@ -1225,3 +1234,47 @@ var ( ...@@ -1225,3 +1234,47 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 632 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x4f, 0x13, 0x41,
0x14, 0xef, 0x5f, 0x6c, 0xa7, 0xa2, 0x38, 0x89, 0x49, 0xd3, 0x44, 0x4a, 0xd6, 0x0b, 0x26, 0x30,
0x9b, 0x92, 0xa8, 0x04, 0xe2, 0x81, 0x0d, 0x68, 0x38, 0x18, 0x93, 0x41, 0x8c, 0x31, 0xf1, 0xb0,
0xed, 0x3e, 0x96, 0x75, 0xdb, 0x9d, 0x66, 0x76, 0xa6, 0xc8, 0x8d, 0x8f, 0xe0, 0xd1, 0xa3, 0xdf,
0xc3, 0x2f, 0xd0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fe, 0x06, 0x00, 0x00, 0xff, 0xff,
0xca, 0xd0, 0x35, 0x8c, 0xb5, 0x05, 0x00, 0x00,
}
...@@ -28,15 +28,13 @@ const GroupName = "authentication.k8s.io" ...@@ -28,15 +28,13 @@ const GroupName = "authentication.k8s.io"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"}
func AddToScheme(scheme *runtime.Scheme) { var (
// Add the API to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
addKnownTypes(scheme) AddToScheme = SchemeBuilder.AddToScheme
addDefaultingFuncs(scheme) )
addConversionFuncs(scheme)
}
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&v1.ListOptions{}, &v1.ListOptions{},
&v1.DeleteOptions{}, &v1.DeleteOptions{},
...@@ -44,4 +42,5 @@ func addKnownTypes(scheme *runtime.Scheme) { ...@@ -44,4 +42,5 @@ func addKnownTypes(scheme *runtime.Scheme) {
&TokenReview{}, &TokenReview{},
) )
return nil
} }
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
authentication "k8s.io/client-go/1.4/pkg/apis/authentication" authentication "k8s.io/client-go/1.4/pkg/apis/authentication"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1beta1_TokenReview_To_authentication_TokenReview, Convert_v1beta1_TokenReview_To_authentication_TokenReview,
Convert_authentication_TokenReview_To_v1beta1_TokenReview, Convert_authentication_TokenReview_To_v1beta1_TokenReview,
Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec, Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec,
...@@ -36,10 +43,7 @@ func init() { ...@@ -36,10 +43,7 @@ func init() {
Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus, Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus,
Convert_v1beta1_UserInfo_To_authentication_UserInfo, Convert_v1beta1_UserInfo_To_authentication_UserInfo,
Convert_authentication_UserInfo_To_v1beta1_UserInfo, Convert_authentication_UserInfo_To_v1beta1_UserInfo,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
......
...@@ -21,22 +21,25 @@ limitations under the License. ...@@ -21,22 +21,25 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
api "k8s.io/client-go/1.4/pkg/api"
v1 "k8s.io/client-go/1.4/pkg/api/v1" v1 "k8s.io/client-go/1.4/pkg/api/v1"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(func() *TokenReview { var x *TokenReview; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(func() *TokenReviewSpec { var x *TokenReviewSpec; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(func() *TokenReviewStatus { var x *TokenReviewStatus; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(func() *UserInfo { var x *UserInfo; return x }())}, // to allow building arbitrary schemes.
); err != nil { func RegisterDeepCopies(scheme *runtime.Scheme) error {
// if one of the deep copy functions is malformed, detect it immediately. return scheme.AddGeneratedDeepCopyFuncs(
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
)
} }
func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -23,19 +23,23 @@ package authentication ...@@ -23,19 +23,23 @@ package authentication
import ( import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(func() *TokenReview { var x *TokenReview; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(func() *TokenReviewSpec { var x *TokenReviewSpec; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(func() *TokenReviewStatus { var x *TokenReviewStatus; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(func() *UserInfo { var x *UserInfo; return x }())}, // to allow building arbitrary schemes.
); err != nil { func RegisterDeepCopies(scheme *runtime.Scheme) error {
// if one of the deep copy functions is malformed, detect it immediately. return scheme.AddGeneratedDeepCopyFuncs(
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
)
} }
func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -89,7 +89,10 @@ func enableVersions(externalVersions []unversioned.GroupVersion) error { ...@@ -89,7 +89,10 @@ func enableVersions(externalVersions []unversioned.GroupVersion) error {
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme // add the internal version to Scheme
authorization.AddToScheme(api.Scheme) if err := authorization.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
// add the enabled external versions to Scheme // add the enabled external versions to Scheme
for _, v := range externalVersions { for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) { if !registered.IsEnabledVersion(v) {
...@@ -98,7 +101,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { ...@@ -98,7 +101,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
} }
switch v { switch v {
case v1beta1.SchemeGroupVersion: case v1beta1.SchemeGroupVersion:
v1beta1.AddToScheme(api.Scheme) if err := v1beta1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
} }
} }
} }
......
...@@ -37,14 +37,16 @@ func Resource(resource string) unversioned.GroupResource { ...@@ -37,14 +37,16 @@ func Resource(resource string) unversioned.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource() return SchemeGroupVersion.WithResource(resource).GroupResource()
} }
func AddToScheme(scheme *runtime.Scheme) { var (
addKnownTypes(scheme) SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
} AddToScheme = SchemeBuilder.AddToScheme
)
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&SelfSubjectAccessReview{}, &SelfSubjectAccessReview{},
&SubjectAccessReview{}, &SubjectAccessReview{},
&LocalSubjectAccessReview{}, &LocalSubjectAccessReview{},
) )
return nil
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -20,11 +20,7 @@ import ( ...@@ -20,11 +20,7 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addConversionFuncs(scheme *runtime.Scheme) { func addConversionFuncs(scheme *runtime.Scheme) error {
// Add non-generated conversion functions // Add non-generated conversion functions
err := scheme.AddConversionFuncs() return scheme.AddConversionFuncs()
if err != nil {
// If one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
...@@ -20,6 +20,6 @@ import ( ...@@ -20,6 +20,6 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addDefaultingFuncs(scheme *runtime.Scheme) { func addDefaultingFuncs(scheme *runtime.Scheme) error {
scheme.AddDefaultingFuncs() return scheme.AddDefaultingFuncs()
} }
...@@ -52,32 +52,51 @@ var _ = proto.Marshal ...@@ -52,32 +52,51 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (m *ExtraValue) Reset() { *m = ExtraValue{} } // This is a compile-time assertion to ensure that this generated file
func (*ExtraValue) ProtoMessage() {} // is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *ExtraValue) Reset() { *m = ExtraValue{} }
func (*ExtraValue) ProtoMessage() {}
func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
func (*LocalSubjectAccessReview) ProtoMessage() {} func (*LocalSubjectAccessReview) ProtoMessage() {}
func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{1}
}
func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
func (*NonResourceAttributes) ProtoMessage() {} func (*NonResourceAttributes) ProtoMessage() {}
func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
func (*ResourceAttributes) ProtoMessage() {} func (*ResourceAttributes) ProtoMessage() {}
func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
func (*SelfSubjectAccessReview) ProtoMessage() {} func (*SelfSubjectAccessReview) ProtoMessage() {}
func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{5}
}
func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
func (*SubjectAccessReview) ProtoMessage() {} func (*SubjectAccessReview) ProtoMessage() {}
func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
func (*SubjectAccessReviewSpec) ProtoMessage() {} func (*SubjectAccessReviewSpec) ProtoMessage() {}
func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
func (*SubjectAccessReviewStatus) ProtoMessage() {} func (*SubjectAccessReviewStatus) ProtoMessage() {}
func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{8}
}
func init() { func init() {
proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.1.4.pkg.apis.authorization.v1beta1.ExtraValue") proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.1.4.pkg.apis.authorization.v1beta1.ExtraValue")
...@@ -2262,3 +2281,61 @@ var ( ...@@ -2262,3 +2281,61 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 864 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x4f, 0x1b, 0x47,
0x18, 0xf6, 0xf7, 0xc7, 0xd0, 0x16, 0x3a, 0x88, 0x62, 0x5c, 0x09, 0x5b, 0xae, 0x54, 0x81, 0x04,
0xbb, 0x05, 0x09, 0x15, 0xa1, 0x1e, 0xea, 0x55, 0x2d, 0x84, 0x5a, 0x68, 0x35, 0x6e, 0x51, 0xd5,
0x9e, 0x66, 0xd7, 0x83, 0xd9, 0xd8, 0xde, 0xb5, 0x66, 0x66, 0x4d, 0xc8, 0x89, 0x1f, 0x90, 0x43,
0x8e, 0x1c, 0xf3, 0x17, 0xf2, 0x07, 0x72, 0x0d, 0x47, 0x72, 0x89, 0x12, 0x29, 0x42, 0x09, 0xf9,
0x17, 0x39, 0x65, 0x76, 0x76, 0xec, 0xc5, 0x78, 0x9d, 0xc8, 0x09, 0x8a, 0x72, 0xe0, 0x30, 0xd2,
0xce, 0xfb, 0xf1, 0xbc, 0xcf, 0xcc, 0x3c, 0xb3, 0xef, 0x80, 0x5f, 0x5b, 0x9b, 0x4c, 0xb3, 0x5d,
0xbd, 0xe5, 0x99, 0x84, 0x3a, 0x84, 0x13, 0xa6, 0x77, 0x5b, 0x4d, 0x1d, 0x77, 0x6d, 0xa6, 0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13 @@ const GroupName = "authorization.k8s.io" ...@@ -29,15 +29,13 @@ const GroupName = "authorization.k8s.io"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"}
func AddToScheme(scheme *runtime.Scheme) { var (
// Add the API to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
addKnownTypes(scheme) AddToScheme = SchemeBuilder.AddToScheme
addDefaultingFuncs(scheme) )
addConversionFuncs(scheme)
}
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&v1.ListOptions{}, &v1.ListOptions{},
&v1.DeleteOptions{}, &v1.DeleteOptions{},
...@@ -48,6 +46,7 @@ func addKnownTypes(scheme *runtime.Scheme) { ...@@ -48,6 +46,7 @@ func addKnownTypes(scheme *runtime.Scheme) {
) )
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
} }
func (obj *LocalSubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } func (obj *LocalSubjectAccessReview) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
......
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
authorization "k8s.io/client-go/1.4/pkg/apis/authorization" authorization "k8s.io/client-go/1.4/pkg/apis/authorization"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview, Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview,
Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview, Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview,
Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes, Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes,
...@@ -44,10 +51,7 @@ func init() { ...@@ -44,10 +51,7 @@ func init() {
Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec, Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec,
Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus, Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus, Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
......
...@@ -21,26 +21,29 @@ limitations under the License. ...@@ -21,26 +21,29 @@ limitations under the License.
package v1beta1 package v1beta1
import ( import (
api "k8s.io/client-go/1.4/pkg/api"
v1 "k8s.io/client-go/1.4/pkg/api/v1" v1 "k8s.io/client-go/1.4/pkg/api/v1"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(func() *LocalSubjectAccessReview { var x *LocalSubjectAccessReview; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(func() *NonResourceAttributes { var x *NonResourceAttributes; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(func() *ResourceAttributes { var x *ResourceAttributes; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReview, InType: reflect.TypeOf(func() *SelfSubjectAccessReview { var x *SelfSubjectAccessReview; return x }())}, // to allow building arbitrary schemes.
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(func() *SelfSubjectAccessReviewSpec { var x *SelfSubjectAccessReviewSpec; return x }())}, func RegisterDeepCopies(scheme *runtime.Scheme) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(func() *SubjectAccessReview { var x *SubjectAccessReview; return x }())}, return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(func() *SubjectAccessReviewSpec { var x *SubjectAccessReviewSpec; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(func() *SubjectAccessReviewStatus { var x *SubjectAccessReviewStatus; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
); err != nil { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
// if one of the deep copy functions is malformed, detect it immediately. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
)
} }
func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -23,23 +23,27 @@ package authorization ...@@ -23,23 +23,27 @@ package authorization
import ( import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(func() *LocalSubjectAccessReview { var x *LocalSubjectAccessReview; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(func() *NonResourceAttributes { var x *NonResourceAttributes; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(func() *ResourceAttributes { var x *ResourceAttributes; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReview, InType: reflect.TypeOf(func() *SelfSubjectAccessReview { var x *SelfSubjectAccessReview; return x }())}, // to allow building arbitrary schemes.
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(func() *SelfSubjectAccessReviewSpec { var x *SelfSubjectAccessReviewSpec; return x }())}, func RegisterDeepCopies(scheme *runtime.Scheme) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(func() *SubjectAccessReview { var x *SubjectAccessReview; return x }())}, return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(func() *SubjectAccessReviewSpec { var x *SubjectAccessReviewSpec; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(func() *SubjectAccessReviewStatus { var x *SubjectAccessReviewStatus; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
); err != nil { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
// if one of the deep copy functions is malformed, detect it immediately. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
)
} }
func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -114,7 +114,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e ...@@ -114,7 +114,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme // add the internal version to Scheme
autoscaling.AddToScheme(api.Scheme) if err := autoscaling.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
// add the enabled external versions to Scheme // add the enabled external versions to Scheme
for _, v := range externalVersions { for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) { if !registered.IsEnabledVersion(v) {
...@@ -123,7 +126,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { ...@@ -123,7 +126,10 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
} }
switch v { switch v {
case v1.SchemeGroupVersion: case v1.SchemeGroupVersion:
v1.AddToScheme(api.Scheme) if err := v1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
} }
} }
} }
...@@ -38,17 +38,18 @@ func Resource(resource string) unversioned.GroupResource { ...@@ -38,17 +38,18 @@ func Resource(resource string) unversioned.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource() return SchemeGroupVersion.WithResource(resource).GroupResource()
} }
func AddToScheme(scheme *runtime.Scheme) { var (
// Add the API to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
addKnownTypes(scheme) AddToScheme = SchemeBuilder.AddToScheme
} )
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&Scale{}, &Scale{},
&HorizontalPodAutoscaler{}, &HorizontalPodAutoscaler{},
&HorizontalPodAutoscalerList{}, &HorizontalPodAutoscalerList{},
&api.ListOptions{}, &api.ListOptions{},
) )
return nil
} }
...@@ -20,8 +20,8 @@ import ( ...@@ -20,8 +20,8 @@ import (
"k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/runtime"
) )
func addDefaultingFuncs(scheme *runtime.Scheme) { func addDefaultingFuncs(scheme *runtime.Scheme) error {
scheme.AddDefaultingFuncs( return scheme.AddDefaultingFuncs(
SetDefaults_HorizontalPodAutoscaler, SetDefaults_HorizontalPodAutoscaler,
) )
} }
......
...@@ -52,29 +52,49 @@ var _ = proto.Marshal ...@@ -52,29 +52,49 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.GoGoProtoPackageIsVersion1
func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) ProtoMessage() {}
func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{0}
}
func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) ProtoMessage() {}
func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) ProtoMessage() {}
func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{2}
}
func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{3}
}
func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
return fileDescriptorGenerated, []int{4}
}
func (m *Scale) Reset() { *m = Scale{} } func (m *Scale) Reset() { *m = Scale{} }
func (*Scale) ProtoMessage() {} func (*Scale) ProtoMessage() {}
func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) ProtoMessage() {}
func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) ProtoMessage() {}
func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func init() { func init() {
proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.1.4.pkg.apis.autoscaling.v1.CrossVersionObjectReference") proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.1.4.pkg.apis.autoscaling.v1.CrossVersionObjectReference")
...@@ -1708,3 +1728,59 @@ var ( ...@@ -1708,3 +1728,59 @@ var (
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
) )
var fileDescriptorGenerated = []byte{
// 823 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x4f, 0xe3, 0x46,
0x14, 0x26, 0xbf, 0x10, 0x8c, 0x0b, 0xb4, 0x53, 0x09, 0xa2, 0x54, 0x4d, 0x90, 0xdb, 0x03,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x54, 0xfd, 0xd7, 0x26, 0xe8, 0x13, 0x75, 0x8e, 0x12, 0x84, 0xf5, 0xe5, 0xcd, 0xcb,
0xea, 0xdc, 0xad, 0x58, 0xff, 0x8b, 0xf5, 0xc7, 0x7d, 0x35, 0x77, 0x23, 0xd6, 0xad, 0x58, 0x2f,
0xc4, 0xfa, 0xeb, 0x55, 0x75, 0xee, 0x97, 0xfc, 0xa0, 0xfe, 0x36, 0x00, 0x00, 0xff, 0xff, 0x45,
0xec, 0x9a, 0x15, 0x8e, 0x09, 0x00, 0x00,
}
...@@ -29,13 +29,13 @@ const GroupName = "autoscaling" ...@@ -29,13 +29,13 @@ const GroupName = "autoscaling"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"} var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
func AddToScheme(scheme *runtime.Scheme) { var (
addKnownTypes(scheme) SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)
addDefaultingFuncs(scheme) AddToScheme = SchemeBuilder.AddToScheme
} )
// Adds the list of known types to api.Scheme. // Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) { func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion, scheme.AddKnownTypes(SchemeGroupVersion,
&HorizontalPodAutoscaler{}, &HorizontalPodAutoscaler{},
&HorizontalPodAutoscalerList{}, &HorizontalPodAutoscalerList{},
...@@ -44,4 +44,5 @@ func addKnownTypes(scheme *runtime.Scheme) { ...@@ -44,4 +44,5 @@ func addKnownTypes(scheme *runtime.Scheme) {
&v1.DeleteOptions{}, &v1.DeleteOptions{},
) )
versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
} }
...@@ -24,10 +24,17 @@ import ( ...@@ -24,10 +24,17 @@ import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
autoscaling "k8s.io/client-go/1.4/pkg/apis/autoscaling" autoscaling "k8s.io/client-go/1.4/pkg/apis/autoscaling"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedConversionFuncs( SchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(scheme *runtime.Scheme) error {
return scheme.AddGeneratedConversionFuncs(
Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference, Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference,
Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference, Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference,
Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler, Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
...@@ -44,10 +51,7 @@ func init() { ...@@ -44,10 +51,7 @@ func init() {
Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec, Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec,
Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus, Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus,
Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus, Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus,
); err != nil { )
// if one of the conversion functions is malformed, detect it immediately.
panic(err)
}
} }
func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
......
...@@ -21,27 +21,30 @@ limitations under the License. ...@@ -21,27 +21,30 @@ limitations under the License.
package v1 package v1
import ( import (
api "k8s.io/client-go/1.4/pkg/api"
unversioned "k8s.io/client-go/1.4/pkg/api/unversioned" unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
api_v1 "k8s.io/client-go/1.4/pkg/api/v1" api_v1 "k8s.io/client-go/1.4/pkg/api/v1"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(func() *CrossVersionObjectReference { var x *CrossVersionObjectReference; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(func() *HorizontalPodAutoscaler { var x *HorizontalPodAutoscaler; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(func() *HorizontalPodAutoscalerList { var x *HorizontalPodAutoscalerList; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(func() *HorizontalPodAutoscalerSpec { var x *HorizontalPodAutoscalerSpec; return x }())}, // to allow building arbitrary schemes.
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(func() *HorizontalPodAutoscalerStatus { var x *HorizontalPodAutoscalerStatus; return x }())}, func RegisterDeepCopies(scheme *runtime.Scheme) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(func() *Scale { var x *Scale; return x }())}, return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(func() *ScaleSpec { var x *ScaleSpec; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(func() *ScaleStatus { var x *ScaleStatus; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
); err != nil { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
// if one of the deep copy functions is malformed, detect it immediately. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
)
} }
func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -24,23 +24,27 @@ import ( ...@@ -24,23 +24,27 @@ import (
api "k8s.io/client-go/1.4/pkg/api" api "k8s.io/client-go/1.4/pkg/api"
unversioned "k8s.io/client-go/1.4/pkg/api/unversioned" unversioned "k8s.io/client-go/1.4/pkg/api/unversioned"
conversion "k8s.io/client-go/1.4/pkg/conversion" conversion "k8s.io/client-go/1.4/pkg/conversion"
runtime "k8s.io/client-go/1.4/pkg/runtime"
reflect "reflect" reflect "reflect"
) )
func init() { func init() {
if err := api.Scheme.AddGeneratedDeepCopyFuncs( SchemeBuilder.Register(RegisterDeepCopies)
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(func() *CrossVersionObjectReference { var x *CrossVersionObjectReference; return x }())}, }
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(func() *HorizontalPodAutoscaler { var x *HorizontalPodAutoscaler; return x }())},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(func() *HorizontalPodAutoscalerList { var x *HorizontalPodAutoscalerList; return x }())}, // RegisterDeepCopies adds deep-copy functions to the given scheme. Public
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(func() *HorizontalPodAutoscalerSpec { var x *HorizontalPodAutoscalerSpec; return x }())}, // to allow building arbitrary schemes.
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(func() *HorizontalPodAutoscalerStatus { var x *HorizontalPodAutoscalerStatus; return x }())}, func RegisterDeepCopies(scheme *runtime.Scheme) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(func() *Scale { var x *Scale; return x }())}, return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(func() *ScaleSpec { var x *ScaleSpec; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(func() *ScaleStatus { var x *ScaleStatus; return x }())}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
); err != nil { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
// if one of the deep copy functions is malformed, detect it immediately. conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
panic(err) conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
} conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
)
} }
func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
......
...@@ -120,7 +120,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e ...@@ -120,7 +120,10 @@ func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, e
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
// add the internal version to Scheme // add the internal version to Scheme
batch.AddToScheme(api.Scheme) if err := batch.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
// add the enabled external versions to Scheme // add the enabled external versions to Scheme
for _, v := range externalVersions { for _, v := range externalVersions {
if !registered.IsEnabledVersion(v) { if !registered.IsEnabledVersion(v) {
...@@ -129,9 +132,15 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { ...@@ -129,9 +132,15 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
} }
switch v { switch v {
case v1.SchemeGroupVersion: case v1.SchemeGroupVersion:
v1.AddToScheme(api.Scheme) if err := v1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
case v2alpha1.SchemeGroupVersion: case v2alpha1.SchemeGroupVersion:
v2alpha1.AddToScheme(api.Scheme) if err := v2alpha1.AddToScheme(api.Scheme); err != nil {
// Programmer error, detect immediately
panic(err)
}
} }
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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