Skip to content

Commit

Permalink
Merge pull request #49 from eyalzek/feature/filter-running-pods
Browse files Browse the repository at this point in the history
Filter for pods in `Running` status only
  • Loading branch information
gabeduke authored Aug 3, 2020
2 parents 91cadde + 70e0fd7 commit b0113d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/iexec/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// get all pods from kubernetes API
func getAllPods(client kubernetes.Interface, namespace string) (*corev1.PodList, error) {
pods, err := client.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{})
pods, err := client.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{FieldSelector: "status.phase=Running"})
if err != nil {
return pods, err
}
Expand Down

0 comments on commit b0113d4

Please sign in to comment.