Skip to content

Commit

Permalink
Merge pull request kubernetes#3806 from jbartosik/revert-3744
Browse files Browse the repository at this point in the history
Revert 3744
  • Loading branch information
k8s-ci-robot authored Jan 13, 2021
2 parents 4d34dec + c20e851 commit 93d5705
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vertical-pod-autoscaler/pkg/recommender/input/cluster_feeder.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ func newPodClients(kubeClient kube_client.Interface, resourceEventHandler cache.
// We are interested in pods which are Running or Unknown (in case the pod is
// running but there are some transient errors we don't want to delete it from
// our model).
// We don't want to watch Pending, Succeeded, or Failed failed pods because we
// know they're not generating any usage.
// Filter
statusFilter := fmt.Sprintf("status.phase!=%s,status.phase!=%s,status.phase!=%s", apiv1.PodPending, apiv1.PodSucceeded, apiv1.PodFailed)
selector := fields.ParseSelectorOrDie(statusFilter)
// We don't want to watch Pending pods because they didn't generate any usage
// yet.
// Succeeded and Failed failed pods don't generate any usage anymore but we
// don't necessarily want to immediately delete them.
selector := fields.ParseSelectorOrDie("status.phase!=" + string(apiv1.PodPending))
podListWatch := cache.NewListWatchFromClient(kubeClient.CoreV1().RESTClient(), "pods", namespace, selector)
indexer, controller := cache.NewIndexerInformer(
podListWatch,
Expand Down

0 comments on commit 93d5705

Please sign in to comment.