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

When deploying the ODF subscription, the nodeSelector option isn't applied.

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      My customer wants to deploy ODF on specific nodes.
      So I set "nodeSelector" in the subscription.
      However, the odf-operator is only configured correctly and deployed on the target node.
      Others are not configured.
      Below is the list of operators when I deploy an ODF subscription.
      ~~~
      Deployment                                            Package
      deployment.apps/csi-addons-controller-manager            odf-csi-addons-operator        # No nodeSelector configured
      deployment.apps/noobaa-operator                        mcg-operator                              # No nodeSelector configured
      deployment.apps/ocs-metrics-exporter                    ocs-operator                # No nodeSelector configured
      deployment.apps/ocs-operator                            ocs-operator                # No nodeSelector configured
      deployment.apps/rook-ceph-operator                    ocs-operator                # No nodeSelector configured
      deployment.apps/ux-backend-server                        ocs-operator                # No nodeSelector configured
      deployment.apps/odf-console                            odf-operator                # nodeSelector configured
      deployment.apps/odf-operator-controller-manager        odf-operator                # nodeSelector configured
      ~~~
      
      Consequently, When subscribing the ODF, 4 operators are deployed - odf-cis-addon-operator, mcg-operator, ocs-operator, and odf-operator.
      Only the odf-operator is deployed with the nodeSelector applied.

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

          4.14.11-rhodf

      How reproducible:

          Always

      Steps to Reproduce:

          1. Deploy subscription for ODF
      ~~~
      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: odf-operator
        namespace: openshift-storage
      spec:
        channel: stable-4.14
        installPlanApproval: Manual
        name: odf-operator
        source: cs-redhat-operator-index
        sourceNamespace: openshift-marketplace
        config:
          nodeSelector:
            cluster.ocs.openshift.io/openshift-storage: ""
          tolerations: # <-- Required if mastersSchedulable: false
          - effect: NoSchedule
            operator: Exists
            key: node-role.kubernetes.io/master
      
      $ oc get nodes -l cluster.ocs.openshift.io/openshift-storage
      NAME      STATUS   ROLES                  AGE   VERSION
      master0   Ready    control-plane,master   20h   v1.27.16+03a907c
      master1   Ready    control-plane,master   20h   v1.27.16+03a907c
      master2   Ready    control-plane,master   20h   v1.27.16+03a907c 
      
      $ oc get pods -n openshift-storage -o custom-columns=Name:metadata.name,Node:spec.nodeName
      Name                                             Node
      csi-addons-controller-manager-55f5bbf55b-wgj9q   worker0   #<<---
      noobaa-operator-74fdb675c6-gzhz6                 worker1   #<<---
      ocs-metrics-exporter-794c689c-hwhmv              worker2   #<<--- 
      ocs-operator-7b45d5c5f5-gz75l                    worker1   #<<---
      odf-console-7cf9795bb6-7ztrf                     master0
      odf-operator-controller-manager-6577566b-n5rtv   master0
      rook-ceph-operator-6d559cd958-th9cs              worker2   #<<---
      ux-backend-server-69cbbc5956-l68z2               worker1   #<<---
      ~~~
      
          

      Actual results:

          ODF pods are deployed at any nodes

      Expected results:

          ODF pods are deployed at the target nodes (matching nodeSelector)

      Additional info:

          

              Unassigned Unassigned
              rh-ee-incho Inho Cho
              Wei Duan Wei Duan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: