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

PolicyGenerator error configuring watch evaluation interval

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • ACM 2.12.0
    • GRC
    • None
    • False
    • None
    • False
    • Important
    • Customer Facing, Customer Reported
    • None

      When setting the evaluationInterval.compliant or evaluationInterval.noncompliant to "watch" the PolicyGenerator returns an error.

       

      PolicyGenerator version is latest 2.12

      [~/.config/kustomize/plugin/policy.open-cluster-management.io/v1/policygenerator]
      [bjarvis@bjarvis] $ ./PolicyGenerator --version
      release-2.12-9c1b6a9 

      Running the PolicyGenerator results in error:

      [~/src/bry-tam/acm-policygenerator-examples/test-generator/policies/policy01]
      [bjarvis@bjarvis] (main*) $ kb
      error processing the PolicyGenerator file '/tmp/kust-plugin-config-3978332144': the policy policy-test-name has an invalid policy.evaluationInterval.compliant value: time: invalid duration "watch"
      Error: failure in plugin configured via /tmp/kust-plugin-config-3978332144; exit status 1: exit status 1

      Example generator file:

       
      [~/src/bry-tam/acm-policygenerator-examples/test-generator/policies/policy01]
      [bjarvis@bjarvis] (main*) $ cat generator.yml 
      ---
      apiVersion: policy.open-cluster-management.io/v1
      kind: PolicyGenerator
      metadata:
        name: gen-policy01
      policyDefaults:
        namespace: policies
        remediationAction: enforce
        consolidateManifests: false
        evaluationInterval:
          compliant: watch
          noncompliant: 10s
      placementBindingDefaults:
        name: "policy01-binding"
      policies:
        - name: policy-test-name
          manifests:
            - path: cstark/namespace.yml 

              jkulikau@redhat.com Justin Kulikauskas
              rhn-support-bjarvis Brian Jarvis
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: