Skip to content

Commit

Permalink
Merge pull request #10050 from hakman/automated-cherry-pick-of-#10049…
Browse files Browse the repository at this point in the history
…-upstream-release-1.18

Automated cherry pick of #10049: Don't require PriorityClassName to pass missing-static-pod
  • Loading branch information
k8s-ci-robot committed Oct 14, 2020
2 parents 395237c + d94e627 commit 6ed4957
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/validation/validate_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ func (v *ValidationCluster) collectPodFailures(ctx context.Context, client kuber
return client.CoreV1().Pods(metav1.NamespaceAll).List(ctx, opts)
})).EachListItem(context.TODO(), metav1.ListOptions{}, func(obj runtime.Object) error {
pod := obj.(*v1.Pod)

app := pod.GetLabels()["k8s-app"]
if pod.Namespace == "kube-system" && masterWithoutPod[nodeByAddress[pod.Status.HostIP]][app] {
delete(masterWithoutPod[nodeByAddress[pod.Status.HostIP]], app)
}

priority := pod.Spec.PriorityClassName
if priority != "system-cluster-critical" && priority != "system-node-critical" {
return nil
Expand Down Expand Up @@ -262,11 +268,6 @@ func (v *ValidationCluster) collectPodFailures(ctx context.Context, client kuber
})

}

app := pod.GetLabels()["k8s-app"]
if pod.Namespace == "kube-system" && masterWithoutPod[nodeByAddress[pod.Status.HostIP]][app] {
delete(masterWithoutPod[nodeByAddress[pod.Status.HostIP]], app)
}
return nil
})
if err != nil {
Expand Down

0 comments on commit 6ed4957

Please sign in to comment.