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

Policy generator plugin does not allow evaluationInterval to be set to "watch"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • ACM 2.13.0
    • ACM 2.12.0
    • GRC
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2025-05
    • Moderate
    • Customer Facing
    • None

      Description of problem:

      The policy-generator-plugin raises the following error when setting policy's evaluationInterval to "watch":

      the policy v1-validator-du-policy has an invalid policy.evaluationInterval.compliant value: time: invalid duration "watch"

      The error occurs due to the check https://github.com/open-cluster-management-io/policy-generator-plugin/blob/main/internal/plugin.go#L1031 in the plugin code.

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

      2.12.0

      How reproducible:

      100%

      Steps to Reproduce:

      1. In the PolicyGenerator, set either policyDefaults.evaluationInterval.compliant or policies[x].evaluationInterval.compliant to "watch"
      2. Generate the policy
      3. ...

      Actual results:

      The policy generation fails with the error message mentioned above.

      Expected results:

      The policy should be generated successfully

      Additional info:

              yikim@redhat.com Yi Rae Kim
              angwang@redhat.com Angie Wang
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: