diff options
author | Igor Drozdov <idrozdov@gitlab.com> | 2021-07-15 14:41:07 +0300 |
---|---|---|
committer | Igor Drozdov <idrozdov@gitlab.com> | 2021-07-19 15:29:54 +0300 |
commit | c505ced99cefece0255e62c02904d8cf415f9075 (patch) | |
tree | 4641a745c5ce112f103b113701a8aedde9a3c6b6 /internal/config/config.go | |
parent | 60a91e977cb76e2cc49faeeac134640dbf2e2e6c (diff) | |
download | gitlab-shell-c505ced99cefece0255e62c02904d8cf415f9075.tar.gz |
Provide liveness and readiness probes
They are going to be used to determine whether a server is alive
and ready to accept traffic
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index c58ea7d..71e7840 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -26,7 +26,9 @@ type ServerConfig struct { ProxyProtocol bool `yaml:"proxy_protocol,omitempty"` WebListen string `yaml:"web_listen,omitempty"` ConcurrentSessionsLimit int64 `yaml:"concurrent_sessions_limit,omitempty"` - GracePeriodSeconds uint64 `yaml:"grace_period"` + GracePeriodSeconds uint64 `yaml:"grace_period"` + ReadinessProbe string `yaml:"readiness_probe"` + LivenessProbe string `yaml:"liveness_probe"` HostKeyFiles []string `yaml:"host_key_files,omitempty"` } @@ -72,6 +74,8 @@ var ( WebListen: "localhost:9122", ConcurrentSessionsLimit: 10, GracePeriodSeconds: 10, + ReadinessProbe: "/start", + LivenessProbe: "/health", HostKeyFiles: []string{ "/run/secrets/ssh-hostkeys/ssh_host_rsa_key", "/run/secrets/ssh-hostkeys/ssh_host_ecdsa_key", |