mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-22 23:21:18 +00:00
Move APIs and core code to use metav1.ObjectMeta
This commit is contained in:
@@ -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
|
||||
|
@@ -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"`
|
||||
|
@@ -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{{}}},
|
||||
},
|
||||
|
Reference in New Issue
Block a user