operator-registry icon indicating copy to clipboard operation
operator-registry copied to clipboard

opm: `index add` requires image be present remotely

Open estroz opened this issue 5 years ago • 6 comments

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

estroz avatar Mar 25 '20 01:03 estroz

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.

stale[bot] avatar May 24 '20 02:05 stale[bot]

Is there any update on this? It would be neat to build bundles and package them together in an index all locally.

JakobGray avatar Jun 02 '20 02:06 JakobGray

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.

Jamstah avatar Jun 13 '20 23:06 Jamstah

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.

stale[bot] avatar Aug 12 '20 23:08 stale[bot]

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.

stale[bot] avatar Oct 13 '20 08:10 stale[bot]

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.

stale[bot] avatar Dec 12 '20 11:12 stale[bot]