summaryrefslogtreecommitdiff
path: root/internal/config/config.go
Commit message (Collapse)AuthorAgeFilesLines
* Remove SSL_CERT_DIR loggingid-remove-ssl-cert-dir-loggingIgor Drozdov2021-11-231-4/+0
| | | | | This log entry doesn't respect log level, because the log level is configured after this logging happens
* Log SSL_CERT_DIR when it's configuredIgor Drozdov2021-10-201-0/+4
|
* Respect log-level configuration againNick Thomas2021-09-231-0/+2
| | | | | | This was lost in the move from Ruby to Go. Restore it now. Changelog: fixed
* refactor: move away from ioutil (deprecated)feistel2021-08-191-3/+2
|
* refactor: change httpclient to return an errorfeistel2021-08-131-4/+5
|
* refactor: update usage of NewHTTPClient to NewHTTPClientWithOptsfeistel2021-08-111-1/+6
|
* Fix formatting via make fmtStan Hu2021-07-261-1/+0
|
* Prometheus metrics for HTTP requestsIgor Drozdov2021-07-211-1/+9
| | | | | A RoundTripper for tracking the duration of an http request is introduced
* remove tracing.NewRoundTripper from internal/Config, now that NewHTTPClient ↵Igor Wiedler2021-07-201-10/+4
| | | | already includes it
* Provide liveness and readiness probesIgor Drozdov2021-07-191-1/+5
| | | | | They are going to be used to determine whether a server is alive and ready to accept traffic
* Shutdown sshd gracefullyIgor Drozdov2021-07-151-0/+7
| | | | | | | | When interruption signal is sent, we are closing ssh listener to prevent it from accepting new connections Then after configured grace period, we cancel the context to cancel all ongoing operations
* Merge branch 'change_log_format' into 'main'Patrick Bajao2021-07-131-1/+1
|\ | | | | | | | | Change default logging format to JSON See merge request gitlab-org/gitlab-shell!476
| * changed filename extension to .log as json can operate on .log filelistout2021-05-261-1/+1
| |
| * changed the format of log file to json from textlistout2021-05-241-2/+2
| |
* | Fix opentracing setup for gitlab-sshdNick Thomas2021-05-171-2/+9
|/ | | | | | | | | | | | | | | | | | | | Previously, opentracing (if configured) was initialized late in the gitlab-shell process's lifespan, coming just before making a gRPC call to Gitaly. By moving the opentracing initialization to be at process startup, we make it available for the whole process lifecycle, which is very useful to gitlab-sshd, as it means we'll only call tracing.Initialize() once on process startup, rather than once per SSH connection. To get this working, we need to introduce a context to gitlab-sshd. This carries the client/service name, but also carries an initial correlation ID. The main outcome of this is that all calls to the authorized_keys endpoint from a given gitlab-sshd process will now share a correlation ID. I don't have a strong opinion about this either way. Changelog: fixed
* gitlab-sshd: Respect the ssl_cert_dir config516-handle-ssl-cert-dir-correctlyNick Thomas2021-04-301-0/+10
| | | | Changelog: fixed
* gitlab-sshd: Support the PROXY protocolNick Thomas2021-04-121-0/+1
|
* Fix thread-safety issues in gitlab-shell518-fix-thread-safetyNick Thomas2021-04-091-22/+22
|
* Add monitoring endpoint to sshdBen Kochie2021-02-161-0/+2
| | | | | | | | | | | Add a basic monitoring endpoint to the sshd command. * Listen on localhost port 9122 by default. * Integrate build/version info. * Update example config. https://gitlab.com/gitlab-org/gitlab-shell/-/issues/121 Signed-off-by: Ben Kochie <superq@gmail.com>
* Refactor Config defaultsBen Kochie2021-02-161-50/+33
| | | | | | | | | | | Use "omitempty" to allow defaults in the config file to be correctly passed. Without this, explicitly setting an empty default like an empty string will not work. Needed in order to allow explicitly disabling some settings. Related to: https://gitlab.com/gitlab-org/gitlab-shell/-/issues/121 Signed-off-by: Ben Kochie <superq@gmail.com>
* RFC: Simple built-in SSH serverLorenz Brun2021-01-181-44/+94
|
* Make it possible to propagate correlation ID across processesStan Hu2020-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, gitlab-shell did not pass a context through the application. Correlation IDs were generated down the call stack instead of passed around from the start execution. This has several potential downsides: 1. It's easier for programming mistakes to be made in future that lead to multiple correlation IDs being generated for a single request. 2. Correlation IDs cannot be passed in from upstream requests 3. Other advantages of context passing, such as distributed tracing is not possible. This commit changes the behavior: 1. Extract the correlation ID from the environment at the start of the application. 2. If no correlation ID exists, generate a random one. 3. Pass the correlation ID to the GitLabNet API requests. This change also enables other clients of GitLabNet (e.g. Gitaly) to pass along the correlation ID in the internal API requests (https://gitlab.com/gitlab-org/gitaly/-/issues/2725). Fixes https://gitlab.com/gitlab-org/gitlab-shell/-/issues/474
* Fix gitlab-shell not handling relative URLs over UNIX socketssh-fix-unix-relative-url-accessStan Hu2020-08-201-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4498#note_397401883, if you specify a relative path such as: ``` external_url 'http://gitlab.example.com/gitlab' ``` gitlab-shell doesn't have a way to pass the `/gitlab` to the host. For example, let's say we have: ``` gitlab_url: "http+unix://%2Fvar%2Fopt%2Fgitlab%2Fgitlab-workhorse%2Fsocket" ``` If we have `/gitlab` as the relative path, how do we specify what is the UNIX socket path and what is the relative path? If we specify: ``` gitlab_url: "http+unix:///var/opt/gitlab/gitlab-workhorse.socket/gitlab ``` This is ambiguous. Is the socket in `/var/opt/gitlab/gitlab-workhorse.socket/gitlab` or in `/var/opt/gitlab/gitlab-workhorse.socket`? To fix this, this merge request adds an optional `gitlab_relative_url_root` config parameter: ``` gitlab_url: "http+unix://%2Fvar%2Fopt%2Fgitlab%2Fgitlab-workhorse%2Fsocket" gitlab_relative_url_root: /gitlab ``` This is only used with UNIX domain sockets to disambiguate the socket and base URL path. If `gitlab_url` uses `http://` or `https://`, then `gitlab_relative_url_root` is ignored. Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/476
* Support new ssl_cert_dir config settingAsh McKenzie2020-07-011-0/+1
|
* Move gitlabnet client to client packagejc-refactor-gitlabnet-clientJohn Cai2020-05-041-1/+19
|
* Move go code up one levelNick Thomas2019-10-181-0/+123