refactor: use metav1.ObjectMeta in other types

This commit is contained in:
Clayton Coleman
2017-01-16 22:38:19 -05:00
parent 5a5d31555b
commit 9a2a50cda7
822 changed files with 11914 additions and 9290 deletions

View File

@@ -191,7 +191,7 @@ func (c *Controller) CreateNamespaceIfNeeded(ns string) error {
return nil
}
newNs := &api.Namespace{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: ns,
Namespace: "",
},
@@ -250,7 +250,7 @@ func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, ser
return nil
}
svc := &api.Service{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: serviceName,
Namespace: api.NamespaceDefault,
Labels: map[string]string{"provider": "kubernetes", "component": "apiserver"},
@@ -321,7 +321,7 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i
e, err := r.endpointClient.Endpoints(api.NamespaceDefault).Get(serviceName, metav1.GetOptions{})
if err != nil {
e = &api.Endpoints{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: serviceName,
Namespace: api.NamespaceDefault,
},