diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /workhorse/internal/gitaly/gitaly.go | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'workhorse/internal/gitaly/gitaly.go')
-rw-r--r-- | workhorse/internal/gitaly/gitaly.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/workhorse/internal/gitaly/gitaly.go b/workhorse/internal/gitaly/gitaly.go index af7425be1cf..eace87dda36 100644 --- a/workhorse/internal/gitaly/gitaly.go +++ b/workhorse/internal/gitaly/gitaly.go @@ -192,6 +192,16 @@ func newConnection(server api.GitalyServer) (*grpc.ClientConn, error) { ), ), ), + + // In https://gitlab.com/groups/gitlab-org/-/epics/8971, we added DNS discovery support to Praefect. This was + // done by making two changes: + // - Configure client-side round-robin load-balancing in client dial options. We added that as a default option + // inside gitaly client in gitaly client since v15.9.0 + // - Configure DNS resolving. Due to some technical limitations, we don't use gRPC's built-in DNS resolver. + // Instead, we implement our own DNS resolver. This resolver is exposed via the following configuration. + // Afterward, workhorse can detect and handle DNS discovery automatically. The user needs to setup and set + // Gitaly address to something like "dns:gitaly.service.dc1.consul" + gitalyclient.WithGitalyDNSResolver(gitalyclient.DefaultDNSResolverBuilderConfig()), ) conn, connErr := gitalyclient.DialSidechannel(context.Background(), server.Address, sidechannelRegistry, connOpts) // lint:allow context.Background |