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

Allow ui_config.metrics.path_allowlist to be configured #4444

Open
agrahamlincoln opened this issue Dec 17, 2024 · 0 comments
Open

Allow ui_config.metrics.path_allowlist to be configured #4444

agrahamlincoln opened this issue Dec 17, 2024 · 0 comments
Labels
type/enhancement New feature or request

Comments

@agrahamlincoln
Copy link

agrahamlincoln commented Dec 17, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Is your feature request related to a problem? Please describe.

It may be desirable to have a prometheus metrics provider hosted under a subpath. In this configuration, there's no way to configure the path_allowlist option to add a prefix to each of these paths. (More docs on Path Allowlist)

Feature Description

add a new option to the helm chart to enable operators to modify ui_config.metrics.path_allowlist to their liking

Use Case(s)

When prometheus metrics provider is hosted on a subpath

Example values.yaml for the helm chart (limited to only relevant config for this feature request):

global:
  metrics:
    enabled: true
ui:
  enabled: true
  metrics:
    baseUrl: http://consul-prometheus.consul.svc.cluster.local:9090/consul
    provider: prometheus

This configuration will never work and the server will throw errors in the log that look like the following:

[ERROR] agent.ui_metrics_proxy: target URL path is not allowed: base_url=http://consul-prometheus.consul.svc.cluster.local:9090/consul path=/api/v1/query target_url=http://consul-prometheus.consul.svc.cluster.local:9090/consul/api/v1/query path_allowlist=["/api/v1/query", "/api/v1/query_range"]

Contributions

Submitted a proposal for change in #4445

@agrahamlincoln agrahamlincoln added the type/enhancement New feature or request label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant