operator-framework / operator-courier

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

operator-courier verify fails on valid multi document yaml file #107

Closed tiraboschi closed 5 years ago

tiraboschi commented 5 years ago

I'm trying to use the operator courier over a valid multi document yaml file but it failed with just:

[stirabos@t470s hyperconverged-cluster-operator]$ operator-courier verify manifests/
ERROR:operatorcourier.identify:Courier requires valid input YAML files

without that much details.

Printing the whole exception I discovered that it's failing on:

expected a single document in the stream
  in "<unicode string>", line 2, column 1:
    apiVersion: v1
    ^
but found another document
  in "<unicode string>", line 9, column 1:
    ---
    ^
kevinrizza commented 5 years ago

@tiraboschi Why are you trying to use the courier to push anything with multi value document yaml? The courier only supports the packaging model that the Operator Lifecycle Manager consumes, which is a set of single document yamls (csvs, crds, and package files).

Can you help me understand your use case? What is in this file you are attempting to push?

SamiSousa commented 5 years ago

@tiraboschi ^

tiraboschi commented 5 years ago

currently we are trying to have it validating the content of https://github.com/kubevirt/hyperconverged-cluster-operator/tree/master/deploy/converged but we have there multi document files and cluster role bindings which are also failing the validation due to the kind.

kevinrizza commented 5 years ago

@tiraboschi The courier won't package those. Not just because the courier doesn't support them, but because the underlying operator-registry does not have the ability to unpack and support these files. If that is something that you need, support for those files will need to be implemented in operator-registry and the Operator Lifecycle Manager. Otherwise they just won't be applied and used even if the courier does attempt to package them.

kevinrizza commented 5 years ago

@tiraboschi some additional reading:

https://github.com/operator-framework/operator-registry#manifest-format

kevinrizza commented 5 years ago

Closing as NAI