Skip to content

Commit 1309fe3

Browse files
Merge pull request #29266 from stbenjam/req-not-limits
NO-JIRA: Additional ROSA exceptions
2 parents 4a1cead + c7195bd commit 1309fe3

File tree

2 files changed

+49
-13
lines changed

2 files changed

+49
-13
lines changed

test/extended/operators/daemon_set.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
5656
controlPlaneTopology, err := exutil.GetControlPlaneTopology(oc)
5757
o.Expect(err).NotTo(o.HaveOccurred())
5858

59-
exceptions := sets.NewString(
60-
// These shouldn't be DaemonSets as they end up being scheduled to all nodes because contrary to selfhosted OCP
61-
// there are no master nodes. Today it is unclear how networking will look like in the future so it isn't worth
62-
// chaning yet. Future work and removal of these exceptions is tracked in https://issues.redhat.com/browse/HOSTEDCP-279
59+
// These shouldn't be DaemonSets as they end up being scheduled to all nodes because contrary to selfhosted OCP
60+
// there are no master nodes. Today it is unclear how networking will look like in the future so it isn't worth
61+
// chaning yet. Future work and removal of these exceptions is tracked in https://issues.redhat.com/browse/HOSTEDCP-279
62+
hyperShiftExceptions := sets.NewString(
6363
"openshift-multus/multus-admission-controller",
6464
"openshift-sdn/sdn-controller",
65+
)
6566

67+
exceptions := sets.NewString(
6668
// Managed service exceptions https://issues.redhat.com/browse/OSD-26323
6769
"openshift-security/splunkforwarder-ds",
6870
"openshift-validation-webhook/validation-webhook",
@@ -80,7 +82,10 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
8082
continue
8183
}
8284
}
83-
if *controlPlaneTopology == configv1.ExternalTopologyMode && exceptions.Has(ds.Namespace+"/"+ds.Name) {
85+
if *controlPlaneTopology == configv1.ExternalTopologyMode && hyperShiftExceptions.Has(ds.Namespace+"/"+ds.Name) {
86+
continue
87+
}
88+
if exceptions.Has(ds.Namespace + "/" + ds.Name) {
8489
continue
8590
}
8691

test/extended/operators/resources.go

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import (
77
"strings"
88

99
g "github.com/onsi/ginkgo/v2"
10-
"github.com/openshift/origin/pkg/test/ginkgo/result"
11-
exutil "github.com/openshift/origin/test/extended/util"
1210
v1 "k8s.io/api/core/v1"
1311
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1412
"k8s.io/kube-openapi/pkg/util/sets"
1513
e2e "k8s.io/kubernetes/test/e2e/framework"
14+
15+
"github.com/openshift/origin/pkg/test/ginkgo/result"
16+
exutil "github.com/openshift/origin/test/extended/util"
1617
)
1718

1819
var _ = g.Describe("[sig-arch] Managed cluster", func() {
@@ -33,9 +34,38 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
3334
e2e.Failf("unable to list pods: %v", err)
3435
}
3536

37+
exemptNamespaces := []string{
38+
// Must-gather runs are excluded from this rule
39+
"openshift-must-gather",
40+
41+
// Managed service namespaces - https://issues.redhat.com/browse/OSD-21708
42+
"openshift-addon-operator",
43+
"openshift-backplane",
44+
"openshift-backplane-srep",
45+
"openshift-custom-domains-operator",
46+
"openshift-deployment-validation-operator",
47+
"openshift-managed-node-metadata-operator",
48+
"openshift-managed-upgrade-operator",
49+
"openshift-marketplace",
50+
"openshift-observability-operator",
51+
"openshift-ocm-agent-operator",
52+
"openshift-osd-metrics",
53+
"openshift-package-operator",
54+
"openshift-rbac-permissions",
55+
"openshift-route-monitor-operator",
56+
"openshift-security",
57+
"openshift-splunk-forwarder-operator",
58+
"openshift-sre-pruning",
59+
"openshift-validation-webhook",
60+
}
61+
3662
// pods that have a bug opened, every entry here must have a bug associated
3763
knownBrokenPods := map[string]string{
3864
//"<apiVersion>/<kind>/<namespace>/<name>/(initContainer|container)/<container_name>/<violation_type>": "<url to bug>",
65+
66+
// Managed service pods that have limits but not requests
67+
"apps/v1/Deployment/openshift-monitoring/configure-alertmanager-operator/container/configure-alertmanager-operator/limit[cpu]": "https://issues.redhat.com/browse/OSD-21708",
68+
"apps/v1/Deployment/openshift-monitoring/configure-alertmanager-operator/container/configure-alertmanager-operator/limit[memory]": "https://issues.redhat.com/browse/OSD-21708",
3969
}
4070

4171
// pods with an exception granted, the value should be the justification and the approver (a release architect)
@@ -71,14 +101,17 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
71101
waitingForFix := sets.NewString()
72102
notAllowed := sets.NewString()
73103
possibleFuture := sets.NewString()
104+
podLoop:
74105
for _, pod := range pods.Items {
75106
// Only pods in the openshift-*, kube-*, and default namespaces are considered
76107
if !strings.HasPrefix(pod.Namespace, "openshift-") && !strings.HasPrefix(pod.Namespace, "kube-") && pod.Namespace != "default" {
77108
continue
78109
}
79-
// Must-gather runs are excluded from this rule
80-
if strings.HasPrefix(pod.Namespace, "openshift-must-gather") {
81-
continue
110+
111+
for _, ns := range exemptNamespaces {
112+
if pod.Namespace == ns {
113+
continue podLoop
114+
}
82115
}
83116
// var controlPlaneTarget bool
84117
// selector := labels.SelectorFromSet(pod.Spec.NodeSelector)
@@ -104,9 +137,7 @@ var _ = g.Describe("[sig-arch] Managed cluster", func() {
104137
}
105138
}
106139
case "Job":
107-
if pod.Namespace == "openshift-marketplace" {
108-
ref.Name = "<batch_job>"
109-
}
140+
ref.Name = "<batch_job>"
110141
case "Node":
111142
continue
112143
}

0 commit comments

Comments
 (0)