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:
1 parent
56b1a48a46
commit
895db2a272
1 file changed
+4
-1
@@ -175,7 +175,10 @@ function(params) {
|
|||||||
] +
|
] +
|
||||||
(
|
(
|
||||||
if p._config.thanos != null then
|
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 []
|
else []
|
||||||
),
|
),
|
||||||
selector: p._config.selectorLabels,
|
selector: p._config.selectorLabels,
|
||||||
|
|||||||
Reference in new issue
Block a user