Use batch client with explicit version

This commit is contained in:
supereagle
2017-11-23 09:32:13 +08:00
parent 215844219b
commit 1fe05ac29a
3 changed files with 4 additions and 4 deletions

View File

@@ -335,7 +335,7 @@ func (o *DrainOptions) getController(namespace string, controllerRef *metav1.Own
case "DaemonSet":
return o.client.Extensions().DaemonSets(namespace).Get(controllerRef.Name, metav1.GetOptions{})
case "Job":
return o.client.Batch().Jobs(namespace).Get(controllerRef.Name, metav1.GetOptions{})
return o.client.BatchV1().Jobs(namespace).Get(controllerRef.Name, metav1.GetOptions{})
case "ReplicaSet":
return o.client.Extensions().ReplicaSets(namespace).Get(controllerRef.Name, metav1.GetOptions{})
case "StatefulSet":