Skip to content

Allow separate external Gitaly when Praefect is enabled

What does this MR do?

Ensures that external Gitaly servers are configured in the 'storages' section when Praefect is enabled.

Related issues

Testing

# test.values.yaml
global:
  gitaly:
    enabled: false
    external:
      - name: externalGitaly1
        hostname: gitaly-default.infra.external
        port: 8075
    authToken:
      secret: external-gitaly-token
  praefect:
    enabled: true
    virtualStorages:
    - name: default

Confirm that the template outputs both Praefect and external Gitaly storages:

repositories:
  storages: # You must have at least a `default` storage path.

    default:
      path: /var/opt/gitlab/repo
      gitaly_address: tcp://test-praefect.default.svc:8075
      gitaly_token: "<%= File.read('/etc/gitlab/gitaly/gitaly_token_praefect').strip.dump[1..-2] %>"
    externalGitaly1:
      path: /var/opt/gitlab/repo
      gitaly_address: tcp://gitaly-default.infra.external:8075

Closes #2660 (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

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

Closes #2660 (closed)

Edited by Mitchell Nielsen

Merge request reports