Explorar el Código

Merge pull request #2308 from porter-dev/belanger/add-daemonset-metrics

Add metrics for pods in a Daemonset
abelanger5 hace 3 años
padre
commit
b095035b36
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      internal/kubernetes/prometheus/metrics.go

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

@@ -301,7 +301,7 @@ func getSelectionRegex(kind, name string) (string, error) {
 
 	switch strings.ToLower(kind) {
 	case "deployment":
-		suffix = "[a-z0-9]+-[a-z0-9]+"
+		suffix = "[a-z0-9]+"
 	case "statefulset":
 		suffix = "[0-9]+"
 	case "job":
@@ -310,6 +310,8 @@ func getSelectionRegex(kind, name string) (string, error) {
 		suffix = "[a-z0-9]+-[a-z0-9]+"
 	case "ingress":
 		return name, nil
+	case "daemonset":
+		suffix = "[a-z0-9]+"
 	default:
 		return "", fmt.Errorf("not a supported controller to query for metrics")
 	}