diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/kas.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/kas.rb')
-rw-r--r-- | lib/gitlab/kas.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/kas.rb b/lib/gitlab/kas.rb index 86c0aa2b48d..45582f19214 100644 --- a/lib/gitlab/kas.rb +++ b/lib/gitlab/kas.rb @@ -5,6 +5,7 @@ module Gitlab INTERNAL_API_REQUEST_HEADER = 'Gitlab-Kas-Api-Request' VERSION_FILE = 'GITLAB_KAS_VERSION' JWT_ISSUER = 'gitlab-kas' + K8S_PROXY_PATH = 'k8s-proxy' include JwtAuthenticatable @@ -39,6 +40,12 @@ module Gitlab Gitlab.config.gitlab_kas.external_url end + def tunnel_url + uri = URI.join(external_url, K8S_PROXY_PATH) + uri.scheme = uri.scheme.in?(%w(grpcs wss)) ? 'https' : 'http' + uri.to_s + end + # Return GitLab KAS internal_url # # @return [String] internal_url |