jsonnet/components/prometheus: Fix thanos-sidecar metrics access (#2330)
When enabled, the thanos-sidecar opens an HTTP listener on port 10902, which what's used to scrape metrics. This port wasn't being added to the Prometheus Service, so wasn't added to the NetworkPolicy causing scraping to fail from Prometheus instances other than the local one. This adds the port to the Service and NetworkPolicy. Fixes: #2006
This commit is contained in:
@@ -175,7 +175,10 @@ function(params) {
|
||||
] +
|
||||
(
|
||||
if p._config.thanos != null then
|
||||
[{ name: 'grpc', port: 10901, targetPort: 10901 }]
|
||||
[
|
||||
{ name: 'grpc', port: 10901, targetPort: 10901 },
|
||||
{ name: 'http', port: 10902, targetPort: 10902 },
|
||||
]
|
||||
else []
|
||||
),
|
||||
selector: p._config.selectorLabels,
|
||||
|
||||
Reference in New Issue
Block a user