projectcontour / contour

Contour is a Kubernetes ingress controller using Envoy proxy.
https://projectcontour.io
Apache License 2.0
3.71k stars 672 forks source link

Enable admin route for `stats/prometheus` #6503

Closed clayton-gonsalves closed 3 months ago

clayton-gonsalves commented 3 months ago

As part of the changes made in https://github.com/projectcontour/contour/pull/6447 the admin endpoint was tightened to only allow GET requests with path matches as exact. This change blocked the stats/prometheus endpoint which is used by prometheus to scrape metrics.

Note: If not fixed, this will lead to loss of all prometheus based metrics.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.64%. Comparing base (7b08831) to head (64c8646).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/projectcontour/contour/pull/6503/graphs/tree.svg?width=650&height=150&src=pr&token=c9idKRXPc0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=projectcontour)](https://app.codecov.io/gh/projectcontour/contour/pull/6503?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=projectcontour) ```diff @@ Coverage Diff @@ ## main #6503 +/- ## ======================================= Coverage 81.63% 81.64% ======================================= Files 133 133 Lines 15869 15873 +4 ======================================= + Hits 12955 12959 +4 Misses 2620 2620 Partials 294 294 ``` | [Files](https://app.codecov.io/gh/projectcontour/contour/pull/6503?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=projectcontour) | Coverage Δ | | |---|---|---| | [internal/envoy/v3/stats.go](https://app.codecov.io/gh/projectcontour/contour/pull/6503?src=pr&el=tree&filepath=internal%2Fenvoy%2Fv3%2Fstats.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=projectcontour#diff-aW50ZXJuYWwvZW52b3kvdjMvc3RhdHMuZ28=) | `100.00% <100.00%> (ø)` | |
tsaarni commented 3 months ago

Thank you @clayton-gonsalves!