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

[2.12] Installing operator with multiple CSVs via OperatorPolicy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • ACM 2.12.1
    • ACM 2.11.0
    • GRC
    • None
    • 2
    • False
    • None
    • False
    • GRC Sprint 2024-20, GRC Sprint 2024-21
    • None

      Description of problem: 

      Installing the OpenShift Data Foundation Operator for example with the following OperatorPolicy does not work because the Controller does not automatically approve the InstallPlan since it contains additional CSVs.

      apiVersion: policy.open-cluster-management.io/v1beta1
      kind: OperatorPolicy
      metadata:
        name: odf-operator
      spec:
        complianceType: musthave
        operatorGroup:
          name: odf-operator
          namespace: openshift-storage
          targetNamespaces:
            - openshift-storage
        subscription:
          channel: stable-4.16
          name: odf-operator
          namespace: openshift-storage
          source: redhat-operators
          sourceNamespace: openshift-marketplace
          startingCSV: odf-operator.v4.16.2-rhodf
        upgradeApproval: Automatic
        versions:
          - odf-operator.v4.16.2-rhodf 

      According to the install plan the following should be approved

      spec:
        approval: Manual
        approved: true
        clusterServiceVersionNames:
        - ocs-operator.v4.16.2-rhodf
        - mcg-operator.v4.16.2-rhodf
        - rook-ceph-operator.v4.16.2-rhodf
        - odf-operator.v4.16.2-rhodf
        - recipe.v4.16.2-rhodf
        - odf-csi-addons-operator.v4.16.2-rhodf
        - ocs-client-operator.v4.16.2-rhodf
        - odf-prometheus-operator.v4.16.2-rhodf 

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

      2.11

      How reproducible:

      Try installing the ODF operator on 4.16 with the above mentioned operator policy

      Steps to Reproduce:

      1. Copy OperatorPolicy above
      2. Apply to cluster

      Actual results:

      OperatorPolicy is non-compliant

      the policy spec is valid, the OperatorGroup matches what is required by the policy, the Subscription matches what is required by the policy, an InstallPlan to update to [mcg-operator.v4.16.2-rhodf, ocs-client-operator.v4.16.2-rhodf, ocs-operator.v4.16.2-rhodf, odf-csi-addons-operator.v4.16.2-rhodf, odf-operator.v4.16.2-rhodf, odf-prometheus-operator.v4.16.2-rhodf, recipe.v4.16.2-rhodf, rook-ceph-operator.v4.16.2-rhodf] is available for approval but approval for [mcg-operator.v4.16.2-rhodf, ocs-client-operator.v4.16.2-rhodf, ocs-operator.v4.16.2-rhodf, odf-csi-addons-operator.v4.16.2-rhodf, odf-prometheus-operator.v4.16.2-rhodf, recipe.v4.16.2-rhodf, rook-ceph-operator.v4.16.2-rhodf] is required, the ClusterServiceVersion required by the policy was not found, no CRDs were found for the operator, there are no relevant deployments because the ClusterServiceVersion is missing, CatalogSource was found 

      Expected results:

      OperaotrPolicy should be compliant approving all CSVs in the install plan 

      Additional info:

              mprahl Matthew Prahl
              rhn-support-afaulhab Anne Faulhaber
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: