From 3326c42f7ac6a4608e272d6a98fd4ae7d3c50a10 Mon Sep 17 00:00:00 2001 From: benbierens Date: Tue, 24 Oct 2023 09:03:56 +0200 Subject: [PATCH] Switching to ip + port internal addresses --- Framework/KubernetesWorkflow/StartupWorkflow.cs | 5 ----- .../CodexContractsPlugin/CodexContractsContainerRecipe.cs | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Framework/KubernetesWorkflow/StartupWorkflow.cs b/Framework/KubernetesWorkflow/StartupWorkflow.cs index 0d29284..1cd5eb1 100644 --- a/Framework/KubernetesWorkflow/StartupWorkflow.cs +++ b/Framework/KubernetesWorkflow/StartupWorkflow.cs @@ -172,11 +172,6 @@ namespace KubernetesWorkflow private Address GetContainerInternalAddress(RunningPod pod, Port port) { - //var serviceName = "service-" + numberSource.WorkflowNumber; - //return new Address( - // $"http://{serviceName}.{k8sNamespace}.svc.cluster.local", - // port.Number); - return new Address( $"http://{pod.PodInfo.Ip}", port.Number); diff --git a/ProjectPlugins/CodexContractsPlugin/CodexContractsContainerRecipe.cs b/ProjectPlugins/CodexContractsPlugin/CodexContractsContainerRecipe.cs index 36ca448..a59e909 100644 --- a/ProjectPlugins/CodexContractsPlugin/CodexContractsContainerRecipe.cs +++ b/ProjectPlugins/CodexContractsPlugin/CodexContractsContainerRecipe.cs @@ -17,7 +17,8 @@ namespace CodexContractsPlugin { var config = startupConfig.Get(); - var address = config.GethNode.StartResult.Container.GetAddress(GethContainerRecipe.HttpPortTag); + var containerPort = config.GethNode.StartResult.Container.GetContainerPort(GethContainerRecipe.HttpPortTag); + var address = containerPort.InternalAddress; AddEnvVar("DISTTEST_NETWORK_URL", address.ToString()); AddEnvVar("HARDHAT_NETWORK", "codexdisttestnetwork");