Description of problem: According to: https://github.com/operator-framework/api/blob/master/pkg/operators/subscription_types.go#L46..L50 I'd expect to be able to define a NodeSelector for my operator at subscription level and get it propagated to my pods. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. create a subscription with something like: spec: config: nodeSelector: kubernetes.io/os: linux 2. check the operator pod for nodeSelector Actual results: I'm able to define spec.config.nodeSelector on the subscription (new or editing) but nothing got propagated to my operator Expected results: spec.config.nodeSelector got propagated from the subscription to operator pod. Additional info:
Version: [root@preserve-olm-env daily-test]# oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.6.0-0.nightly-2020-08-12-155346 True False 89m Cluster version is 4.6.0-0.nightly-2020-08-12-155346 [root@preserve-olm-env daily-test]# oc exec catalog-operator-69976d7cf6-pwxqc -n openshift-operator-lifecycle-manager -- olm --version OLM version: 0.16.0 git commit: 63a809b03d27e5e00ec14249d629ecd65e53b7aa Steps to Reproduce: 1. create a subscription with nodeSelector: [root@preserve-olm-env daily-test]# cat sub-new.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: etcd-etcdoperator.v0.9.2 spec: channel: alpha installPlanApproval: Automatic name: etcd-update source: installed-community-global-operators sourceNamespace: openshift-marketplace startingCSV: etcdoperator.v0.9.2 config: nodeSelector: kubernetes.io/os: linux [root@preserve-olm-env daily-test]# oc create -f sub-new.yaml subscription.operators.coreos.com/etcd-etcdoperator.v0.9.2 created [root@preserve-olm-env daily-test]# oc get sub NAME PACKAGE SOURCE CHANNEL etcd-etcdoperator.v0.9.2 etcd-update installed-community-global-operators alpha 2. check the operator pod for nodeSelector [root@preserve-olm-env daily-test]# oc get csv NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.2 etcd 0.9.2 Succeeded [root@preserve-olm-env daily-test]# oc get pods NAME READY STATUS RESTARTS AGE etcd-operator-6d8c556957-7b5hd 3/3 Running 0 10s [root@preserve-olm-env daily-test]# oc get pods -o yaml apiVersion: v1 ... nodeSelector: kubernetes.io/os: linux ... spec.config.nodeSelector got propagated from the subscription to operator pod. Verify the bug.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4196