Diagram for graceful shutdown
Kubernetes-commit: 1145582de367b9aa4072e631845ce3abc37b8540
This commit is contained in:
parent
9b5acf1cdd
commit
30c4077e0e
|
|
@ -421,6 +421,33 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer {
|
||||||
|
|
||||||
// Run spawns the secure http server. It only returns if stopCh is closed
|
// Run spawns the secure http server. It only returns if stopCh is closed
|
||||||
// or the secure port cannot be listened on initially.
|
// or the secure port cannot be listened on initially.
|
||||||
|
// This is the diagram of what channels/signals are dependent on each other:
|
||||||
|
//
|
||||||
|
// stopCh
|
||||||
|
// |
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// | |
|
||||||
|
// ShutdownInitiated (shutdownInitiatedCh) |
|
||||||
|
// | |
|
||||||
|
// (ShutdownDelayDuration) (PreShutdownHooks)
|
||||||
|
// | |
|
||||||
|
// AfterShutdownDelayDuration (delayedStopCh) preShutdownHooksHasStoppedCh
|
||||||
|
// | |
|
||||||
|
// |---------------------------------- |
|
||||||
|
// | | |
|
||||||
|
// | (HandlerChainWaitGroup::Wait) |
|
||||||
|
// | | |
|
||||||
|
// | InFlightRequestsDrained (drainedCh) |
|
||||||
|
// | | |
|
||||||
|
// [without ShutdownSendRetryAfter] [with ShutdownSendRetryAfter] |
|
||||||
|
// | | |
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// |
|
||||||
|
// stopHttpServerCh
|
||||||
|
// |
|
||||||
|
// listenerStoppedCh
|
||||||
|
// |
|
||||||
|
// HTTPServerStoppedListening (httpServerStoppedListeningCh)
|
||||||
func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error {
|
func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error {
|
||||||
delayedStopCh := s.lifecycleSignals.AfterShutdownDelayDuration
|
delayedStopCh := s.lifecycleSignals.AfterShutdownDelayDuration
|
||||||
shutdownInitiatedCh := s.lifecycleSignals.ShutdownInitiated
|
shutdownInitiatedCh := s.lifecycleSignals.ShutdownInitiated
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue