Add internal and external URL config for KAS
What does this MR do?
Adds auto-configuration of the fields gitlab_kas.enabled
, gitlab_kas.internal_url
and gitlab_kas.external_url
for gitlab-rails
, so that the GitLab backend knows if KAS is configured and where to find it.
Related issues
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 is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks -
trigger-package
has a green pipeline running against latest commit
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 the GitLab Chart opened
Test plan
I ran a quick smoke test as a sanity check in addition to the new specs.
Setup
Ran docker image from the latest QA pipeline for this MR:
docker run \
-v $(pwd)/files/gitlab-cookbooks/gitlab-kas:/opt/gitlab/embedded/cookbooks/gitlab-kas \
--rm -it \
registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:13.10.0-rfbranch.261417095.e7c14263-0 bash
Enabled kas and set one custom URL value
echo "gitlab_kas['enable'] = true" > /etc/gitlab/gitlab.rb
echo "gitlab_rails['gitlab_kas_internal_url'] = 'abcd.example.com'" >> /etc/gitlab/gitlab.rb
Configured gitlab:
/opt/gitlab/embedded/bin/runsvdir-start &
gitlab-ctl reconfigure
Expectations and results
-
/var/opt/gitlab/gitlab-kas/gitlab-kas-config.yml
should show the new customizations✅ - The custom value for
gitlab_kas_internal_url
should show undergitlab_kas.internal_url
in/var/opt/gitlab/gitlab-rails/etc/gitlab.yml
✅
Edited by Hordur Freyr Yngvason