[Bug] Service (Serve) changing port from 8000 to 9000 doesn't work #1081
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Without this PR, users can only serve requests via port 8000.
To serve requests via another port (e.g. 9000), user needs to specify
spec.serveConfig.port
and the head Pod'sserve
port to 9000. See RESTful API and single-application config schema for more details.The HTTPProxy is used to check the health condition (code) of Serve deployments. If the Serve deployments are healthy, the HTTPProxy will add the label
"ray.io/serve=true"
to the Pod. Note that the selector of Kubernetes Serve service also includes"ray.io/serve=true"
. That is, the traffic will be redirected to the Serve deployments after HTTPProxy believes that the deployments are healthy.Others
Convert
HealthCheckPath
(public) intohealthCheckPath
(private) because the variable is only used by the functionCheckHealth()
.The single-application config schema indicates that
port
is anint
in Python. However, the size ofint
type in Python depends on the underlying platform and implementation. Hence, I am unsure about which integer type to use in Golang (e.g.int
,int32
,int64
). I conducted the following experiment and found that there is no difference betweenint
,int32
, andint64
after serializing. Hence, I declarePort
as anint
in this PR.Related issue number
Closes #570
Checks