logs runner location

This commit is contained in:
benbierens 2023-11-06 16:12:18 +01:00
parent 6672427565
commit 8d0b3feff7
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 5 additions and 3 deletions

View File

@ -48,7 +48,7 @@ namespace KubernetesWorkflow
private RunnerLocation DetermineRunnerLocation(RunningDeployment deployment)
{
var podInfo = GetPodInfo(deployment);
return RunnerLocationUtils.DetermineRunnerLocation(podInfo, cluster);
return RunnerLocationUtils.DetermineRunnerLocation(log, podInfo, cluster);
}
public PodInfo GetPodInfo(RunningDeployment deployment)

View File

@ -1,4 +1,5 @@
using System.Net.NetworkInformation;
using Logging;
using System.Net.NetworkInformation;
using Utils;
namespace KubernetesWorkflow
@ -13,10 +14,11 @@ namespace KubernetesWorkflow
{
private static RunnerLocation? knownLocation = null;
internal static RunnerLocation DetermineRunnerLocation(PodInfo info, K8sCluster cluster)
internal static RunnerLocation DetermineRunnerLocation(ILog log, PodInfo info, K8sCluster cluster)
{
if (knownLocation != null) return knownLocation.Value;
knownLocation = PingForLocation(info, cluster);
log.Log("Runner location set to: " + knownLocation);
return knownLocation.Value;
}