0

I have GitLab Omnibus running in a Kubernetes cluster, with NodePort ports for web (80) and the docker container registry (5050).

I've setup Ingress URLs (www.gitlab.xxx.yyy, registry.gitlab.xxx.yyy) so that clients don't have to know the NodePort assignments.

The config /etc/gitlab/gitlab.rb has:

registry_external_url 'https://registry.gitlab.xxx.yyy:5050'

The problem is that the registry URL shown to users is registry.gitlab.xxx.yyy:5050/foo/bar

when what it really should be is

registry.gitlab.xxx.yyy/foo/bar

How can I configure GitLab to show a custom URL on its pages but still run the service on port 5050?

paleozogt
  • 269
  • 2
  • 9

1 Answers1

2

From the documentation about configuring the domain for container registry:

If you would like to use a separate domain [...than gitlab default domain...], all you have to do is configure the domain name under which the Container Registry will listen to.

You just need to change your config in gitlab.rb

registry_external_url 'https://registry.gitlab.xxx.yyy'
Zeitounator
  • 1,199
  • 5
  • 12
  • `registry_external_url` changes the port-- what you have means it will be listening on port 443, not port 5050. – paleozogt Feb 11 '20 at 00:16
  • 1
    if you want your user to be shown with `registry.gitlab.xxx.yyy/foo/bar` it will have to listen on port 443 somehow, else you need the port in the uri. – Zeitounator Feb 11 '20 at 00:56