Move ThirdPartyResource to root scoped object

This commit is contained in:
Jordan Liggitt
2016-04-30 00:43:40 -04:00
parent ee2a0694b6
commit e41d504739
26 changed files with 513 additions and 1146 deletions

View File

@@ -92,6 +92,7 @@ func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper
// if a kind is not enumerated here, it is assumed to have a namespace scope
rootScoped := sets.NewString(
"PodSecurityPolicy",
"ThirdPartyResource",
)
ignoredKinds := sets.NewString()

View File

@@ -169,7 +169,7 @@ type HorizontalPodAutoscalerList struct {
Items []HorizontalPodAutoscaler `json:"items"`
}
// +genclient=true
// +genclient=true,nonNamespaced=true
// 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.

View File

@@ -166,7 +166,7 @@ type HorizontalPodAutoscalerList struct {
Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
}
// +genclient=true
// +genclient=true,nonNamespaced=true
// 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.

View File

@@ -145,7 +145,7 @@ func ValidateThirdPartyResourceName(name string, prefix bool) (bool, string) {
func ValidateThirdPartyResource(obj *extensions.ThirdPartyResource) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&obj.ObjectMeta, true, ValidateThirdPartyResourceName, field.NewPath("metadata"))...)
allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&obj.ObjectMeta, false, ValidateThirdPartyResourceName, field.NewPath("metadata"))...)
versions := sets.String{}
for ix := range obj.Versions {