Nicens up the timeouts for the net deployer.

This commit is contained in:
benbierens 2023-09-22 10:02:16 +02:00
parent ea09605827
commit b8b59508aa
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
4 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ namespace KubernetesWorkflow
return Configuration.OperationTimeout; return Configuration.OperationTimeout;
} }
public TimeSpan WaitForK8sServiceDelay() public TimeSpan K8sOperationRetryDelay()
{ {
return Configuration.RetryDelay; return Configuration.RetryDelay;
} }

View File

@ -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
{ {

View File

@ -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();
} }
} }

View File

@ -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);