Add internal and external URL config for KAS
What does this MR do?
Adds auto-configuration and manual overrides for the following gitlab.yml
fields required for GitLab-backend's awareness of KAS:
-
gitlab_kas.enabled
-- is there a KAS? -
gitlab_kas.external_url
-- the URL for external clients (agentk) -
gitlab_kas.internal_url
-- the URL for internal clients (GitLab rails)
Related issues
gitlab-org/gitlab#299850 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com - Pipeline with
KAS_ENABLED=1
: https://gitlab.com/gitlab-org/charts/gitlab/-/pipelines/266128551
- Pipeline with
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened: gitlab-org/omnibus-gitlab!5016 (merged)
Test plan
- Set up
kind
as per https://docs.gitlab.com/charts/development/kind/#nginx-ingress-nodeport-without-ssl - Installed GitLab chart with KAS:
helm upgrade --install gitlab . \ --set global.hosts.domain=127.0.0.1.nip.io \ --set global.kas.enabled=true \ -f examples/kind/values-base.yaml \ -f examples/kind/values-no-ssl.yaml
- ran
bin/rails c
in a webservice container, and checked the contents ofGitlab.config.gitlab_kas
Expected result: It should
- be enabled
- have external URL
ws://kas.127.0.0.1.nip.io
- have internal URL
grpc://gitlab-kas.svc:8153
Result:
{"enabled"=>true,
"secret_file"=>"/etc/gitlab/kas/.gitlab_kas_secret",
"external_url"=>"ws://kas.127.0.0.1.nip.io",
"internal_url"=>"grpc://gitlab-kas.svc:8153"}
Edited by Hordur Freyr Yngvason