Nicens up the timeouts for the net deployer.
This commit is contained in:
parent
ea09605827
commit
b8b59508aa
|
@ -39,7 +39,7 @@ namespace KubernetesWorkflow
|
||||||
return Configuration.OperationTimeout;
|
return Configuration.OperationTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeSpan WaitForK8sServiceDelay()
|
public TimeSpan K8sOperationRetryDelay()
|
||||||
{
|
{
|
||||||
return Configuration.RetryDelay;
|
return Configuration.RetryDelay;
|
||||||
}
|
}
|
||||||
|
|
|
@ -702,7 +702,7 @@ namespace KubernetesWorkflow
|
||||||
var sw = Stopwatch.Begin(log, true);
|
var sw = Stopwatch.Begin(log, true);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Time.WaitUntil(predicate, cluster.K8sOperationTimeout(), cluster.WaitForK8sServiceDelay());
|
Time.WaitUntil(predicate, cluster.K8sOperationTimeout(), cluster.K8sOperationRetryDelay());
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
WaitUntil(predicate, TimeSpan.FromMinutes(1), TimeSpan.FromSeconds(1));
|
WaitUntil(predicate, TimeSpan.FromMinutes(1), TimeSpan.FromSeconds(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void WaitUntil(Func<bool> predicate, TimeSpan timeout, TimeSpan retryTime)
|
public static void WaitUntil(Func<bool> predicate, TimeSpan timeout, TimeSpan retryDelay)
|
||||||
{
|
{
|
||||||
var start = DateTime.UtcNow;
|
var start = DateTime.UtcNow;
|
||||||
var state = predicate();
|
var state = predicate();
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
throw new TimeoutException("Operation timed out.");
|
throw new TimeoutException("Operation timed out.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Sleep(retryTime);
|
Sleep(retryDelay);
|
||||||
state = predicate();
|
state = predicate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,8 +81,8 @@ namespace CodexNetDeployer
|
||||||
|
|
||||||
var configuration = new KubernetesWorkflow.Configuration(
|
var configuration = new KubernetesWorkflow.Configuration(
|
||||||
kubeConfig,
|
kubeConfig,
|
||||||
operationTimeout: TimeSpan.FromSeconds(30),
|
operationTimeout: TimeSpan.FromSeconds(120),
|
||||||
retryDelay: TimeSpan.FromSeconds(10),
|
retryDelay: TimeSpan.FromSeconds(3),
|
||||||
kubernetesNamespace: config.KubeNamespace);
|
kubernetesNamespace: config.KubeNamespace);
|
||||||
|
|
||||||
return new EntryPoint(log, configuration, string.Empty);
|
return new EntryPoint(log, configuration, string.Empty);
|
||||||
|
|
Loading…
Reference in New Issue