Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pull form insecure registry #268

Closed
IBMRob opened this issue Apr 12, 2020 · 4 comments
Closed

Unable to pull form insecure registry #268

IBMRob opened this issue Apr 12, 2020 · 4 comments

Comments

@IBMRob
Copy link

IBMRob commented Apr 12, 2020

Since upgrade to v1.9.0 of the cli I am unable to add images to an index because its complaining about an insecure registry. It looks like the break occurred in v.1.7.0 because versions prior to this worked without issue.

[Robs-MBP]$ opm index add --container-tool docker --permissive --bundles myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5 --tag myInsecureRegistry.com/openshift-marketplace/ibm-myproduct-index:0.0.5
INFO[0000] building the index                             bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]"
ERRO[0001] permissive mode disabled                       bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]" error="error loading bundle from image: failed to do request: Head https://myInsecureRegistry.com/v2/openshift-marketplace/myproduct-operator-bundle/manifests/0.0.5: x509: certificate signed by unknown authority"

I have already updated the docker configuration to allow pull/pushing to the insecure registry and can manually pull the image without issue.

Using v1.6.1 produces the following

[Robs-MBP]$ opm index add --container-tool docker --bundles myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5 --tag myInsecureRegistry.com/openshift-marketplace/ibm-myproduct-index:0.0.5
INFO[0000] building the index                            bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]"
INFO[0000] running docker pull                           img="myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5"
INFO[0002] running docker save                           img="myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5"
INFO[0002] loading Bundle myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5  img="myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5"
INFO[0002] found annotations file searching for csv      dir=bundle_tmp011253059 file=bundle_tmp011253059/metadata load=annotations
INFO[0002] found csv, loading bundle                     dir=bundle_tmp011253059 file=bundle_tmp011253059/manifests load=bundle
INFO[0002] loading bundle file                           dir=bundle_tmp011253059/manifests file=oidc.security.ibm.com_clients_crd.yaml load=bundle
INFO[0002] Generating dockerfile                         bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]"
INFO[0002] writing dockerfile: index.Dockerfile230944877  bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]"
INFO[0002] running docker build                          bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]"
INFO[0002] [docker build -f index.Dockerfile230944877 -t myInsecureRegistry.com/openshift-marketplace/ibm-myproduct-index:0.0.5 .]  bundles="[myInsecureRegistry.com/openshift-marketplace/myproduct-operator-bundle:0.0.5]"
@cdjohnson
Copy link
Contributor

Looks like this was caused by this:
#213

@njhale
Copy link
Member

njhale commented Apr 13, 2020

@IBMRob, thanks for filing this.

The index add command passes through to the registry add command which has a skip-tls option. It looks like this option wasn't added to former when the change went in.

I'll go ahead and open up a PR fixing that soon.

@cdjohnson
Copy link
Contributor

@IBMRob Check and see if 1.10 fixes your problem.

@IBMRob
Copy link
Author

IBMRob commented Apr 22, 2020

Yup all works with the latest version 👍

@IBMRob IBMRob closed this as completed Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants