我正在运行官方的 GitLab 实例jetstack
Google Cloud 中我的 GKE 集群上的 helm 图表。
我想向我的 VPC 网络添加一个仅具有内部网络访问权限的 Windows 虚拟机。
通常,您必须根据 GitLab 的 https 地址注册 GitLab 运行程序,这在内部网络中是不可能的。有没有办法通过内部网络向 GitLab 实例注册 GitLab 运行程序?
GitLab 实例的 https 资源通过nginx-ingress
控制器也在该 GKE 集群上运行。
有没有办法使用 gitlab-unicorn pod 的正在侦听端口的内部 IP 进行注册8080
?
提前致谢!
有两种选择:
-
clone_url
如果跑步者可以访问Gitlab
实例,但它的名称与解析名称不同
-
ssh-tunnel
如果跑步者无法直接访问Gitlab
实例
clone_url
If your gitlab
可以从内部网络访问,您可以使用clone_url
option
See 文档 https://docs.gitlab.com/runner/configuration/advanced-configuration.html#how-clone_url-works:
How clone_url
works https://docs.gitlab.com/runner/configuration/advanced-configuration.html#how-clone_url-works
如果 GitLab 实例暴露到运行者无法使用的 URL,则clone_url
可以配置。例如; GitLab 暴露于https://gitlab.example.com
,但由于防火墙设置,运行者无法到达该位置。如果跑步者可以到达上的节点192.168.1.23
, the clone_url
应设置为"http://192.168.1.23
.
仅当clone_url
设置后,运行器将构造一个克隆 URL,格式为http://gitlab-ci-token:[email protected] /cdn-cgi/l/email-protection/namespace/project.git
ssh-tunnel
如果您的 Gitlab 实例没有任何可用地址,您可以设置ssh-tunnel
to it.
SSH 隧道 https://www.ssh.com/ssh/tunneling是一种通过加密的 SSH 连接传输任意网络数据的方法。它可用于向遗留应用程序添加加密。它还可用于实施VPN(虚拟专用网络)并跨防火墙访问内联网服务。
ssh -L 8080:gitlab.yourinstance.com:80 gw.yourgateway.com
然后你可以使用gw.yourgateway.com:8080
作为你的clone_url
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)