Skip to content

Add internal and external URL config for KAS

Hordur Freyr Yngvason requested to merge add-kas-url-configuration into master

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

Expected (please provide an explanation if not completing)

Test plan

  1. Set up kind as per https://docs.gitlab.com/charts/development/kind/#nginx-ingress-nodeport-without-ssl
  2. 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
  3. ran bin/rails c in a webservice container, and checked the contents of Gitlab.config.gitlab_kas

Expected result: It should

  1. be enabled
  2. have external URL ws://kas.127.0.0.1.nip.io
  3. have internal URL grpc://gitlab-kas.svc:8153

Result: with full content:

{"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

Merge request reports