no_proxy for (aliases of) services
When running a job with docker executor, and defining a service using the services
keyword using an image from a private registry, for instance gitlabregistry.mydomain.local/namespace/project:version
, this service (according to the [docs] (https://docs.gitlab.com/ce/ci/docker/using_docker_images.html#accessing-the-services)) is accessible through the alias / hostname gitlabregistry.mydomain.local__namespace__project
When one is sitting behind a proxy, and uses said proxy during the job, in order to achieve connectivity, one can supply the above hostname to the no_proxy
variable. This is OK for one service, but becomes cumbersome when several services are run, as the services don't live in the same domain (suffix of hostname differs for each service, and no_proxy
works based on suffixes).
One solution I see would be to specify custom aliases, such that the above service would be assigned the alias project.mydomain.local
. Then the no_proxy
variable just need to get supplied with mydomain.local
or local
(which it probably already has).
How hard would it be to implement this? Could somebody guide me in the right direction?
Also: Does anyone see a different, easier / more straight-forward solution to this problem?