mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Clients should not check conditions, UpdateStatus() is inconsistent
Corrects some of the cargo culting that has crept into the API.
This commit is contained in:
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package client
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
@@ -104,10 +103,6 @@ func (c *namespaces) Status(namespace *api.Namespace) (result *api.Namespace, er
|
||||
|
||||
// Get gets an existing namespace
|
||||
func (c *namespaces) Get(name string) (*api.Namespace, error) {
|
||||
if len(name) == 0 {
|
||||
return nil, errors.New("name is required parameter to Get")
|
||||
}
|
||||
|
||||
result := &api.Namespace{}
|
||||
err := c.r.Get().Resource("namespaces").Name(name).Do().Into(result)
|
||||
return result, err
|
||||
|
||||
Reference in New Issue
Block a user