@@ -34,7 +34,7 @@ local defaults = {
3434 runbookURLPattern: 'https://runbooks.prometheus-operator.dev/runbooks/prometheus/%s' ,
3535 },
3636 },
37- thanos: {} ,
37+ thanos: null ,
3838};
3939
4040
@@ -100,7 +100,7 @@ function(params) {
100100 { name: 'web' , targetPort: 'web' , port: 9090 },
101101 ] +
102102 (
103- if p._config.thanos != {} then
103+ if p._config.thanos != null then
104104 [{ name: 'grpc' , port: 10901 , targetPort: 10901 }]
105105 else []
106106 ),
@@ -325,7 +325,7 @@ function(params) {
325325 },
326326
327327 // Include thanos sidecar PrometheusRule only if thanos config was passed by user
328- [if std.objectHas (params, 'thanos' ) && std.length ( params.thanos) > 0 then 'prometheusRuleThanosSidecar' ]: {
328+ [if std.objectHas (params, 'thanos' ) && params.thanos != null then 'prometheusRuleThanosSidecar' ]: {
329329 apiVersion: 'monitoring.coreos.com/v1' ,
330330 kind: 'PrometheusRule' ,
331331 metadata: {
@@ -341,7 +341,7 @@ function(params) {
341341 },
342342
343343 // Include thanos sidecar Service only if thanos config was passed by user
344- [if std.objectHas (params, 'thanos' ) && std.length ( params.thanos) > 0 then 'serviceThanosSidecar' ]: {
344+ [if std.objectHas (params, 'thanos' ) && params.thanos != null then 'serviceThanosSidecar' ]: {
345345 apiVersion: 'v1' ,
346346 kind: 'Service' ,
347347 metadata+: {
@@ -366,7 +366,7 @@ function(params) {
366366 },
367367
368368 // Include thanos sidecar ServiceMonitor only if thanos config was passed by user
369- [if std.objectHas (params, 'thanos' ) && std.length ( params.thanos) > 0 then 'serviceMonitorThanosSidecar' ]: {
369+ [if std.objectHas (params, 'thanos' ) && params.thanos != null then 'serviceMonitorThanosSidecar' ]: {
370370 apiVersion: 'monitoring.coreos.com/v1' ,
371371 kind: 'ServiceMonitor' ,
372372 metadata+: {
0 commit comments