Bumps k8s operation timeout for continuous test runner.

This commit is contained in:
benbierens 2023-10-04 09:26:11 +02:00
parent 3f2c789dd5
commit 562f886e30
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 6 additions and 11 deletions

View File

@ -32,7 +32,7 @@ namespace KubernetesWorkflow
public RunningPod BringOnline(ContainerRecipe[] containerRecipes, ILocation location)
{
log.Debug();
EnsureTestNamespace();
EnsureNamespace();
var deploymentName = CreateDeployment(containerRecipes, location);
var (serviceName, servicePortsMap) = CreateService(containerRecipes);
@ -90,7 +90,7 @@ namespace KubernetesWorkflow
public void DeleteNamespace()
{
log.Debug();
if (IsTestNamespaceOnline())
if (IsNamespaceOnline(K8sNamespace))
{
client.Run(c => c.DeleteNamespace(K8sNamespace, null, null, gracePeriodSeconds: 0));
}
@ -134,9 +134,9 @@ namespace KubernetesWorkflow
private string K8sNamespace { get; }
private void EnsureTestNamespace()
private void EnsureNamespace()
{
if (IsTestNamespaceOnline()) return;
if (IsNamespaceOnline(K8sNamespace)) return;
var namespaceSpec = new V1Namespace
{
@ -153,11 +153,6 @@ namespace KubernetesWorkflow
CreatePolicy();
}
private bool IsTestNamespaceOnline()
{
return IsNamespaceOnline(K8sNamespace);
}
private bool IsNamespaceOnline(string name)
{
return client.Run(c => c.ListNamespace().Items.Any(n => n.Metadata.Name == name));

View File

@ -19,8 +19,8 @@ namespace ContinuousTests
var lifecycleConfig = new KubernetesWorkflow.Configuration
(
kubeConfigFile: kubeConfig,
operationTimeout: TimeSpan.FromSeconds(30),
retryDelay: TimeSpan.FromSeconds(10),
operationTimeout: TimeSpan.FromMinutes(2),
retryDelay: TimeSpan.FromSeconds(30),
kubernetesNamespace: customNamespace
);