Add the concept of startup timeout (#597)

This adds two concepts, where one encompasses the other.

Startup timeout
Startup timeout is how long to wait for the entire kubelet
to get into a functional state. Right now, this only waits
for the pod informer cache for the pod controllerto become
in-sync with API server, but this could be extended to other
informers (like secrets informer).

Wait For Startup
This changes the behaviour of the virtual kubelet to wait
for the pod controller to start before registering the node.

It is to avoid the race condition where the node is registered,
but we cannot actually do any pod operations.
This commit is contained in:
Sargun Dhillon
2019-05-06 09:25:00 -07:00
committed by Brian Goff
parent 4b0c6815eb
commit 764cb5a76e
3 changed files with 33 additions and 1 deletions

View File

@@ -78,6 +78,9 @@ type Opts struct {
TraceExporters []string
TraceSampleRate string
TraceConfig opencensus.TracingExporterOptions
// Startup Timeout is how long to wait for the kubelet to start
StartupTimeout time.Duration
}
// SetDefaultOpts sets default options for unset values on the passed in option struct.