diff --git a/Framework/KubernetesWorkflow/ContainerRecipe.cs b/Framework/KubernetesWorkflow/ContainerRecipe.cs index 2ff8605..5123b8d 100644 --- a/Framework/KubernetesWorkflow/ContainerRecipe.cs +++ b/Framework/KubernetesWorkflow/ContainerRecipe.cs @@ -82,8 +82,8 @@ public override string ToString() { - if (string.IsNullOrEmpty(Tag)) return $"untagged-port={Number}"; - return $"{Tag}={Number}"; + if (string.IsNullOrEmpty(Tag)) return $"untagged-port={Number}/{Protocol}"; + return $"{Tag}={Number}/{Protocol}"; } } diff --git a/Framework/KubernetesWorkflow/K8sController.cs b/Framework/KubernetesWorkflow/K8sController.cs index 2b4c3b9..3557a12 100644 --- a/Framework/KubernetesWorkflow/K8sController.cs +++ b/Framework/KubernetesWorkflow/K8sController.cs @@ -641,7 +641,6 @@ namespace KubernetesWorkflow if (port.IsTcp()) CreateServicePort(result, recipe, port, "TCP"); if (port.IsUdp()) CreateServicePort(result, recipe, port, "UDP"); } - return result; } @@ -650,7 +649,7 @@ namespace KubernetesWorkflow result.Add(new V1ServicePort { Name = GetNameForPort(recipe, port), - Protocol = "TCP", + Protocol = protocol, Port = port.Number, TargetPort = GetNameForPort(recipe, port), });