Skip to content

[Controller] Support external Gitaly/Praefect

Mitchell Nielsen requested to merge 185-support-external-gitaly into master

Summary

Closes #185 (closed)

Supports external Gitaly/Praefect by first checking if global.gitaly.enabled=true before deploying Gitaly objects.

To do

Acceptance criteria from #185 (closed):

  • optionally support and configure external Gitaly / Praefect stores.
  • verify required configuration and secrets are present (Chart template will throw out errors if configuration is incorrect).

Test instructions

Use the example from the external Gitaly docs in your CR:

apiVersion: apps.gitlab.com/v1beta1
kind: GitLab
metadata:
  name: gitlab
spec:
  chart:
    version: "4.11.3"
    values:
      global:
        ingress:
          configureCertmanager: false # optional, not relevant for this MR
          class: nginx
        hosts:
          domain: yourdomain.com
        # Test external Gitaly
        gitaly:
          enabled: false
          external:
            - name: default                   # required
              hostname: node1.git.example.com # required
              port: 8075                      # optional, default shown
            - name: praefect                  # required
              hostname: ha.git.example.com    # required
              port: 2305                      # Praefect uses port 2305
              tlsEnabled: false               # optional, overrides gitaly.tls.enabled
          authToken:
            secret: external-gitaly-token     # required
            key: token                        # optional, default shown
          tls:
            enabled: false                    # optional, default shown

Confirm that the Gitaly/Praefect servers are attached:

image

Obviously this is just an example without real Praefect/Gitaly instances running, but it proves that:

  1. Gitaly is not deployed
  2. External instances are configured in GitLab
Edited by Mitchell Nielsen

Merge request reports

Loading