-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Sidecar's Properties that override normal eureka instance properties #896
Comments
@tkvangorder Don't you want the sidecar properties port to be the one registered with eureka? If |
Yeah, It definitely makes sense to use the parent application's port. I guess what was surprising is that you can already define the eureka instance information via the eureka.instance.* fields. The sidecar properties introduce confusion because they override what is being set in the instance fields. Maybe a better approach would be to drop the sidecar properties and highlight in the documentation that the instance information should point to the parent application's port? As it is now: We actually use the actuator on the sidecar and have a health indicator check that pings the parent application. We were setting up the health, and status values in eureka.instance.* :
Without setting the sidecar properties for the node app listening on port 3000 (and the sidecar listening on port 8082), our metadata ends up looking like this:
It's easy enough to fix but it was behavior that changed between Brixton.M3 and Brixton.M5 |
What changed in the behavior? I've added constraints on the port here a185755.
|
OK, I think I tracked down the change to the health and status pages: in M3, the server port was used to construct the URI:
in M5, the management port was used to construct the URI and the server port is not used.
In EurekaClientAutoConfig, the management port falls back to the server port, before defaulting to 8080
Regardless, trying to figure out which sidecar properties override the normal eureka.instance properties is rough. It might be better to just drop the configuration of the EurekanstanceConfigBean from the SidecarConfiguration and instead document how to use the "StatusPageUrlPath", "HealthCheckUrlPath", management port, and server port to correctly define things. Or make the instance exposed in the SidecarConfiguration conditional and allow a sidecar to provide its own? I guess you could do this today with a @primary annotation. |
I've updated managementPort to behave like the one in |
I had the same issue. I have spring gateway and spring registry. I have a python-service and java sidecar for it. I want registry to see only sidecar, and to know nothing about the python app. I want nobody to know about python app, but the only sidecar (which has zuul proxy) will forward request to the sidecar. |
Sidecar doesn't work that way. It does not proxy requests to the service. It only registers the port of the external process (in your case python). |
We are using Brixton.M5 and I noticed that the port being registered with Eureka is incorrect. The SidecarConfiguration registers its own copy of the EurekaInstanceConfigBean.
The server port is injected as a value into the configuration class but never used. Instead it only consults the "sidecar" properties.
This should be a pretty easy fix: If the sidecar properties are not defined, fallback to logic that is similar to that found in EurekaClientAutoConfiguration.eurekaInstanceConfigBean.
@spencergibb Let me know if you would like help with this one, I can put a pull request together.
The text was updated successfully, but these errors were encountered: