Description of problem: On master, set envionment variables to use http_proxy\https_proxy, then import image from docker hub, but the packets still directly from docker hub, not use the http proxy. Version-Release number of selected component (if applicable): openshift v1.1-586-gb504019 kubernetes v1.1.0-origin-1107-g4c8e6f4 etcd 2.1.2 How reproducible: Always Steps to Reproduce: 1. Start openshift; 2. Set envionment variables to use http_proxy\https_proxy; `export HTTP_PROXY=http://ip:port` `export HTTPS_PROXY=http://ip:port` 3. Use command 'tcpdump' to prepare to capture packets; 4. Use json file to create image stream then import the image from docker hub: { "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "python", "creationTimestamp": null }, "spec": { "dockerImageRepository": "wsun/python-33-centos" } } Actual results: 4. When import image, from the tcpdump result the packets directly from docker hub not use the http proxy. Expected results: 4. When import image, should use the http proxy, and the packets should from http proxy's ip and port. Additional info:
OpenShift master image import feature will is supposed to proxy image streams living in external docker registry and not the default ones (including docker hub registry). It is required to define a dockerImageRepository running on a custom repository.
Please note that the card is dealing with using the proxy setted on the master and reuse this proxy settings to allow import images. To set the proxy on the master, please refer to this https://docs.openshift.com/enterprise/3.0/admin_guide/http_proxies.html
Hi Akram: Now, I'm confused unsecured registry like : 172.18.8.63:5000/busybox, when no proxy set, the openshift will hang when import-image, and there were logs : E0112 04:01:29.697238 2213 factory.go:49] error checking for V2 registry at https://172.18.8.63:5000/v2/: Get https://172.18.8.63:5000/v2/: EOF After use the HTTP_PROXY, the import-image still hang, and there were logs: E0112 04:37:57.804264 4949 factory.go:49] error checking for V2 registry at https://172.18.8.63:5000/v2/: Get https://172.18.8.63:5000/v2/: Forbidden
Confirmed on ami devenv-rhel7_3131, follow doc to set the proxy on the master works well, both the http_proxy and https_proxy.