Skip to content
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

Add consul exposed sidecar ports #7784

Open
jorgemarey opened this issue Aug 12, 2020 · 6 comments
Open

Add consul exposed sidecar ports #7784

jorgemarey opened this issue Aug 12, 2020 · 6 comments

Comments

@jorgemarey
Copy link

jorgemarey commented Aug 12, 2020

Proposal

Add consul exposed ports using sidecars to the target labels.

Consul has the ability to expose paths for aplications making the service port only accesible internally but some application paths could be consumed externally (as /metrics for example). This can be seen in the consul documentation: https://www.consul.io/docs/connect/registration/service-registration#expose-paths-configuration-reference

This would allow us to deploy applications with the consul connect sidecar, but expose the metrics to be consumed by prometheus externally.

Regarding implementation details. On the consul discovery if the service is a proxy exposed paths could be iterated and returned as labels (for example __meta_consul_exposed_path_<path>_port: listener_port)

@roidelapluie
Copy link
Member

Thanks for this request.

We would need both: listener_port and local_path_port.

@jorgemarey
Copy link
Author

Hi @roidelapluie I will give a it a try and make a PR for this.

@roidelapluie
Copy link
Member

Thanks!! awesome!! Do not focus on only the port, try to see which meta are interesting in the complete consul connect metadata.

@jorgemarey
Copy link
Author

Yeah, will do that.

@jorgemarey
Copy link
Author

jorgemarey commented Aug 14, 2020

Hi again @roidelapluie. Made a PR in #7800. Let me know if anything should be changed/added or removed. Some label names may be too long, but I didn't know how to make them descriptive and short.

@bwplotka
Copy link
Member

Hello from the Bug Scrub!

There is no recent activity here, still to do, the last PR was abandoned. Still it looks like something to be done, and it's not too difficult. We decided to add an agenda to DevSummit around SD maintainers/cleanup of those to improve reviewing cycles here. Leaving that open for now, with help wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants