Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Allow edges queries to see cross-namespace edges (#54)
Browse files Browse the repository at this point in the history
* Allow edges queries to see cross-namespace edges

Signed-off-by: Alex Leong <[email protected]>

* gofmt

Signed-off-by: Alex Leong <[email protected]>
  • Loading branch information
adleong authored Mar 11, 2020
1 parent 6dba3c6 commit 1e08ed0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions chart/linkerd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ linkerd:
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{.namespace}}",
namespace=~"{{default ".+" .namespace}}",
dst_namespace=~"{{default ".+" .toNamespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
Expand All @@ -107,7 +108,8 @@ linkerd:
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{.namespace}}",
namespace=~"{{default ".+" .namespace}}",
dst_namespace=~"{{default ".+" .toNamespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
Expand All @@ -126,7 +128,8 @@ linkerd:
sum(
irate(
response_latency_ms_bucket{
namespace=~"{{.namespace}}",
namespace=~"{{default ".+" .namespace}}",
dst_namespace=~"{{default ".+" .toNamespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
Expand All @@ -144,7 +147,8 @@ linkerd:
increase(
response_total{
classification="success",
namespace=~"{{.namespace}}",
namespace=~"{{default ".+" .namespace}}",
dst_namespace=~"{{default ".+" .toNamespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
Expand All @@ -160,7 +164,8 @@ linkerd:
increase(
response_total{
classification="failure",
namespace=~"{{.namespace}}",
namespace=~"{{default ".+" .namespace}}",
dst_namespace=~"{{default ".+" .toNamespace}}",
{{lower .kind}}=~"{{default ".+" .fromName}}",
dst_{{lower .kind}}=~"{{default ".+" .toName}}"
}[{{.window}}]
Expand Down
6 changes: 3 additions & 3 deletions pkg/prometheus/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func (e *EdgeLookup) Queries() []*Query {
Name: name,
Template: tmpl,
Values: map[string]interface{}{
"kind": e.Item.Resource.Kind,
"namespace": e.Item.Resource.Namespace,
"toName": e.Item.Resource.Name,
"kind": e.Item.Resource.Kind,
"toNamespace": e.Item.Resource.Namespace,
"toName": e.Item.Resource.Name,
},
})
}
Expand Down

0 comments on commit 1e08ed0

Please sign in to comment.