From 8d0b3feff7639e4f3ba167ca55136e8b086a7ce4 Mon Sep 17 00:00:00 2001 From: benbierens Date: Mon, 6 Nov 2023 16:12:18 +0100 Subject: [PATCH] logs runner location --- Framework/KubernetesWorkflow/K8sController.cs | 2 +- Framework/KubernetesWorkflow/RunnerLocationUtils.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Framework/KubernetesWorkflow/K8sController.cs b/Framework/KubernetesWorkflow/K8sController.cs index 1698984..a642eef 100644 --- a/Framework/KubernetesWorkflow/K8sController.cs +++ b/Framework/KubernetesWorkflow/K8sController.cs @@ -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) diff --git a/Framework/KubernetesWorkflow/RunnerLocationUtils.cs b/Framework/KubernetesWorkflow/RunnerLocationUtils.cs index 0934904..293d5fd 100644 --- a/Framework/KubernetesWorkflow/RunnerLocationUtils.cs +++ b/Framework/KubernetesWorkflow/RunnerLocationUtils.cs @@ -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; }