Configurable TIMEOUTs for Worker via ENV VAR #319
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR introduces configurable Timeouts for Worker constants via ENV VARs.
For some K8s setup where nodes are spun up on demand, it might be the case that 2 minutes tolerance for pod creation is not enough.
How
With the what in mind, this PR introduces the following ENV VARs that maps to their correspondent constants:
INIT_CONTAINER_STARTUP_TIMEOUT
-> accepts only >0 values.INIT_CONTAINER_TERMINATION_TIMEOUT
-> accepts only >0 values.POD_READY_TIMEOUT
-> accepts only >0 values.When the ENV VARs are not set, the current default values are assumed.
Furthermore, when the user provides an invalid value for such constants, the
parseEnvVar
function handles it, printing a helpful message saying that the format is invalid, and that it is assuming the default value.Can this PR be safely reverted and rolled back?