Commit 0b798906 authored by Piotr Szczesniak's avatar Piotr Szczesniak

Espaced '/' character in query to InfluxDB

parent ddcb6051
...@@ -124,7 +124,8 @@ func (s *influxdbSource) GetUsagePercentile(kind api.ResourceName, perc int64, i ...@@ -124,7 +124,8 @@ func (s *influxdbSource) GetUsagePercentile(kind api.ResourceName, perc int64, i
if exactMatch { if exactMatch {
imgPattern = "='" + image + "'" imgPattern = "='" + image + "'"
} else { } else {
imgPattern = "=~/^" + image + "/" // Escape character "/" in image pattern.
imgPattern = "=~/^" + strings.Replace(image, "/", "\\/", -1) + "/"
} }
var namespaceCond string var namespaceCond string
if namespace != "" { if namespace != "" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment