mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-10-24 13:41:06 +02:00
Merge pull request #1325 from paulfantom/fix-1324
jsonnet: set thanos config to null by default
This commit is contained in:
commit
c1fa4971e6
@ -34,7 +34,7 @@ local defaults = {
|
||||
runbookURLPattern: 'https://runbooks.prometheus-operator.dev/runbooks/prometheus/%s',
|
||||
},
|
||||
},
|
||||
thanos: {},
|
||||
thanos: null,
|
||||
};
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ function(params) {
|
||||
{ name: 'web', targetPort: 'web', port: 9090 },
|
||||
] +
|
||||
(
|
||||
if p._config.thanos != {} then
|
||||
if p._config.thanos != null then
|
||||
[{ name: 'grpc', port: 10901, targetPort: 10901 }]
|
||||
else []
|
||||
),
|
||||
@ -325,7 +325,7 @@ function(params) {
|
||||
},
|
||||
|
||||
// Include thanos sidecar PrometheusRule only if thanos config was passed by user
|
||||
[if std.objectHas(params, 'thanos') && std.length(params.thanos) > 0 then 'prometheusRuleThanosSidecar']: {
|
||||
[if std.objectHas(params, 'thanos') && params.thanos != null then 'prometheusRuleThanosSidecar']: {
|
||||
apiVersion: 'monitoring.coreos.com/v1',
|
||||
kind: 'PrometheusRule',
|
||||
metadata: {
|
||||
@ -341,7 +341,7 @@ function(params) {
|
||||
},
|
||||
|
||||
// Include thanos sidecar Service only if thanos config was passed by user
|
||||
[if std.objectHas(params, 'thanos') && std.length(params.thanos) > 0 then 'serviceThanosSidecar']: {
|
||||
[if std.objectHas(params, 'thanos') && params.thanos != null then 'serviceThanosSidecar']: {
|
||||
apiVersion: 'v1',
|
||||
kind: 'Service',
|
||||
metadata+: {
|
||||
@ -366,7 +366,7 @@ function(params) {
|
||||
},
|
||||
|
||||
// Include thanos sidecar ServiceMonitor only if thanos config was passed by user
|
||||
[if std.objectHas(params, 'thanos') && std.length(params.thanos) > 0 then 'serviceMonitorThanosSidecar']: {
|
||||
[if std.objectHas(params, 'thanos') && params.thanos != null then 'serviceMonitorThanosSidecar']: {
|
||||
apiVersion: 'monitoring.coreos.com/v1',
|
||||
kind: 'ServiceMonitor',
|
||||
metadata+: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user