diff --git a/KubernetesWorkflow/StartupWorkflow.cs b/KubernetesWorkflow/StartupWorkflow.cs index f5546c5..be86a7f 100644 --- a/KubernetesWorkflow/StartupWorkflow.cs +++ b/KubernetesWorkflow/StartupWorkflow.cs @@ -82,7 +82,7 @@ namespace KubernetesWorkflow return new RunningContainer(runningPod, r, servicePorts, startupConfig, GetContainerExternalAddress(runningPod, servicePorts), - GetContainerInternalAddress(servicePorts)); + GetContainerInternalAddress(runningPod, r, servicePorts)); }).ToArray(); } @@ -94,14 +94,17 @@ namespace KubernetesWorkflow GetServicePort(servicePorts)); } - private RunningContainerAddress GetContainerInternalAddress(Port[] servicePorts) + private RunningContainerAddress GetContainerInternalAddress(RunningPod pod, ContainerRecipe recipe, Port[] servicePorts) { - var serviceName = "service-" + numberSource.WorkflowNumber; - var namespaceName = cluster.Configuration.K8sNamespacePrefix + testNamespace; + var ip = pod.Ip; + var port = recipe.ExposedPorts.First().Number; + //var serviceName = "service-" + numberSource.WorkflowNumber; + //var namespaceName = cluster.Configuration.K8sNamespacePrefix + testNamespace; return new RunningContainerAddress( - $"http://{serviceName}.{namespaceName}.svc.cluster.local", - GetServicePort(servicePorts)); + //$"http://{serviceName}.{namespaceName}.svc.cluster.local", + $"http://{ip}", + port); } private static int GetServicePort(Port[] servicePorts) diff --git a/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs b/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs index 41b0a66..a77cc3a 100644 --- a/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs +++ b/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs @@ -1,5 +1,4 @@ using DistTestCore; -using DistTestCore.Codex; using DistTestCore.Helpers; using NUnit.Framework; using Utils;