use policy client with explicit version

This commit is contained in:
supereagle
2017-11-27 22:42:00 +08:00
parent 02a7c12cbd
commit 79352bafaa
3 changed files with 8 additions and 8 deletions

View File

@@ -518,7 +518,7 @@ func (o *DrainOptions) evictPod(pod corev1.Pod, policyGroupVersion string) error
DeleteOptions: deleteOptions,
}
// Remember to change change the URL manipulation func when Evction's version change
return o.client.Policy().Evictions(eviction.Namespace).Evict(eviction)
return o.client.PolicyV1beta1().Evictions(eviction.Namespace).Evict(eviction)
}
// deleteOrEvictPods deletes or evicts the pods on the api server