use core client with explicit version globally

Kubernetes-commit: 4c8539cece2f0a6e6974b30d00c7341e10320bc5
This commit is contained in:
Kevin 2017-10-25 23:54:32 +08:00 committed by Kubernetes Publisher
parent 7001bc4df8
commit 41430fda7c
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ func (l *lifecycle) Admit(a admission.Attributes) error {
// refuse to operate on non-existent namespaces
if !exists || forceLiveLookup {
// as a last resort, make a call directly to storage
namespace, err = l.client.Core().Namespaces().Get(a.GetNamespace(), metav1.GetOptions{})
namespace, err = l.client.CoreV1().Namespaces().Get(a.GetNamespace(), metav1.GetOptions{})
switch {
case errors.IsNotFound(err):
return err