Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-17773

[2.11] Policy template error: namespace of the provided object does not match

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ACM 2.11.7
    • None
    • GRC
    • None
    • 1
    • False
    • None
    • False
    • GRC Sprint 2025-03, GRC Sprint 2025-04
    • Important
    • None

      Description of problem:

      After a user created a Policy, if the template inside (eg ConfigurationPolicy) specifies a namespace, then when the framework tries to create it, it will have an error. This is surfaced to the user as "template-error; Failed to create policy template: the namespace of the provided object does not match the namespace sent on the request"

      The Policy should either give a more descriptive error informing the user what to do, or ignore the namespace inside the template (since the framework is meant to always create those templates in the managed cluster namespace).

      Version-Release number of selected component (if applicable):

      How reproducible:

      Yes.

      Steps to Reproduce:

      1. Create a Policy containing a ConfigurationPolicy, with `metadata.namespace` set in the ConfigurationPolicy.
      2. Configure a placement so that the policy is distributed to a managed cluster.

      Actual results:

      The policy is noncompliant, with "template-error; Failed to create policy template: the namespace of the provided object does not match the namespace sent on the request"

      Expected results:

      Either a descriptive message helping the user understand what changes they might need to make, or the policy framework should just create the ConfigurationPolicy in the correct namespace and report its status.

      Additional info:

              jkulikau@redhat.com Justin Kulikauskas
              jkulikau@redhat.com Justin Kulikauskas
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: