Map "binding.ContainerPort" instead of "binding.Port" to "manifest containerPort"#740
Conversation
|
I think we prefer what you currently have, not defaulting to port 80. Could you clean that up and we'll verify. |
|
done |
| containerPort.Add("containerPort", binding.Port.Value.ToString()); | ||
| containerPort.Add("containerPort", (binding.ContainerPort ?? binding.Port.Value).ToString()); | ||
| } | ||
|
|
There was a problem hiding this comment.
thx, that will teach me to double check when editing directly from the portal :D
(Not on the head please)
jkotalik
left a comment
There was a problem hiding this comment.
Modify CombineStep.cs line 41 to be:
var port = binding.ContainerPort ?? binding.Port ?? 80;Currently, this will not work because the app will be listening on port 1111 instead of port 2222 in your example.
|
will do that right after dinner ;) |
|
There should be a test view just above to view failures. https://dev.azure.com/dnceng/public/_build/results?buildId=873333&view=ms.vss-test-web.build-test-results-tab&runId=27940212&resultId=100012&paneView=debug. Looks like a flaky test though. |
|
Will approve once that done! |
|
can you enlight me about this project.EnvironmentVariables.Add(new EnvironmentVariableBuilder("PORT") { Value = port.ToString(CultureInfo.InvariantCulture), });I saw it when i did |
|
I decided to lookup Should I also change the annotation for DAPR ? |
|
To be honest I attempted to review all usage of BindingBuilder.Port` accross the repo, and I'm not 100% sure for each usage (yet) :( |
|
I believe PORT is used in some applications as well (maybe by kestrel). I'd have to double check though. |
fixes #725
It seems that the manifest code was mapping
binding.Port" to the field "containerPort" intheKubernetesManifestGenerator`As I have, for now, a limited understanding on that, There might be other underlying reason that I'm missing here
Adding back context from the Issue here for review:
From @jongio
#725 (comment)
This PR only covers
HTTPscheme and notHTTPSdue to the current absence of support yet forHTTPS:What troubles me ?
tye.yamlseem to have the notion ofportbinding that seems to be used for local run when doingtye runWhat happens when there's a
port: 1111specified but nocontainerPort? Should it default to80? or should it use the existing/definedport?eg:
This would feel like a dup to have to do: