-
Notifications
You must be signed in to change notification settings - Fork 520
Map "binding.ContainerPort" instead of "binding.Port" to "manifest containerPort" #740
Map "binding.ContainerPort" instead of "binding.Port" to "manifest containerPort" #740
Conversation
73cd50d
to
814e9e6
Compare
814e9e6
to
cf89725
Compare
I think we prefer what you currently have, not defaulting to port 80. Could you clean that up and we'll verify. |
done |
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new line not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx, that will teach me to double check when editing directly from the portal :D
(Not on the head please)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" inthe
KubernetesManifestGenerator`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
HTTP
scheme and notHTTPS
due to the current absence of support yet forHTTPS
:What troubles me ?
tye.yaml
seem to have the notion ofport
binding that seems to be used for local run when doingtye run
What happens when there's a
port: 1111
specified but nocontainerPort
? Should it default to80
? or should it use the existing/definedport
?eg:
This would feel like a dup to have to do: