diff --git a/jsonnet/kube-prometheus/components/prometheus.libsonnet b/jsonnet/kube-prometheus/components/prometheus.libsonnet
index cf048c09362b851261785e92a026d778209d294e..aef2a851f4ae00c55229dd88adc952beb1853d53 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,
     },
   },