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

OperatorPolicy should treat configuration as mustonlyhave

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ACM 2.16.0
    • ACM 2.13.0
    • GRC
    • None
    • Quality / Stability / Reliability
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2025-21, GRC Sprint 2025-22, GRC Sprint 2025-23
    • Important
    • Customer Facing
    • None

      Description of problem:

      Any changes to `spec.subscription.config` and `spec.operatorGroup.targetNamespaces` where a key is removed is not reflected in an existing Subscription or OperatorGroup.

       

      1) Remove one targetNamespace and/or add a new one.  The result OperatorGroup will continue to include the original targetNamespace.

      2) Setup a nodeSelector as below.  When Infra nodes are added to the cluster as day-2 configuration the resulting subscription results in both worker and infra nodeSelectors being placed.

        subscription:
          channel: release-2.13
          name: advanced-cluster-management
          namespace: open-cluster-management
          source: redhat-operators
          sourceNamespace: openshift-marketplace
          config:
            nodeSelector:
              node-role.kubernetes.io/{{ hasNodesWithExactRoles "infra" | ternary "infra" "worker" }}: ""
            tolerations:
              - operator: Exists
                key: node-role.kubernetes.io/infra

       

      In both instances above the resulting Subscription and OperatorGroup would be expected to match what is configured in the OperatorPolicy.  

       

      Actual

      spec:
        channel: release-2.13
        config:
          nodeSelector:
            node-role.kubernetes.io/infra: ''
            node-role.kubernetes.io/worker: ''
          tolerations:
            - key: node-role.kubernetes.io/infra
              operator: Exists

      Expected

      spec:
        channel: release-2.13
        config:
          nodeSelector:
            node-role.kubernetes.io/infra: ''
          tolerations:
            - key: node-role.kubernetes.io/infra
              operator: Exists

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

                Created:
                Updated: