BackendObjectReference's Port field is underspecified #1331
Labels
documentation
Improvements or additions to documentation
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
What happened:
Currently, the
Port
field ofBackendObjectReference
has the following godoc:This godoc is ambiguous because a service's port specification includes two port numbers: the service port and the target port. For example, an annoying person could define the following service:
Then it is ambiguous which port the following httproute uses:
A reasonable person could assume that
BackendObjectReference
'sPort
field specified the target port since the typical implementation forwards traffic to the target port (i.e., directly to the pod), not to the service port (i.e., through kube-proxy). (For what it's worth, with the OpenShift Route API, the user is expected to specify the target port, and this is explicit in that API's godoc: https://github.com/openshift/api/blob/475c352b5b246a58e756e06205847f5515b7e9a9/route/v1/types.go#L167-L173.)From reviewing the conformance tests and #581, it seems that the decision has been made that
BackendObjectReference
'sPort
field specifies the service port number, not the target port number.What you expected to happen:
I propose documenting the expected behavior as follows:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I don't believe so.
The text was updated successfully, but these errors were encountered: