diff --git a/README.md b/README.md index 6d42e8e..63e26f2 100644 --- a/README.md +++ b/README.md @@ -99,8 +99,10 @@ local commonConfig = { }; local i = t.receiveIngestor(commonConfig.config { + labels: [ + 'receive_replica="$(POD_NAME)"', + ], replicas: 1, - replicaLabels: ['receive_replica'], replicationFactor: 1, // Disable shipping to object storage for the purposes of this example objectStorageConfig: null, @@ -108,7 +110,6 @@ local i = t.receiveIngestor(commonConfig.config { local r = t.receiveRouter(commonConfig.config { replicas: 1, - replicaLabels: ['receive_replica'], replicationFactor: 1, // Disable shipping to object storage for the purposes of this example objectStorageConfig: null, @@ -122,7 +123,7 @@ local s = t.store(commonConfig.config { local q = t.query(commonConfig.config { replicas: 1, - replicaLabels: ['prometheus_replica', 'rule_replica'], + replicaLabels: ['prometheus_replica', 'receive_replica', 'rule_replica'], serviceMonitor: true, stores: [s.storeEndpoint] + i.storeEndpoints, }); diff --git a/all.jsonnet b/all.jsonnet index a3cfd23..ceeebae 100644 --- a/all.jsonnet +++ b/all.jsonnet @@ -8,7 +8,7 @@ local commonConfig = { namespace: 'thanos', version: 'v0.26.0', image: 'quay.io/thanos/thanos:' + cfg.version, - replicaLabels: ['prometheus_replica', 'rule_replica'], + replicaLabels: ['prometheus_replica', 'receive_replica', 'rule_replica'], objectStorageConfig: { name: 'thanos-objectstorage', key: 'thanos.yaml', diff --git a/example.jsonnet b/example.jsonnet index 95dcebd..a40eba6 100644 --- a/example.jsonnet +++ b/example.jsonnet @@ -28,8 +28,10 @@ local commonConfig = { }; local i = t.receiveIngestor(commonConfig.config { + labels: [ + 'receive_replica="$(POD_NAME)"', + ], replicas: 1, - replicaLabels: ['receive_replica'], replicationFactor: 1, // Disable shipping to object storage for the purposes of this example objectStorageConfig: null, @@ -37,7 +39,6 @@ local i = t.receiveIngestor(commonConfig.config { local r = t.receiveRouter(commonConfig.config { replicas: 1, - replicaLabels: ['receive_replica'], replicationFactor: 1, // Disable shipping to object storage for the purposes of this example objectStorageConfig: null, @@ -51,7 +52,7 @@ local s = t.store(commonConfig.config { local q = t.query(commonConfig.config { replicas: 1, - replicaLabels: ['prometheus_replica', 'rule_replica'], + replicaLabels: ['prometheus_replica', 'receive_replica', 'rule_replica'], serviceMonitor: true, stores: [s.storeEndpoint] + i.storeEndpoints, }); diff --git a/jsonnet/kube-thanos/kube-thanos-receive.libsonnet b/jsonnet/kube-thanos/kube-thanos-receive.libsonnet index 2fc88ba..0c507a9 100644 --- a/jsonnet/kube-thanos/kube-thanos-receive.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-receive.libsonnet @@ -7,7 +7,6 @@ function(params) { config:: defaults + params, // Safety checks for combined config of defaults and params assert std.isNumber(tr.config.replicas) && tr.config.replicas >= 0 : 'thanos receive replicas has to be number >= 0', - assert std.isArray(tr.config.replicaLabels), assert std.isObject(tr.config.resources), assert std.isBoolean(tr.config.serviceMonitor), assert std.isObject(tr.config.volumeClaimTemplate),