How to create a policy to check namespaces which has prefix 'xyz'?

Solution Verified - Updated -

Issue

  • How to create a policy to check namespaces which has prefix 'xyz'?
  • We're creating a policy on ACM console and we're seeing that "spec.namespaceSelector.include" doesn't "include" the namespace regex we specify.
 namespaceSelector:
   include:
   - xyz-*
 object-template:
   - complianceType: musthave
     objectDeinition:
     apiVersion: v1
     kind: Namespace
     metadata:
       labels:
         environment: test

Environment

  • Red Hat Advanced Cluster Management for Kubernetes 2.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content