Skip to content

Commit

Permalink
Merge pull request openshift#29351 from stbenjam/managed-service-jobs
Browse files Browse the repository at this point in the history
OCPBUGS-45838: managed services: add missing namespaces to list
  • Loading branch information
openshift-merge-bot[bot] authored Dec 6, 2024
2 parents 4def802 + 6ac9759 commit 34565b0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 43 deletions.
49 changes: 7 additions & 42 deletions test/extended/cpu_partitioning/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

g "github.com/onsi/ginkgo/v2"
o "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/util/sets"

ocpv1 "github.com/openshift/api/config/v1"

Expand All @@ -23,49 +24,13 @@ var _ = g.Describe("[sig-node][apigroup:config.openshift.io] CPU Partitioning cl
ctx = context.Background()
isClusterCPUPartitioned = false

ignoreNamespaces = map[string]struct{}{
ignoreNamespaces = sets.New(
// The below namespaces are not annotated,
// no workload is going to be running in them.
"openshift-config": {},
"openshift-config-managed": {},
"openshift-node": {},

// These are from managed services OSD-26068
"openshift-addon-operator": {},
"openshift-aqua": {},
"openshift-backplane": {},
"openshift-backplane-cee": {},
"openshift-backplane-csa": {},
"openshift-backplane-cse": {},
"openshift-backplane-csm": {},
"openshift-backplane-managed-scripts": {},
"openshift-backplane-mcs-tier-two": {},
"openshift-backplane-mobb": {},
"openshift-backplane-sdcicd": {},
"openshift-backplane-srep": {},
"openshift-backplane-tam": {},
"openshift-cloud-ingress-operator": {},
"openshift-codeready-workspaces": {},
"openshift-custom-domains-operator": {},
"openshift-customer-monitoring": {},
"openshift-deployment-validation-operator": {},
"openshift-logging": {},
"openshift-managed-node-metadata-operator": {},
"openshift-managed-upgrade-operator": {},
"openshift-must-gather-operator": {},
"openshift-observability-operator": {},
"openshift-ocm-agent-operator": {},
"openshift-operators-redhat": {},
"openshift-osd-metrics": {},
"openshift-package-operator": {},
"openshift-rbac-permissions": {},
"openshift-route-monitor-operator": {},
"openshift-security": {},
"openshift-splunk-forwarder-operator": {},
"openshift-sre-pruning": {},
"openshift-validation-webhook": {},
"openshift-velero": {},
}
"openshift-config",
"openshift-config-managed",
"openshift-node",
).Union(exutil.ManagedServiceNamespaces) // Managed service namespaces OSD-26068
)

g.BeforeEach(func() {
Expand Down Expand Up @@ -113,7 +78,7 @@ var _ = g.Describe("[sig-node][apigroup:config.openshift.io] CPU Partitioning cl
o.Expect(err).NotTo(o.HaveOccurred())
invalidNamespaces := []string{}
for _, project := range projects.Items {
if _, ok := ignoreNamespaces[project.Name]; ok {
if ignoreNamespaces.Has(project.Name) {
continue
}
if strings.HasPrefix(project.Name, "openshift-") && !strings.HasPrefix(project.Name, "openshift-e2e-") {
Expand Down
22 changes: 21 additions & 1 deletion test/extended/util/managed_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,47 @@ import "k8s.io/apimachinery/pkg/util/sets"

// ManagedServiceNamespaces is the set of namespaces used by managed service platforms
// like ROSA, ARO, etc. These are typically exempt from the requirements we impose on
// core platform namespaces.
// core platform namespaces. Consulted https://github.com/openshift/managed-cluster-config/blob/master/deploy/osd-managed-resources/managed-namespaces.ConfigMap.yaml,
// to pull out openshift-* namespaces that aren't owned by OCP.
var ManagedServiceNamespaces = sets.New[string](
"openshift-addon-operator",
"openshift-aqua",
"openshift-aws-vpce-operator",
"openshift-backplane",
"openshift-backplane-cee",
"openshift-backplane-csa",
"openshift-backplane-cse",
"openshift-backplane-csm",
"openshift-backplane-managed-scripts",
"openshift-backplane-mobb",
"openshift-backplane-srep",
"openshift-backplane-tam",
"openshift-codeready-workspaces",
"openshift-cloud-ingress-operator",
"openshift-compliance",
"openshift-compliance-monkey",
"openshift-container-security",
"openshift-custom-domains-operator",
"openshift-customer-monitoring",
"openshift-deployment-validation-operator",
"openshift-file-integrity",
"openshift-logging",
"openshift-managed-node-metadata-operator",
"openshift-managed-upgrade-operator",
"openshift-marketplace",
"openshift-must-gather-operator",
"openshift-observability-operator",
"openshift-ocm-agent-operator",
"openshift-operators-redhat",
"openshift-osd-metrics",
"openshift-package-operator",
"openshift-rbac-permissions",
"openshift-route-monitor-operator",
"openshift-scanning",
"openshift-security",
"openshift-splunk-forwarder-operator",
"openshift-sre-pruning",
"openshift-suricata",
"openshift-validation-webhook",
"openshift-velero",
)

0 comments on commit 34565b0

Please sign in to comment.