mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -08:00
3f29324e04
This change corrects a bug introduced by PR https://github.com/prometheus/prometheus/pull/2427 The regex uses three groups: the hostname, an optional port, and the prefered port from a kubernetes annotation. Previously, the second group should have been ignored if a :port was not present in the input. However, making the port group optional with the "?" had the unintended side-effect of allowing the hostname regex "(.+)" to match greedily, which included the ":port" patterns up to the ";" separating the hostname from the kubernetes port annotation. This change updates the regex for the hostname to match any non-":" characters. This forces the regex to stop if a ":port" is present and allow the second group to match the optional port. |
||
---|---|---|
.. | ||
examples | ||
images |