Skip to content

WIP: Kubernetes HostAliases configuration support

Thomas Wana requested to merge greuff/gitlab-runner:host-aliases-2818 into master

What does this MR do?

This MR adds configuration options to pass HostAliases information to the gitlab-runner builder and helper images.

Why was this MR needed?

When running in private setups, the Gitlab instance often is not reachable via public IP addresses, but only by internal ones. The hostname however still needs to stay the same to pass TLS certificate checks. Therefore, some kind of mapping has to be done between hostname and internal IP address. One could use CoreDNS in a Kubernetes cluster to do it cluster-wide; but that doesn't always fit the setup, and some large public cloud providers don't support CoreDNS in their Kubernetes offerings yet.

A solution is to make the manual mapping via HostAliases Kubernetes config directly to the Pod. This MR enables exactly this.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

#2818 (closed)

Edited by Thomas Wana

Merge request reports