Skip to content

Commit

Permalink
Merge pull request #1 from mgugino-upstream-stage/fix-get-namespace
Browse files Browse the repository at this point in the history
Fix getPodFn namespace issue
  • Loading branch information
eparis authored Jul 12, 2019
2 parents c2e51be + a411f7e commit 4b061af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func deleteOrEvictPods(client kubernetes.Interface, pods []corev1.Pod, options *
}

getPodFn := func(namespace, name string) (*corev1.Pod, error) {
return client.CoreV1().Pods(options.Namespace).Get(name, metav1.GetOptions{})
return client.CoreV1().Pods(namespace).Get(name, metav1.GetOptions{})
}

if len(policyGroupVersion) > 0 {
Expand Down

0 comments on commit 4b061af

Please sign in to comment.