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

ACM PolicyGenerator specify multiple clusters in a ClusterSelectors field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • ACM 2.8.0
    • ACM 2.8.0
    • GRC
    • None
    • ACM Sprint 26, ACM Sprint 27, GRC Sprint 2023-01
    • Moderate
    • No

      Description of problem:

      Is it possible to specify multiple clusters in a ClusterSelectors field?
      According to https://github.com/stolostron/policy-generator-plugin/blob/ae7f23cf32f056670c3626d1a47962e08c6ed8b3/docs/policygenerator-reference.yaml#L116 you should be able to specify several selectors, but this works, for example, with lists ("-" in front of the key ) Not.
      Are there any working examples?

      Some investigation so far:

      It looks like the behavior of the generator is to create a MatchExpression for each key:value pair given:

      spec:
        predicates:
        - requiredClusterSelector:
            labelSelector:
              matchExpressions:
              - key: cloud
                operator: In
                values:
                - red hat
              - key: this-other
                operator: In
                values:
                - label
      

      a possible workaround is to provide a placement manifest.

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

      ACM 2.6

      How reproducible:

      Steps to Reproduce:

      1. ...

      Actual results:

      Expected results:

      Additional info:

              wkutler@redhat.com William Kutler
              rhn-support-cstark Christian Stark
              ManiKrishna Sai Ravi ManiKrishna Sai Ravi
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: