Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-1961

PolicyGen does not validate the ACM policy evaluation intervals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 4.11.0
    • GitOps ZTP
    • Low
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-467. The following is the description of the original issue:

      Description of problem:

      In 4.11, PolicyGen allows the user to override the ZTP predefined policy evaluation intervals. The ACM policy evaluation interval can be overridden in PGT (per template or per sourceFiles object). 

      ACM accepts the string format of the Duration type. However, PolicyGen does not validate the values defined in PGT and it simply passes the user supplied value to ACM. PoliyGen should implement the same validation to prevent the user entering an invalid duration string

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

      How reproducible:

      Steps to Reproduce:
      1. Create a PGT with an invalid time duration string in  evaluationInterval fields
      2. Run policygenerator binary with this PGT
      3.  Expect an error

      Actual results:

      Expected results:

      No error returned

      Additional info:

            tali@redhat.com Tao Liu
            openshift-crt-jira-prow OpenShift Prow Bot
            Yang Liu Yang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: