Adds kube namespace to internal addresses

This commit is contained in:
benbierens 2023-11-07 13:13:06 +01:00
parent 6e60a8614c
commit 3e49ce6ae9
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 2 additions and 1 deletions

View File

@ -172,10 +172,11 @@ namespace KubernetesWorkflow
private Address GetContainerInternalAddress(StartResult startResult, ContainerRecipe recipe, string tag) private Address GetContainerInternalAddress(StartResult startResult, ContainerRecipe recipe, string tag)
{ {
var namespaceName = startResult.Cluster.Configuration.KubernetesNamespace;
var serviceName = startResult.InternalService!.Name; var serviceName = startResult.InternalService!.Name;
var port = startResult.GetInternalServicePorts(recipe, tag); var port = startResult.GetInternalServicePorts(recipe, tag);
return new Address( return new Address(
$"http://{serviceName}", $"http://{namespaceName}/{serviceName}",
port.Number); port.Number);
} }