Skip to content

Commit

Permalink
remove replicaLabel assertion from kube-thanos-receive, updates examp…
Browse files Browse the repository at this point in the history
…les & docs

Signed-off-by: Michael Burt <[email protected]>
  • Loading branch information
michael-burt committed Jul 19, 2022
1 parent a3f005e commit 216275a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,17 @@ 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,
});
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,
Expand All @@ -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,
});
Expand Down
2 changes: 1 addition & 1 deletion all.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 4 additions & 3 deletions example.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ 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,
});

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,
Expand All @@ -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,
});
Expand Down
1 change: 0 additions & 1 deletion jsonnet/kube-thanos/kube-thanos-receive.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 216275a

Please sign in to comment.