mirror of https://github.com/k3s-io/k3s
remove thirdParty API from api/v1/ and api/
parent
55bd5de217
commit
3473212ea5
|
@ -67,9 +67,6 @@ func init() {
|
|||
&ComponentStatusList{},
|
||||
&SerializedReference{},
|
||||
&RangeAllocation{},
|
||||
&ThirdPartyResource{},
|
||||
&ThirdPartyResourceList{},
|
||||
&ThirdPartyResourceData{},
|
||||
)
|
||||
|
||||
// Register Unversioned types
|
||||
|
@ -117,6 +114,3 @@ func (*ComponentStatus) IsAnAPIObject() {}
|
|||
func (*ComponentStatusList) IsAnAPIObject() {}
|
||||
func (*SerializedReference) IsAnAPIObject() {}
|
||||
func (*RangeAllocation) IsAnAPIObject() {}
|
||||
func (*ThirdPartyResource) IsAnAPIObject() {}
|
||||
func (*ThirdPartyResourceList) IsAnAPIObject() {}
|
||||
func (*ThirdPartyResourceData) IsAnAPIObject() {}
|
||||
|
|
|
@ -2061,35 +2061,3 @@ type RangeAllocation struct {
|
|||
// a single allocated address (the fifth bit on CIDR 10.0.0.0/8 is 10.0.0.4).
|
||||
Data []byte `json:"data"`
|
||||
}
|
||||
|
||||
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
|
||||
// types to the API. It consists of one or more Versions of the api.
|
||||
type ThirdPartyResource struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
Versions []APIVersion `json:"versions,omitempty"`
|
||||
}
|
||||
|
||||
type ThirdPartyResourceList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []ThirdPartyResource `json:"items"`
|
||||
}
|
||||
|
||||
// An APIVersion represents a single concrete version of an object model.
|
||||
type APIVersion struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
APIGroup string `json:"apiGroup,omitempty"`
|
||||
}
|
||||
|
||||
// An internal object, used for versioned storage in etcd. Not exposed to the end user.
|
||||
type ThirdPartyResourceData struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Data []byte `json:"name,omitempty"`
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
resource "k8s.io/kubernetes/pkg/api/resource"
|
||||
experimental "k8s.io/kubernetes/pkg/apis/experimental"
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
)
|
||||
|
||||
|
@ -2462,15 +2461,6 @@ func convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *Volu
|
|||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_APIVersion_To_experimental_APIVersion(in *APIVersion, out *experimental.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)
|
||||
|
@ -4758,69 +4748,6 @@ func convert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out
|
|||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_ThirdPartyResource_To_experimental_ThirdPartyResource(in *ThirdPartyResource, out *experimental.ThirdPartyResource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*ThirdPartyResource))(in)
|
||||
}
|
||||
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); 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([]experimental.APIVersion, len(in.Versions))
|
||||
for i := range in.Versions {
|
||||
if err := convert_v1_APIVersion_To_experimental_APIVersion(&in.Versions[i], &out.Versions[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Versions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_ThirdPartyResourceData_To_experimental_ThirdPartyResourceData(in *ThirdPartyResourceData, out *experimental.ThirdPartyResourceData, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*ThirdPartyResourceData))(in)
|
||||
}
|
||||
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); 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_experimental_ThirdPartyResourceList(in *ThirdPartyResourceList, out *experimental.ThirdPartyResourceList, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*ThirdPartyResourceList))(in)
|
||||
}
|
||||
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.ListMeta, &out.ListMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
out.Items = make([]experimental.ThirdPartyResource, len(in.Items))
|
||||
for i := range in.Items {
|
||||
if err := convert_v1_ThirdPartyResource_To_experimental_ThirdPartyResource(&in.Items[i], &out.Items[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_Volume_To_api_Volume(in *Volume, out *api.Volume, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*Volume))(in)
|
||||
|
@ -4969,78 +4896,6 @@ func convert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.Volu
|
|||
return nil
|
||||
}
|
||||
|
||||
func convert_experimental_APIVersion_To_v1_APIVersion(in *experimental.APIVersion, out *APIVersion, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*experimental.APIVersion))(in)
|
||||
}
|
||||
out.Name = in.Name
|
||||
out.APIGroup = in.APIGroup
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_experimental_ThirdPartyResource_To_v1_ThirdPartyResource(in *experimental.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*experimental.ThirdPartyResource))(in)
|
||||
}
|
||||
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); 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_experimental_APIVersion_To_v1_APIVersion(&in.Versions[i], &out.Versions[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Versions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_experimental_ThirdPartyResourceData_To_v1_ThirdPartyResourceData(in *experimental.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*experimental.ThirdPartyResourceData))(in)
|
||||
}
|
||||
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); 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_experimental_ThirdPartyResourceList_To_v1_ThirdPartyResourceList(in *experimental.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*experimental.ThirdPartyResourceList))(in)
|
||||
}
|
||||
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.ListMeta, &out.ListMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
out.Items = make([]ThirdPartyResource, len(in.Items))
|
||||
for i := range in.Items {
|
||||
if err := convert_experimental_ThirdPartyResource_To_v1_ThirdPartyResource(&in.Items[i], &out.Items[i], s); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
err := api.Scheme.AddGeneratedConversionFuncs(
|
||||
convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
|
||||
|
@ -5158,11 +5013,6 @@ func init() {
|
|||
convert_api_VolumeMount_To_v1_VolumeMount,
|
||||
convert_api_VolumeSource_To_v1_VolumeSource,
|
||||
convert_api_Volume_To_v1_Volume,
|
||||
convert_experimental_APIVersion_To_v1_APIVersion,
|
||||
convert_experimental_ThirdPartyResourceData_To_v1_ThirdPartyResourceData,
|
||||
convert_experimental_ThirdPartyResourceList_To_v1_ThirdPartyResourceList,
|
||||
convert_experimental_ThirdPartyResource_To_v1_ThirdPartyResource,
|
||||
convert_v1_APIVersion_To_experimental_APIVersion,
|
||||
convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
|
||||
convert_v1_Binding_To_api_Binding,
|
||||
convert_v1_Capabilities_To_api_Capabilities,
|
||||
|
@ -5275,9 +5125,6 @@ func init() {
|
|||
convert_v1_ServiceStatus_To_api_ServiceStatus,
|
||||
convert_v1_Service_To_api_Service,
|
||||
convert_v1_TCPSocketAction_To_api_TCPSocketAction,
|
||||
convert_v1_ThirdPartyResourceData_To_experimental_ThirdPartyResourceData,
|
||||
convert_v1_ThirdPartyResourceList_To_experimental_ThirdPartyResourceList,
|
||||
convert_v1_ThirdPartyResource_To_experimental_ThirdPartyResource,
|
||||
convert_v1_VolumeMount_To_api_VolumeMount,
|
||||
convert_v1_VolumeSource_To_api_VolumeSource,
|
||||
convert_v1_Volume_To_api_Volume,
|
||||
|
|
|
@ -67,12 +67,6 @@ func deepCopy_unversioned_TypeMeta(in unversioned.TypeMeta, out *unversioned.Typ
|
|||
return nil
|
||||
}
|
||||
|
||||
func deepCopy_v1_APIVersion(in APIVersion, out *APIVersion, c *conversion.Cloner) error {
|
||||
out.Name = in.Name
|
||||
out.APIGroup = in.APIGroup
|
||||
return nil
|
||||
}
|
||||
|
||||
func deepCopy_v1_AWSElasticBlockStoreVolumeSource(in AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, c *conversion.Cloner) error {
|
||||
out.VolumeID = in.VolumeID
|
||||
out.FSType = in.FSType
|
||||
|
@ -2123,65 +2117,6 @@ func deepCopy_v1_TCPSocketAction(in TCPSocketAction, out *TCPSocketAction, c *co
|
|||
return nil
|
||||
}
|
||||
|
||||
func deepCopy_v1_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error {
|
||||
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Description = in.Description
|
||||
if in.Versions != nil {
|
||||
out.Versions = make([]APIVersion, len(in.Versions))
|
||||
for i := range in.Versions {
|
||||
if err := deepCopy_v1_APIVersion(in.Versions[i], &out.Versions[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Versions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func deepCopy_v1_ThirdPartyResourceData(in ThirdPartyResourceData, out *ThirdPartyResourceData, c *conversion.Cloner) error {
|
||||
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := deepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Data != nil {
|
||||
out.Data = make([]uint8, len(in.Data))
|
||||
for i := range in.Data {
|
||||
out.Data[i] = in.Data[i]
|
||||
}
|
||||
} else {
|
||||
out.Data = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func deepCopy_v1_ThirdPartyResourceList(in ThirdPartyResourceList, out *ThirdPartyResourceList, c *conversion.Cloner) error {
|
||||
if err := deepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := deepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
out.Items = make([]ThirdPartyResource, len(in.Items))
|
||||
for i := range in.Items {
|
||||
if err := deepCopy_v1_ThirdPartyResource(in.Items[i], &out.Items[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func deepCopy_v1_Volume(in Volume, out *Volume, c *conversion.Cloner) error {
|
||||
out.Name = in.Name
|
||||
if err := deepCopy_v1_VolumeSource(in.VolumeSource, &out.VolumeSource, c); err != nil {
|
||||
|
@ -2346,7 +2281,6 @@ func init() {
|
|||
deepCopy_unversioned_ListMeta,
|
||||
deepCopy_unversioned_Time,
|
||||
deepCopy_unversioned_TypeMeta,
|
||||
deepCopy_v1_APIVersion,
|
||||
deepCopy_v1_AWSElasticBlockStoreVolumeSource,
|
||||
deepCopy_v1_Binding,
|
||||
deepCopy_v1_Capabilities,
|
||||
|
@ -2461,9 +2395,6 @@ func init() {
|
|||
deepCopy_v1_ServiceSpec,
|
||||
deepCopy_v1_ServiceStatus,
|
||||
deepCopy_v1_TCPSocketAction,
|
||||
deepCopy_v1_ThirdPartyResource,
|
||||
deepCopy_v1_ThirdPartyResourceData,
|
||||
deepCopy_v1_ThirdPartyResourceList,
|
||||
deepCopy_v1_Volume,
|
||||
deepCopy_v1_VolumeMount,
|
||||
deepCopy_v1_VolumeSource,
|
||||
|
|
|
@ -25,11 +25,6 @@ import (
|
|||
|
||||
func addDefaultingFuncs() {
|
||||
api.Scheme.AddDefaultingFuncs(
|
||||
func(obj *APIVersion) {
|
||||
if len(obj.APIGroup) == 0 {
|
||||
obj.APIGroup = "experimental"
|
||||
}
|
||||
},
|
||||
func(obj *ReplicationController) {
|
||||
var labels map[string]string
|
||||
if obj.Spec.Template != nil {
|
||||
|
|
|
@ -82,9 +82,6 @@ func addKnownTypes() {
|
|||
&ComponentStatusList{},
|
||||
&SerializedReference{},
|
||||
&RangeAllocation{},
|
||||
&ThirdPartyResource{},
|
||||
&ThirdPartyResourceList{},
|
||||
&ThirdPartyResourceData{},
|
||||
)
|
||||
|
||||
// Add common types
|
||||
|
@ -132,6 +129,3 @@ func (*ComponentStatus) IsAnAPIObject() {}
|
|||
func (*ComponentStatusList) IsAnAPIObject() {}
|
||||
func (*SerializedReference) IsAnAPIObject() {}
|
||||
func (*RangeAllocation) IsAnAPIObject() {}
|
||||
func (*ThirdPartyResource) IsAnAPIObject() {}
|
||||
func (*ThirdPartyResourceList) IsAnAPIObject() {}
|
||||
func (*ThirdPartyResourceData) IsAnAPIObject() {}
|
||||
|
|
|
@ -2491,49 +2491,3 @@ type RangeAllocation struct {
|
|||
// Data is a bit array containing all allocated addresses in the previous segment.
|
||||
Data []byte `json:"data"`
|
||||
}
|
||||
|
||||
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
|
||||
// types to the API. It consists of one or more Versions of the api.
|
||||
type ThirdPartyResource struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// The description of this object.
|
||||
Description string `json:"description,omitempty"`
|
||||
|
||||
// The versions for this third party object.
|
||||
Versions []APIVersion `json:"versions,omitempty"`
|
||||
}
|
||||
|
||||
// ThirdPartyResourceList is a list of ThirdPartyResource.
|
||||
type ThirdPartyResourceList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Items is a list of schema objects.
|
||||
Items []ThirdPartyResource `json:"items"`
|
||||
}
|
||||
|
||||
// An APIVersion represents a single concrete version of an object model.
|
||||
type APIVersion struct {
|
||||
// Name of this version (e.g. 'v1').
|
||||
Name string `json:"name,omitempty"`
|
||||
// The API group to add this object into.
|
||||
// Default 'experimental'.
|
||||
APIGroup string `json:"apiGroup,omitempty"`
|
||||
}
|
||||
|
||||
// An internal object, used for versioned storage in etcd. Not exposed to the end user.
|
||||
type ThirdPartyResourceData struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// The raw JSON data for this data.
|
||||
Data []byte `json:"name,omitempty"`
|
||||
}
|
||||
|
|
|
@ -27,16 +27,6 @@ package v1
|
|||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
var map_APIVersion = map[string]string{
|
||||
"": "An APIVersion represents a single concrete version of an object model.",
|
||||
"name": "Name of this version (e.g. 'v1').",
|
||||
"apiGroup": "The API group to add this object into. Default 'experimental'.",
|
||||
}
|
||||
|
||||
func (APIVersion) SwaggerDoc() map[string]string {
|
||||
return map_APIVersion
|
||||
}
|
||||
|
||||
var map_AWSElasticBlockStoreVolumeSource = map[string]string{
|
||||
"": "Represents a persistent disk resource in AWS.\n\nAn Amazon Elastic Block Store (EBS) must already be created, formatted, and reside in the same AWS zone as the kubelet before it can be mounted. Note: Amazon EBS volumes can be mounted to only one instance at a time.",
|
||||
"volumeID": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#awselasticblockstore",
|
||||
|
@ -1332,37 +1322,6 @@ func (TCPSocketAction) SwaggerDoc() map[string]string {
|
|||
return map_TCPSocketAction
|
||||
}
|
||||
|
||||
var map_ThirdPartyResource = map[string]string{
|
||||
"": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.",
|
||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"description": "The description of this object.",
|
||||
"versions": "The versions for this third party object.",
|
||||
}
|
||||
|
||||
func (ThirdPartyResource) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResource
|
||||
}
|
||||
|
||||
var map_ThirdPartyResourceData = map[string]string{
|
||||
"": "An internal object, used for versioned storage in etcd. Not exposed to the end user.",
|
||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"name": "The raw JSON data for this data.",
|
||||
}
|
||||
|
||||
func (ThirdPartyResourceData) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResourceData
|
||||
}
|
||||
|
||||
var map_ThirdPartyResourceList = map[string]string{
|
||||
"": "ThirdPartyResourceList is a list of ThirdPartyResource.",
|
||||
"metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"items": "Items is a list of schema objects.",
|
||||
}
|
||||
|
||||
func (ThirdPartyResourceList) SwaggerDoc() map[string]string {
|
||||
return map_ThirdPartyResourceList
|
||||
}
|
||||
|
||||
var map_Volume = map[string]string{
|
||||
"": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
|
||||
"name": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names",
|
||||
|
|
|
@ -1924,33 +1924,6 @@ func ValidateSecurityContext(sc *api.SecurityContext) errs.ValidationErrorList {
|
|||
return allErrs
|
||||
}
|
||||
|
||||
func ValidateThirdPartyResourceUpdate(old, update *api.ThirdPartyResource) errs.ValidationErrorList {
|
||||
return ValidateThirdPartyResource(update)
|
||||
}
|
||||
|
||||
func ValidateThirdPartyResource(obj *api.ThirdPartyResource) errs.ValidationErrorList {
|
||||
allErrs := errs.ValidationErrorList{}
|
||||
if len(obj.Name) == 0 {
|
||||
allErrs = append(allErrs, errs.NewFieldInvalid("name", obj.Name, "name must be non-empty"))
|
||||
}
|
||||
versions := sets.String{}
|
||||
for ix := range obj.Versions {
|
||||
version := &obj.Versions[ix]
|
||||
if len(version.Name) == 0 {
|
||||
allErrs = append(allErrs, errs.NewFieldInvalid("name", version, "name can not be empty"))
|
||||
}
|
||||
if versions.Has(version.Name) {
|
||||
allErrs = append(allErrs, errs.NewFieldDuplicate("version", version))
|
||||
}
|
||||
versions.Insert(version.Name)
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func ValidateSchemaUpdate(oldResource, newResource *api.ThirdPartyResource) errs.ValidationErrorList {
|
||||
return errs.ValidationErrorList{fmt.Errorf("Schema update is not supported.")}
|
||||
}
|
||||
|
||||
func ValidatePodLogOptions(opts *api.PodLogOptions) errs.ValidationErrorList {
|
||||
allErrs := errs.ValidationErrorList{}
|
||||
if opts.TailLines != nil && *opts.TailLines < 0 {
|
||||
|
|
|
@ -577,7 +577,7 @@ func encodeToThirdParty(name string, obj interface{}) ([]byte, error) {
|
|||
ObjectMeta: api.ObjectMeta{Name: name},
|
||||
Data: serial,
|
||||
}
|
||||
return testapi.Default.Codec().Encode(&thirdPartyData)
|
||||
return testapi.Experimental.Codec().Encode(&thirdPartyData)
|
||||
}
|
||||
|
||||
func storeToEtcd(fakeClient *tools.FakeEtcdClient, path, name string, obj interface{}) error {
|
||||
|
|
Loading…
Reference in New Issue