Move APIs and core code to use metav1.ObjectMeta

This commit is contained in:
Clayton Coleman
2017-01-11 15:28:46 -05:00
parent 54d8ed001d
commit 36acd90aba
104 changed files with 486 additions and 865 deletions

View File

@@ -75,7 +75,7 @@ type APIServiceStatus struct {
// Name must be "version.group".
type APIService struct {
metav1.TypeMeta
kapi.ObjectMeta
metav1.ObjectMeta
// Spec contains information for locating and communicating with a server
Spec APIServiceSpec

View File

@@ -75,7 +75,7 @@ type APIServiceStatus struct {
// Name must be "version.group".
type APIService struct {
metav1.TypeMeta `json:",inline"`
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec contains information for locating and communicating with a server
Spec APIServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

View File

@@ -277,9 +277,9 @@ func TestAPIs(t *testing.T) {
for _, o := range tc.apiservices {
indexer.Add(o)
}
serviceIndexer.Add(&corev1.Service{ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"}})
serviceIndexer.Add(&corev1.Service{ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"}})
endpointsIndexer.Add(&corev1.Endpoints{
ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"},
ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"},
Subsets: []corev1.EndpointSubset{
{Addresses: []corev1.EndpointAddress{{}}},
},
@@ -434,9 +434,9 @@ func TestAPIGroup(t *testing.T) {
for _, o := range tc.apiservices {
indexer.Add(o)
}
serviceIndexer.Add(&corev1.Service{ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"}})
serviceIndexer.Add(&corev1.Service{ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"}})
endpointsIndexer.Add(&corev1.Endpoints{
ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"},
ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"},
Subsets: []corev1.EndpointSubset{
{Addresses: []corev1.EndpointAddress{{}}},
},