Skip to content

Commit

Permalink
Merge pull request #346 from linkernetworks/phstsai/pod-prefix
Browse files Browse the repository at this point in the history
[Bug] Find pod by prefix
  • Loading branch information
John-Lin authored Oct 9, 2018
2 parents 4add376 + 42b7e73 commit a4c26ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prometheuscontroller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ func GetController(sp *serviceprovider.Container, id string) (entity.ControllerM
// pods
expression = Expression{}
expression.Metrics = []string{"kube_pod_info"}
expression.QueryLabels = map[string]string{"created_by_kind": "ReplicaSet", "created_by_name": id + ".*"}
expression.QueryLabels = map[string]string{"created_by_kind": "ReplicaSet", "created_by_name": id + "-[^-]+"}

str = basicExpr(expression.Metrics)
str = queryExpr(str, expression.QueryLabels)
Expand Down

0 comments on commit a4c26ca

Please sign in to comment.