opm: `index add` requires image be present remotely
Building an index image with a local-only image results in an authorization error, resulting from an image not being present remotely for pulling. The container tool used does not matter.
To reproduce:
$ operator-sdk new memcached-operator
$ operator-sdk add api --api-version example.com/v1 --kind Memcached
$ operator-sdk generate csv --csv-version 0.0.1
$ opm alpha bundle build \
--tag quay.io/example/memcached-operator:v0.1.0 \
--directory ./deploy/olm-catalog/memcached-operator \
--package memcached-operator \
--channels stable \
--default stable
$ opm index add \
--bundles quay.io/example/memcached-operator:v0.1.0 \
--tag quay.io/example/memcached-operator-index:v1.0.0 \
--container-tool docker
INFO[0000] building the index bundles="[quay.io/example/memcached-operator:v0.1.0]"
INFO[0000] running docker pull img="quay.io/example/memcached-operator:v0.1.0"
ERRO[0001] Error response from daemon: unauthorized: access to the requested resource is not authorized img="quay.io/example/memcached-operator:v0.1.0"
FATA[0001] permissive mode disabled bundles="[quay.io/example/memcached-operator:v0.1.0]" error="error loading bundle from image: error pulling image: Error response from daemon: unauthorized: access to the requested resource is not authorized\n. exit status 1"
/kind bug
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there any update on this? It would be neat to build bundles and package them together in an index all locally.
I've put in a PR which would allow for this in permissive mode only, where if the pull fails it will still attempt to create a container using a local image to extract the bundle.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.