diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-08-24 11:01:54 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-08-29 08:55:09 +0300 |
commit | 96a3d3025429f79c3a0ed65054cedd3c2a0608a5 (patch) | |
tree | 6947e874e1092b6b7bcc332a575879d8f06be91d | |
parent | 9e888af15b440128118d739266310e8ecb32d4ed (diff) |
gitaly/config: Deprecate `[gitlab-shell]` section
Deprecate the `[gitlab-shell]` section in favor of explicitly
configuring both the custom hooks directory and GitLab secret.
Changelog: deprecated
-rw-r--r-- | config.toml.example | 4 | ||||
-rw-r--r-- | internal/gitaly/config/config.go | 37 |
2 files changed, 23 insertions, 18 deletions
diff --git a/config.toml.example b/config.toml.example index aecd907af..b0694b47d 100644 --- a/config.toml.example +++ b/config.toml.example @@ -70,10 +70,6 @@ dir = "/home/git/gitlab/log" # [prometheus] # grpc_latency_buckets = [0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0] -[gitlab-shell] -# The directory where gitlab-shell is installed -dir = "/home/git/gitlab-shell" - [hooks] custom_hooks_dir = "/home/git/custom_hooks" diff --git a/internal/gitaly/config/config.go b/internal/gitaly/config/config.go index 477baebb5..c5ae9fe9c 100644 --- a/internal/gitaly/config/config.go +++ b/internal/gitaly/config/config.go @@ -88,20 +88,29 @@ type Cfg struct { // configuration to its standard output that we will then deserialize and merge back into // the initially-loaded configuration again. This is an easy mechanism to generate parts of // the configuration at runtime, like for example secrets. - ConfigCommand string `toml:"config_command,omitempty" json:"config_command"` - SocketPath string `toml:"socket_path,omitempty" json:"socket_path" split_words:"true"` - ListenAddr string `toml:"listen_addr,omitempty" json:"listen_addr" split_words:"true"` - TLSListenAddr string `toml:"tls_listen_addr,omitempty" json:"tls_listen_addr" split_words:"true"` - PrometheusListenAddr string `toml:"prometheus_listen_addr,omitempty" json:"prometheus_listen_addr" split_words:"true"` - BinDir string `toml:"bin_dir,omitempty" json:"bin_dir"` - RuntimeDir string `toml:"runtime_dir,omitempty" json:"runtime_dir"` - Git Git `toml:"git,omitempty" json:"git" envconfig:"git"` - Storages []Storage `toml:"storage,omitempty" json:"storage" envconfig:"storage"` - Logging Logging `toml:"logging,omitempty" json:"logging" envconfig:"logging"` - Prometheus prometheus.Config `toml:"prometheus,omitempty" json:"prometheus"` - Auth auth.Config `toml:"auth,omitempty" json:"auth"` - TLS TLS `toml:"tls,omitempty" json:"tls"` - Gitlab Gitlab `toml:"gitlab,omitempty" json:"gitlab"` + ConfigCommand string `toml:"config_command,omitempty" json:"config_command"` + SocketPath string `toml:"socket_path,omitempty" json:"socket_path" split_words:"true"` + ListenAddr string `toml:"listen_addr,omitempty" json:"listen_addr" split_words:"true"` + TLSListenAddr string `toml:"tls_listen_addr,omitempty" json:"tls_listen_addr" split_words:"true"` + PrometheusListenAddr string `toml:"prometheus_listen_addr,omitempty" json:"prometheus_listen_addr" split_words:"true"` + BinDir string `toml:"bin_dir,omitempty" json:"bin_dir"` + RuntimeDir string `toml:"runtime_dir,omitempty" json:"runtime_dir"` + Git Git `toml:"git,omitempty" json:"git" envconfig:"git"` + Storages []Storage `toml:"storage,omitempty" json:"storage" envconfig:"storage"` + Logging Logging `toml:"logging,omitempty" json:"logging" envconfig:"logging"` + Prometheus prometheus.Config `toml:"prometheus,omitempty" json:"prometheus"` + Auth auth.Config `toml:"auth,omitempty" json:"auth"` + TLS TLS `toml:"tls,omitempty" json:"tls"` + Gitlab Gitlab `toml:"gitlab,omitempty" json:"gitlab"` + // GitlabShell contains the location of the gitlab-shell directory. This directory is expected to contain two + // things: + // + // - The GitLab secret file ".gitlab_shell_secret", which is used to authenticate with GitLab. This should + // instead be configured via "gitlab.secret" or "gitlab.secret_file". + // + // - The custom hooks directory "hooks". This should instead be configured via "hooks.custom_hooks_dir". + // + // This setting is thus deprecated and should ideally not be used anymore. GitlabShell GitlabShell `toml:"gitlab-shell,omitempty" json:"gitlab-shell"` Hooks Hooks `toml:"hooks,omitempty" json:"hooks"` Concurrency []Concurrency `toml:"concurrency,omitempty" json:"concurrency"` |