Open jsm84 opened 5 years ago
@jsm84 There is a difference between "Won't run when deployed to a kube cluster with OLM" and "Won't display well on the operatorhub.io UI". There are probably lots of operators that will be packaged and pushed with the operator-courier that will "work" from a developer perspective even if these fields are formatted incorrectly (as long as the yaml itself is valid). In that case, I don't see the value of failing the validator when the operator itself will run fine on a cluster.
Working with the container verification pipeline (CVP), we've noticed several CSV metadata files make it past the operator-courier without failure, and then fail to deploy via OLM as part of the next stage of the pipeline. This seems to occur as we've been instructed not to use
--ui_validate_io
when linting the CSV & associated metadata files with the operator-courier.Thus, if a CSV file has any of these extraneous fields defined (however erroneously), the courier ignores these fields altogether (if run without the noted flag), and thus no type checking is performed. When this happens, the operator often fails to deploy from CSV using the OLM, as the culprit field's data type doesn't match what is expected by the OLM for that field.
In one particular example, the
capabilities
field is defined as a struct/dict in the CSV, however it should be set to type string (as that's what's expected by OLM):In this case, the CSV passes (as in, no errors) the
operator-courier verify ./
with the following warning:WARNING:operatorcourier.validate:csv metadata.annotations.certified not defined.
However, running it through
operator-courier verify --ui_validate_io ./
catches the incorrectcapabilities
data type:Should these fields at least be type checked by the courier when they exist, even without the
--ui_validate_io
flag?