Use yq instead of Python for parsing RBAC from the Helm chart. We need
to use yq v4.14.1 or higher to fix yq's handling of the yaml header
markers ('---'). Update the Makefile's yq version to v4, which also
requires updating the script to update the CRDs. This was quite easy.
It is very difficult, however, to change the version of yq used by the
CSV generating/parsing scripts, which already used their own yq
download. Continue using yq v3 for this.
In order to make sure the scripts are using the right version of yq, add
basic validation to them to verify they are running v3 or v4 as required
for their operation.
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
Build Rook's CSV file
Just run make CSV_VERSION=1.0.0 csv-ceph like this:
make csv-ceph CSV_VERSION=1.0.1 CSV_PLATFORM=k8s ROOK_OP_VERSION=rook/ceph:v1.0.1
INFO[0000] Generating CSV manifest version 1.0.1 INFO[0000] Fill in the following required fields in file deploy/olm-catalog/ceph.csv.yaml: spec.keywords spec.maintainers spec.provider spec.labels INFO[0000] Create deploy/olm-catalog/ceph.csv.yaml INFO[0000] Create deploy/olm-catalog/_generated.concat_crd.yaml Congratulations! Your Rook CSV 1.0.1 file for k8s is ready at: deploy/olm/deploy/olm-catalog/rook-ceph.v1.0.1.clusterserviceversion.yaml Push it to https://github.com/operator-framework/community-operators as well as the CRDs files from deploy/olm/deploy/crds and the package file deploy/olm/assemble/rook-ceph.package.yaml.
Or for OpenShift use: make CSV_VERSION=1.0.0 CSV_PLATFORM=ocp csv-ceph.