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

Gatekeeper policy violations not shown in PolicyReport

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • ACM 2.8.2
    • ACM 2.8.0
    • GRC
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2023-13, GRC Sprint 2023-14, GRC Sprint 2023-15, GRC Sprint 2023-16
    • Important
    • No

      Description of problem:

      Gatekeeper constraint violations aren't been shown in PolicyReport. In the same environment, ConfigurationPolicy violations are properly shown in PolicyReport.

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

      ACM 2.8.0

      Gatekeeper image: registry.redhat.io/rhacm2/gatekeeper-rhel8@sha256:1c5eacf28561895b4b9393d7bf98558de7077fffb342d0c8cd9da3d7ad046f70

      How reproducible:

      Always for Gatekeeper constraint violations

      Steps to Reproduce:

      1. Install ACM 2.8.0 & Gatekeeper Operator
      2. Deploy this policy: https://github.com/vagnerfarias/rhacm-examples/blob/6a0a4feef19ef30a04d35e6b83c7322af80c907e/policies/policy-gatekeeper-replica-limits.yaml (adjust namespace & clusterSelector)
      3. Create a deployment with less than 3 replicas

      Actual results:

      Violation is shown in Policy object:

      % oc get Policy policy-gatekeeper-replica-limits
      NAME                               REMEDIATION ACTION   COMPLIANCE STATE   AGE
      policy-gatekeeper-replica-limits   inform               NonCompliant       29h

      But it isn't shown in PolicyReport

      % oc get policyreport ocp2-policyreport -n ocp2 -o jsonpath='{.results[*].policy}'
      %
      

      Expected results:

      Gatekeeper constraint violations should be shown in PolicyReport so that alerts can be generated.

       

        1. deploy.yaml
          0.7 kB
          Vagner Farias
        2. policy-gatekeeper-operator-downstream.yaml
          8 kB
          Vagner Farias
        3. policy-gatekeeper-replica-limits.yaml
          4 kB
          Vagner Farias

              rh-ee-dhaiduce Dale Haiducek
              vagnerfarias Vagner Farias
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: