When a location belongs to a Service key metrics

We want to be able to track the metrics for a particular service or
namespace, so that we can attribute the issues we see in aggregate in
server/upstream errors.
This commit is contained in:
Tom Booth 2017-08-22 18:27:02 +01:00
parent cb77efeb02
commit 0a658e4227

View file

@ -781,6 +781,11 @@ stream {
proxy_set_header Accept-Encoding "";
{{ end }}
{{ if (and $all.Cfg.EnableVtsStatus $location.Service) }}
vhost_traffic_status_filter_by_set_key {{ $location.Service.ObjectMeta.Namespace }} kubernetes::namespace;
vhost_traffic_status_filter_by_set_key {{ $location.Service.ObjectMeta.Namespace }}.{{ $location.Service.ObjectMeta.Name }} kubernetes::service;
{{ end }}
{{/* Add any additional configuration defined */}}
{{ $location.ConfigurationSnippet }}