Przeglądaj źródła

fix regex for deployment pods

Mohammed Nafees 3 lat temu
rodzic
commit
862a1aa5d4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      internal/kubernetes/prometheus/metrics.go

+ 1 - 1
internal/kubernetes/prometheus/metrics.go

@@ -301,7 +301,7 @@ func getSelectionRegex(kind, name string) (string, error) {
 
 
 	switch strings.ToLower(kind) {
 	switch strings.ToLower(kind) {
 	case "deployment":
 	case "deployment":
-		suffix = "[a-z0-9]+-[a-z0-9]+"
+		suffix = "[a-z0-9]+(-[a-z0-9]+)*"
 	case "statefulset":
 	case "statefulset":
 		suffix = "[0-9]+"
 		suffix = "[0-9]+"
 	case "job":
 	case "job":