SeldonIO / seldon-deploy-operator

Seldon Deploy installation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bundle pub failure - no kind CustomResourceDefinition for apiextensions.k8s.io/v1 - no default channel specified for seldon-deploy-operator

ryandawsonuk opened this issue · comments

cvp-isv-operator-metadata-validation-test fails at certified-operator-catalog-initialization... can't find details of error

image

https://connect.redhat.com/project/5892521/images/sha256:aeb37eaea4fe52dca7239b698972e51cf771223c98346e3e365ead45d98dca1a/scan-results/f50417a4-c5d3-4a42-9a0a-659e7e915e13/certified-operator-catalog-initialization

Site gets stuck repeatedly when trying to load it.

Raised case 02871913

Now got logs

time="2021-02-17T10:13:37Z" level=fatal msg="permissive mode disabled" error="error loading manifests from directory: [error checking provided apis in bundle : error decoding CRD: no kind \"CustomResourceDefinition\" is registered for version \"apiextensions.k8s.io/v1\" in scheme \"pkg/registry/bundle.go:15\", error adding operator bundle : error decoding CRD: no kind \"CustomResourceDefinition\" is registered for version \"apiextensions.k8s.io/v1\" in scheme \"pkg/registry/bundle.go:15\", error loading package into db: [FOREIGN KEY constraint failed, no default channel specified for seldon-deploy-operator]]"

bundle-pub-02871913.zip

The error is confusing as there is a default channel specified on the image - https://github.com/SeldonIO/seldon-deploy-operator/blob/master/bundle-version-certified.Dockerfile#L8

And in the annotations.yaml

And if it were missing then it should fail in the validation checks before this, not when inserting into the database.

I did upload this new one using the same tag as before (after the earlier tag was deleted). But ruled that out as a cause by uploading another version with different tag and got same error.

The channel part of the message seems to be coming from here in the code. But that seems to be only part of it. Not sure whether the CRD problem is leading to the channel problem or the other way around.

Others have hit this and seem to refer to it as more about the CRD. Not clear if anyone resolved it though.

Or it might relate to my changing the channel from alpha (in the published 0.7.0 version) to stable (in the 1.0.0 version)

After some mishaps I managed to push a bundle with channel set as alpha. Same problem. So not about changing channel to stable.

I did start wondering if it was related to not having a package.yaml file. The red hat docs say that's legacy and not used. But it is in one of their e2e tests so have tried a version with that in (1.0.5). Weirdly that version isn't appearing in partner connect. Seems unlikely to be that though.

Now pursuing the possibility that is that it's related to openshift versions and type of CRD. The no kind \"CustomResourceDefinition\" is registered for version \"apiextensions.k8s.io/v1\" part of the error suggests this. That does seem to be about openshift versions
. So have now pushed a version with com.redhat.openshift.versions="v4.6" - had previously been using the backport flag and including older versions too. Let's see how this 4.6-only version (1.0.6) does.

Weirdly neither 1.0.5 nor 1.0.6 (which were for checking whether related to openshift version) now appears in https://connect.redhat.com/project/5892521/images ... even though I saw 1.0.6 about 15 mins ago.

1.0.6 is passing!

image

Image now definitely published
image

And I'm able to pull it

source ~/.config/seldon/seldon-core/redhat-image-passwords.sh && echo ${rh_password_seldondeploy_operator_bundle} | docker login -u unused scan.connect.redhat.com --password-stdin
docker pull registry.connect.redhat.com/seldonio/seldon-deploy-operator-bundle

Using default tag: latest
latest: Pulling from seldonio/seldon-deploy-operator-bundle
57ea8f68cdf1: Pull complete 
64f43249cd6c: Pull complete 
9c515ef519fc: Pull complete 
c9d7a1382e60: Pull complete 
Digest: sha256:9069b5d594d361e4ba30cba6581233a6d6208cb8f20f3f5a935777ca75ec4f14
Status: Downloaded newer image for registry.connect.redhat.com/seldonio/seldon-deploy-operator-bundle:latest
registry.connect.redhat.com/seldonio/seldon-deploy-operator-bundle:latest