Skip to content

Conversation

Jamess11
Copy link

Added support for multiple core hosts at the ingress level.
In an air-gapped environment, we needed to add another ingress manually in order to make global docker registries such as docker.io and ghcr.io urls accessible via the habror we deloyed. With this change, it would be much more easy to manage.

@Jamess11 Jamess11 force-pushed the feature/multiple-core-hosts branch from 9e3e8ae to 0d69d48 Compare July 25, 2025 14:14
@Vad1mo
Copy link
Member

Vad1mo commented Jul 25, 2025

this won't work as harbor only supports one domain defined in external_url, everything else is redirected to to external_url

@Jamess11
Copy link
Author

It works in our company, we cloned the ingress that was created by the helm chart to expose docker.io, ghcr.io and gcr.io, while the external url is set to harbor.io.
Harbor does depend on the external url to be available. It uses the external url in the suggested push and pull commands, and it makes the docker client use it during "docker pull".
So as long as the external url endpoint is available - it works flawlessly for us.

@Vad1mo
Copy link
Member

Vad1mo commented Jul 26, 2025

I wasn't precise in my statement: it won't work across different networks. Where for example the external_url is in the public internet and the second domain is on the intranet. the clients on the intranet don't have access to the internet.

I guess this isn't the case for you.

@reasonerjt
Copy link
Contributor

reasonerjt commented Jul 28, 2025

we needed to add another ingress manually in order to make global docker registries such as docker.io and ghcr.io urls accessible via the habror we deployed.

I don't understand why Harbor can host images in ghcr.io. Did you replicated the images? But how about the upstream images changes?

I'm afraid this change is too specific to your environment and not generic enough to justify merging it.

Copy link

@bupd bupd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

I believe this might create the impression of full multi-host support in Harbor, which could be misleading.

{{- if $ingress.hosts.core }}
hosts:
- {{ $ingress.hosts.core }}
{{- range $host := $ingress.hosts.core }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harbor doesn't truly support multi-host setups, as noted in goharbor/harbor#8243. Allowing multiple hostnames in the Helm chart adds confusion. it only enables redirection to the externalURL.

In practice, all traffic is handled by the primary host, making the other hostnames effectively cosmetic.

For true multi-host support, each hostname should be capable of directly handling requests, not redirecting to a single primary. Hope this make sense.

Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@github-actions github-actions bot added the Stale label Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants