Add support to gracefully shutdown the server
This is done by draining the connections for configured time after registry receives a SIGTERM signal. This adds a `draintimeout` setting under `HTTP`. Registry doesn't drain if draintimeout is not provided. Signed-off-by: Manish Tomar <manish.tomar@docker.com>
This commit is contained in:
parent
9bf62ca7b3
commit
40efb602d6
5 changed files with 113 additions and 7 deletions
|
@ -84,6 +84,10 @@ type Configuration struct {
|
|||
// Location headers
|
||||
RelativeURLs bool `yaml:"relativeurls,omitempty"`
|
||||
|
||||
// Amount of time to wait for connection to drain before shutting down when registry
|
||||
// receives a stop signal
|
||||
DrainTimeout time.Duration `yaml:"draintimeout,omitempty"`
|
||||
|
||||
// TLS instructs the http server to listen with a TLS configuration.
|
||||
// This only support simple tls configuration with a cert and key.
|
||||
// Mostly, this is useful for testing situations or simple deployments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue