Bug 1291242 - To be able to pull image from openshift registry using service name
Summary: To be able to pull image from openshift registry using service name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-14 11:55 UTC by Miheer Salunke
Modified: 2020-03-11 15:00 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-18 12:38:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description Miheer Salunke 2015-12-14 11:55:10 UTC
1. Proposed title of this feature request  
  To be able to pull image from openshift registry using registry's service name
  
2. Who is the customer behind the request?  
Account: name AXA Technology Services SAS
TAM customer: yes 
SRM customer: no idea  
Strategic: yes  
  
3. What is the nature and description of the request?  

docker pull using IP:port "172.30.23.108:5000/aem-build/aem-cq:latest" succeeds
 
This works, but to have the IP there is no good idea. First I want to create templates that we can use in different OpenShift environments and also in the same environment, the IP could change. The skydns name of the docker-registry should be used, which is the same in all environments. I tested with:


- "image": "test-build/test-cq:latest" (no IP at all)
Result: Failed to pull image "test-build/test-cq:latest": Error: image test-build/test-cq:latest not found
- "image": "docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest"
Result: Failed to pull image "docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest": image pull failed for docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest, this may be because there are no credentials on this request.  details: (API error (500): invalid registry endpoint https://docker-registry.default.svc.cluster.local:5000/v0/: unable to ping registry endpoint https://docker-registry.default.svc.cluster.local:5000/v0/
v2 ping attempt failed with error: Get https://docker-registry.default.svc.cluster.local:5000/v2/: Forbidden
 v1 ping attempt failed with error: Get https://docker-registry.default.svc.cluster.local:5000/v1/_ping: Forbidden. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry docker-registry.default.svc.cluster.local:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/docker-registry.default.svc.cluster.local:5000/ca.crt


  
4. Why does the customer need this? (List the business requirements here)  

It's kind of annoying to use the IP address, because:
- We have 4 environments, so a different IP for docker registry in each environment. We are using templates to create objects (is, bc, dc, ...). So we need to do additional effort to parameterize the docker registry IP.
- With every update of OpenShift (3.0.1 to 3.0.2, 3.0.2 to 3.1.0) or sometimes also after fixing problems by RedHat, the docker registry IP changes and existing objects (dc) need to be updated with the changed IP, which also needs additional effort.


5. How would the customer like to achieve this? (List the functional requirements here)  

Not given.
  
6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  

We will check by pulling image from openshift registry using it's service name
  
7. Is there already an existing RFE upstream or in Red Hat Bugzilla?  

No
  
8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  

Not specified. 
  
9. Is the sales team involved in this request and do they have any additional input?  

No  idea

10. List any affected packages or components.  

Registry, Docker registry
  
11. Would the customer be able to assist in testing this functionality if implemented? 

Likely

Comment 1 Dan McPherson 2016-04-13 13:18:13 UTC
This sounds like you wan to expose the registry through a route:

https://docs.openshift.com/enterprise/3.0/install_config/install/docker_registry.html#exposing-the-registry

Does that solve the problem?

Comment 3 Michal Minar 2016-05-18 06:07:23 UTC
Related issue: https://github.com/openshift/origin/issues/8581

Comment 4 Michal Minar 2016-11-21 10:59:37 UTC
The referenced issues has been resolved.

@miheer can you confirm that way this is resolved as mentioned in comment [1] is sufficient? You should be able to pull and push using docker-registry service name (e.g. registry.default.svc:5000/develop/simple-ruby:latest). Nevertheless, resulting image in image stream will be still tagged with service IP.

[1] https://github.com/openshift/origin/issues/8581#issuecomment-239880317

Comment 5 zhou ying 2016-11-23 01:47:29 UTC
Confirmed with OCP3.4, we can reference unsecure registry with stable name:
[root@zhouy testjson]# oc get is
NAME              DOCKER REPO                                               TAGS      UPDATED
ruby-22-centos7   docker-registry.default.svc:5000/zytest/ruby-22-centos7   latest    Less than a second ago
ruby-ex           docker-registry.default.svc:5000/zytest/ruby-ex

Comment 6 Michal Minar 2016-11-23 07:53:24 UTC
Thanks!

Comment 10 errata-xmlrpc 2017-01-18 12:38:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0066


Note You need to log in before you can comment on or make changes to this bug.