remove special cases for priority classes in the payload
@@ -10,7 +10,6 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
e2e "k8s.io/kubernetes/test/e2e/framework"
- "github.com/openshift/origin/pkg/test/ginkgo/result"
exutil "github.com/openshift/origin/test/extended/util"
)
@@ -25,13 +24,10 @@ var _ = Describe("[sig-arch] Managed cluster should", func() {
}
//Component name as keys and BZ's as values
- knownBugs := map[string]string{}
// list of pods that use images not in the release payload
invalidPodPriority := sets.NewString()
- knownBugList := sets.NewString()
// a pod in a namespace that begins with kube-* or openshift-*
namespacePrefixes := sets.NewString("kube-", "openshift-")
- var knownBugKey string
for _, pod := range pods.Items {
// exclude non-openshift and non-kubernetes platform pod
if !hasPrefixSet(pod.Namespace, namespacePrefixes) {
@@ -43,30 +39,11 @@ var _ = Describe("[sig-arch] Managed cluster should", func() {
if pod.Namespace == "openshift-marketplace" {
continue
}
- var componentName string
- lastHyphenIndex := strings.LastIndex(pod.Name, "-")
- if lastHyphenIndex > 0 {
- componentName = pod.Name[:lastHyphenIndex]
- }
- knownBugKey = componentName
- labels := pod.ObjectMeta.Labels
- // strip the pod-template-hash for the component again
- if _, ok := labels["pod-template-hash"]; ok {
- knownBugKey = knownBugKey[:strings.LastIndex(knownBugKey, "-")]
- } else if _, ok := labels["job-name"]; ok { // or for job, we have a image-pruner running as job.
- knownBugKey = knownBugKey[:strings.LastIndex(knownBugKey, "-")]
- }
- if bz, ok := knownBugs[knownBugKey]; ok {
- knownBugList.Insert(fmt.Sprintf("Component %v has a bug associated already: %v", knownBugKey, bz))
- continue
- }
+
if !strings.HasPrefix(pod.Spec.PriorityClassName, "system-") && !strings.EqualFold(pod.Spec.PriorityClassName, "openshift-user-critical") {
invalidPodPriority.Insert(fmt.Sprintf("%s/%s (currently %q)", pod.Namespace, pod.Name, pod.Spec.PriorityClassName))
}
}
- if len(knownBugList) > 0 {
- result.Flakef("Workloads with outstanding bugs:\n%s", strings.Join(knownBugList.List(), "\n"))
- }
numInvalidPodPriorities := len(invalidPodPriority)
if numInvalidPodPriorities > 0 {
