operator-framework / operator-courier

Build, verify and push operators
Apache License 2.0
41 stars 53 forks source link

Add errors for `metadata.annotations.olm` fields to verify #168

Open jsm84 opened 4 years ago

jsm84 commented 4 years ago

Having the following fields set in the CSV metadata will cause an operator to fail to deploy using OLM:

metadata:
  annotations:
    olm.operatorGroup: cloudera-pxs9f
    olm.operatorNamespace: cloudera
    olm.targetNamespaces: cloudera

I'm not sure why this occurs, but the actual error given by OLM (found under the installPlan) is:

status:
  conditions:
    - lastTransitionTime: '2019-10-01T18:19:47Z'
      lastUpdateTime: '2019-10-01T18:19:47Z'
      message: >-
        error generating ownerrefs for service account: cfm-operator:
        clusterserviceversions.operators.coreos.com "cfm-operator.v1.1.31" not
        found

It appears that by having these fields set, the CSV fails to get created by OLM. This is the second time I've come across this (the other instance was back in April for CrunchyData). The failure in OLM is easily reproducible by deploying an operator for which the metadata (CSV) has those fields set.

The operator-courier verify command should ideally catch this.