Skip to content

Commit

Permalink
Don't require PriorityClassName to pass missing-static-pod checks
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers authored and Ciprian Hacman committed Oct 14, 2020
1 parent 395237c commit d94e627
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 d94e627

Please sign in to comment.