camel-k: [ppc64le] bundle image generated using `bundle` and `bundle-build` targets incompatible with `opm`
SUMMARY
I was able to build the binary and image on ppc64le platform. Also, I was able to get kamel install
and kamel run
commands to work with --olm=false
flag on ocp cluster (4.6.8). But in order to get this to work with OLM, I did the following steps in order to use the bundle image to create a custom catalog source for camel-k:
make bundle
operator-sdk bundle validate ./bundle
sed -i 's/docker.io\/apache\/camel-k:1.3.0-SNAPSHOT/image-registry.openshift-image-registry.svc:5000\/camelk\/camel-k:1.3.0/g' bundle/manifests/camel-k.clusterserviceversion.yaml
cd bundle
podman build -f Dockerfile -t docker.io/amitsadaphule/camel-k-bundle:1.3.0 .
podman login docker.io -u amitsadaphule -p <password>
podman push docker.io/amitsadaphule/camel-k-bundle:1.3.0
opm index add -u podman --bundles docker.io/amitsadaphule/camel-k-bundle:1.3.0 --tag $HOST/camelk/camel-k-catalog:1.3.0 -p podman
But that failed with the error “Invalid bundle”, log below:
# opm index add -u podman --bundles docker.io/amitsadaphule/camel-k-bundle:1.3.0 --tag $HOST/camelk/camel-k-catalog:1.3.0 -p podman
INFO[0000] building the index bundles="[docker.io/amitsadaphule/camel-k-bundle:1.3.0]"
INFO[0000] running /usr/bin/podman pull docker.io/amitsadaphule/camel-k-bundle:1.3.0 bundles="[docker.io/amitsadaphule/camel-k-bundle:1.3.0]"
INFO[0002] running podman create bundles="[docker.io/amitsadaphule/camel-k-bundle:1.3.0]"
INFO[0002] running podman cp bundles="[docker.io/amitsadaphule/camel-k-bundle:1.3.0]"
INFO[0003] running podman rm bundles="[docker.io/amitsadaphule/camel-k-bundle:1.3.0]"
INFO[0003] Could not find optional dependencies file dir=bundle_tmp870838915 file=bundle_tmp870838915/metadata load=annotations
INFO[0003] found csv, loading bundle dir=bundle_tmp870838915 file=bundle_tmp870838915/manifests load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel-k-operator_v1_serviceaccount.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel-k.clusterserviceversion.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_builds.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_camelcatalogs.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_integrationkits.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_integrationplatforms.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_integrations.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_kameletbindings.yaml load=bundle
INFO[0003] loading bundle file dir=bundle_tmp870838915/manifests file=camel.apache.org_kamelets.yaml load=bundle
ERRO[0004] permissive mode disabled bundles="[docker.io/amitsadaphule/camel-k-bundle:1.3.0]" error="Invalid bundle camel-k.v1.3.0, replaces nonexistent bundle camel-k-operator.v1.2.0"
Error: Invalid bundle camel-k.v1.3.0, replaces nonexistent bundle camel-k-operator.v1.2.0
camel-k VERSION
Camel K Client 1.3.0
OS, environment
RHEL 8.2 ppc64le OCP 4.6.8
Expected Results
opm index add
should be successful in creating the catalog image, which can then be used to create a catalogsource, which in turn can help with OLM based installation of the operator.
References
https://medium.com/swlh/deploying-operator-webhooks-with-olm-be5612795840 http://krsacme.com/k8s-operator-custom-catalog/ https://redhat-connect.gitbook.io/certified-operator-guide/ocp-deployment/openshift-deployment https://www.openshift.com/blog/custom-operator-registry-catalog-source-for-openshift-4.5
Please help me resolve this issue or point me in the right direction to test the OLM based installation using locally generated camel-k image. Thanks!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (16 by maintainers)
Thanks @amitsadaphule, I’ve just reviewed the PR. What do think about closing this issue?
Awesome, thanks @amitsadaphule!
Yes, I’ll share the link once I publish the build script and documents.
Could you please check the PackageManifest created for your CatalogSource, and make sure the Subscription matches the PackageManifest information? You can follow the documentation from: https://github.com/operator-framework/operator-registry#using-the-index-with-operator-lifecycle-manager.
Thanks a lot for the detailed report.
It seems there is an issue with the
replaces
field of the bundle:https://github.com/apache/camel-k/blob/7bdb65300c380362c71b3bc624c4a0f57ce40e31/config/manifests/bases/camel-k.clusterserviceversion.yaml#L146
Could you please try by removing the field from the CSV?