mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Add initial storage types to the Kubernetes API
This commit is contained in:
@@ -25,6 +25,15 @@ import (
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
)
|
||||
|
||||
func convert_api_APIVersion_To_v1_APIVersion(in *api.APIVersion, out *APIVersion, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.APIVersion))(in)
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.APIGroup = in.APIGroup
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in *api.AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.AWSElasticBlockStoreVolumeSource))(in)
|
||||
@@ -2243,6 +2252,69 @@ func convert_api_TCPSocketAction_To_v1_TCPSocketAction(in *api.TCPSocketAction,
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_ThirdPartyResource_To_v1_ThirdPartyResource(in *api.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.ThirdPartyResource))(in)
|
||||
}
|
||||
if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Description = in.Description
|
||||
if in.Versions != nil {
|
||||
out.Versions = make([]APIVersion, len(in.Versions))
|
||||
for i := range in.Versions {
|
||||
if err := convert_api_APIVersion_To_v1_APIVersion(&in.Versions[i], &out.Versions[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Versions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_ThirdPartyResourceData_To_v1_ThirdPartyResourceData(in *api.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.ThirdPartyResourceData))(in)
|
||||
}
|
||||
if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.Data, &out.Data, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_ThirdPartyResourceList_To_v1_ThirdPartyResourceList(in *api.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.ThirdPartyResourceList))(in)
|
||||
}
|
||||
if err := convert_api_TypeMeta_To_v1_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := convert_api_ListMeta_To_v1_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
out.Items = make([]ThirdPartyResource, len(in.Items))
|
||||
for i := range in.Items {
|
||||
if err := convert_api_ThirdPartyResource_To_v1_ThirdPartyResource(&in.Items[i], &out.Items[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_TypeMeta_To_v1_TypeMeta(in *api.TypeMeta, out *TypeMeta, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.TypeMeta))(in)
|
||||
@@ -2368,6 +2440,15 @@ func convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *Volu
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_APIVersion_To_api_APIVersion(in *APIVersion, out *api.APIVersion, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*APIVersion))(in)
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.APIGroup = in.APIGroup
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*AWSElasticBlockStoreVolumeSource))(in)
|
||||
@@ -4586,6 +4667,69 @@ func convert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_ThirdPartyResource_To_api_ThirdPartyResource(in *ThirdPartyResource, out *api.ThirdPartyResource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*ThirdPartyResource))(in)
|
||||
}
|
||||
if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Description = in.Description
|
||||
if in.Versions != nil {
|
||||
out.Versions = make([]api.APIVersion, len(in.Versions))
|
||||
for i := range in.Versions {
|
||||
if err := convert_v1_APIVersion_To_api_APIVersion(&in.Versions[i], &out.Versions[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Versions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_ThirdPartyResourceData_To_api_ThirdPartyResourceData(in *ThirdPartyResourceData, out *api.ThirdPartyResourceData, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*ThirdPartyResourceData))(in)
|
||||
}
|
||||
if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.Data, &out.Data, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_ThirdPartyResourceList_To_api_ThirdPartyResourceList(in *ThirdPartyResourceList, out *api.ThirdPartyResourceList, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*ThirdPartyResourceList))(in)
|
||||
}
|
||||
if err := convert_v1_TypeMeta_To_api_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := convert_v1_ListMeta_To_api_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
out.Items = make([]api.ThirdPartyResource, len(in.Items))
|
||||
for i := range in.Items {
|
||||
if err := convert_v1_ThirdPartyResource_To_api_ThirdPartyResource(&in.Items[i], &out.Items[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_TypeMeta_To_api_TypeMeta(in *TypeMeta, out *api.TypeMeta, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*TypeMeta))(in)
|
||||
@@ -4713,6 +4857,7 @@ func convert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.Volu
|
||||
|
||||
func init() {
|
||||
err := api.Scheme.AddGeneratedConversionFuncs(
|
||||
convert_api_APIVersion_To_v1_APIVersion,
|
||||
convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
|
||||
convert_api_Binding_To_v1_Binding,
|
||||
convert_api_Capabilities_To_v1_Capabilities,
|
||||
@@ -4826,10 +4971,14 @@ func init() {
|
||||
convert_api_StatusDetails_To_v1_StatusDetails,
|
||||
convert_api_Status_To_v1_Status,
|
||||
convert_api_TCPSocketAction_To_v1_TCPSocketAction,
|
||||
convert_api_ThirdPartyResourceData_To_v1_ThirdPartyResourceData,
|
||||
convert_api_ThirdPartyResourceList_To_v1_ThirdPartyResourceList,
|
||||
convert_api_ThirdPartyResource_To_v1_ThirdPartyResource,
|
||||
convert_api_TypeMeta_To_v1_TypeMeta,
|
||||
convert_api_VolumeMount_To_v1_VolumeMount,
|
||||
convert_api_VolumeSource_To_v1_VolumeSource,
|
||||
convert_api_Volume_To_v1_Volume,
|
||||
convert_v1_APIVersion_To_api_APIVersion,
|
||||
convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
|
||||
convert_v1_Binding_To_api_Binding,
|
||||
convert_v1_Capabilities_To_api_Capabilities,
|
||||
@@ -4943,6 +5092,9 @@ func init() {
|
||||
convert_v1_StatusDetails_To_api_StatusDetails,
|
||||
convert_v1_Status_To_api_Status,
|
||||
convert_v1_TCPSocketAction_To_api_TCPSocketAction,
|
||||
convert_v1_ThirdPartyResourceData_To_api_ThirdPartyResourceData,
|
||||
convert_v1_ThirdPartyResourceList_To_api_ThirdPartyResourceList,
|
||||
convert_v1_ThirdPartyResource_To_api_ThirdPartyResource,
|
||||
convert_v1_TypeMeta_To_api_TypeMeta,
|
||||
convert_v1_VolumeMount_To_api_VolumeMount,
|
||||
convert_v1_VolumeSource_To_api_VolumeSource,
|
||||
|
||||
Reference in New Issue
Block a user