From 62b2347277ff1c379d0a29c3cd457d099a54c753 Mon Sep 17 00:00:00 2001
From: Vladislav Polyakov <39828645+polRk@users.noreply.github.com>
Date: Thu, 14 Apr 2022 15:01:55 +0300
Subject: [PATCH] Access requests to sidecar from thanos-query

---
 .../kube-prometheus/components/prometheus.libsonnet  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/jsonnet/kube-prometheus/components/prometheus.libsonnet b/jsonnet/kube-prometheus/components/prometheus.libsonnet
index 7306849f..15d16c28 100644
--- a/jsonnet/kube-prometheus/components/prometheus.libsonnet
+++ b/jsonnet/kube-prometheus/components/prometheus.libsonnet
@@ -128,6 +128,18 @@ function(params) {
           port: 9090,
           protocol: 'TCP',
         }],
+      }, {
+        from: [{
+          podSelector: {
+            matchLabels: {
+              'app.kubernetes.io/name': 'thanos-query',
+            },
+          },
+        }],
+        ports: [{
+          port: 10901,
+          protocol: 'TCP',
+        }],
       }],
     },
   },
-- 
GitLab