From 30d3d5950de550b9f246ef15c6fbce9e4ea3f996 Mon Sep 17 00:00:00 2001
From: paulfantom <pawel@krupa.net.pl>
Date: Wed, 10 Feb 2021 12:06:10 +0100
Subject: [PATCH] jsonnet: do not include thanos field when not needed

Signed-off-by: paulfantom <pawel@krupa.net.pl>
---
 jsonnet/kube-prometheus/components/prometheus.libsonnet | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jsonnet/kube-prometheus/components/prometheus.libsonnet b/jsonnet/kube-prometheus/components/prometheus.libsonnet
index cf048c09..aef2a851 100644
--- a/jsonnet/kube-prometheus/components/prometheus.libsonnet
+++ b/jsonnet/kube-prometheus/components/prometheus.libsonnet
@@ -274,7 +274,7 @@ function(params) {
         runAsNonRoot: true,
         fsGroup: 2000,
       },
-      thanos: p.config.thanos,
+      [if std.objectHas(params, 'thanos') then 'thanos']: p.config.thanos,
     },
   },
 
-- 
GitLab