Render storages in config.toml for Gitaly
Gitaly is getting a config file. At the moment, configuring Gitaly still requires the use of both environment variables and the config file.
/var/opt/gitlab/gitaly/config.toml
- this config file also contains 'listen' settings. This issue is about adding the storage config.
# /var/opt/gitlab/gitaly/config.toml
[[storage]]
name = "default"
path = "/var/opt/gitlab/git-data/repositories"
[[storage]]
name = "nfs01"
path = "/mnt/nfs01/repositories"
Storage blocks are an array of hashes.
# /etc/gitlab/gitlab.rb
gitaly['storage'] = [
{ 'name' => 'default', 'path' => '/var/opt/gitlab/git-data/repositories' }
]
If no Gitaly storages are defined in /etc/gitlab/gitlab.rb, the storages should follow git_data_dirs
so they end up matching those in gitlab.yml.
# gitlab.yml
repositories
storages
default: # <- this is 'name' in Gitaly config.toml
path: /var/opt/gitlab/git-data/repositories # <- this is 'path' in Gitaly config.toml
gitaly_addres: /var/opt/gitlab/gitaly/gitaly.socket # <- ignore! does not belong in Gitaly config.toml