minio / kes

Key Managament Server for Object Storage and more
https://min.io/docs/kes/concepts/
GNU Affero General Public License v3.0
460 stars 97 forks source link

reload server configuration on SIGHUP #327

Closed aead closed 1 year ago

aead commented 1 year ago

This commit implements full server configuration reload when receiving a SIGHUP signal for the stateless KES server.

Now, a (stateless) KES server listens for SIGHUP events. When it receives such a signal it:

When all of this completes successfully, it swaps out the server's TLS configuration and HTTP handler atomically.

The implementation tries to minimize the lock contention by holding a R/W lock for the TLS config and HTTP handler. Only when it has assembled and initialized all KES server components, it acquires the write lock and swaps the TLS config and HTTP handler.


As part of this configuration reload change, quite some code got refactored: