Skip to content

Commit 216275a

Browse files
committed
remove replicaLabel assertion from kube-thanos-receive, updates examples & docs
Signed-off-by: Michael Burt <[email protected]>
1 parent a3f005e commit 216275a

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,17 @@ local commonConfig = {
9999
};
100100
101101
local i = t.receiveIngestor(commonConfig.config {
102+
labels: [
103+
'receive_replica="$(POD_NAME)"',
104+
],
102105
replicas: 1,
103-
replicaLabels: ['receive_replica'],
104106
replicationFactor: 1,
105107
// Disable shipping to object storage for the purposes of this example
106108
objectStorageConfig: null,
107109
});
108110
109111
local r = t.receiveRouter(commonConfig.config {
110112
replicas: 1,
111-
replicaLabels: ['receive_replica'],
112113
replicationFactor: 1,
113114
// Disable shipping to object storage for the purposes of this example
114115
objectStorageConfig: null,
@@ -122,7 +123,7 @@ local s = t.store(commonConfig.config {
122123
123124
local q = t.query(commonConfig.config {
124125
replicas: 1,
125-
replicaLabels: ['prometheus_replica', 'rule_replica'],
126+
replicaLabels: ['prometheus_replica', 'receive_replica', 'rule_replica'],
126127
serviceMonitor: true,
127128
stores: [s.storeEndpoint] + i.storeEndpoints,
128129
});

all.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local commonConfig = {
88
namespace: 'thanos',
99
version: 'v0.26.0',
1010
image: 'quay.io/thanos/thanos:' + cfg.version,
11-
replicaLabels: ['prometheus_replica', 'rule_replica'],
11+
replicaLabels: ['prometheus_replica', 'receive_replica', 'rule_replica'],
1212
objectStorageConfig: {
1313
name: 'thanos-objectstorage',
1414
key: 'thanos.yaml',

example.jsonnet

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ local commonConfig = {
2828
};
2929

3030
local i = t.receiveIngestor(commonConfig.config {
31+
labels: [
32+
'receive_replica="$(POD_NAME)"',
33+
],
3134
replicas: 1,
32-
replicaLabels: ['receive_replica'],
3335
replicationFactor: 1,
3436
// Disable shipping to object storage for the purposes of this example
3537
objectStorageConfig: null,
3638
});
3739

3840
local r = t.receiveRouter(commonConfig.config {
3941
replicas: 1,
40-
replicaLabels: ['receive_replica'],
4142
replicationFactor: 1,
4243
// Disable shipping to object storage for the purposes of this example
4344
objectStorageConfig: null,
@@ -51,7 +52,7 @@ local s = t.store(commonConfig.config {
5152

5253
local q = t.query(commonConfig.config {
5354
replicas: 1,
54-
replicaLabels: ['prometheus_replica', 'rule_replica'],
55+
replicaLabels: ['prometheus_replica', 'receive_replica', 'rule_replica'],
5556
serviceMonitor: true,
5657
stores: [s.storeEndpoint] + i.storeEndpoints,
5758
});

jsonnet/kube-thanos/kube-thanos-receive.libsonnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function(params) {
77
config:: defaults + params,
88
// Safety checks for combined config of defaults and params
99
assert std.isNumber(tr.config.replicas) && tr.config.replicas >= 0 : 'thanos receive replicas has to be number >= 0',
10-
assert std.isArray(tr.config.replicaLabels),
1110
assert std.isObject(tr.config.resources),
1211
assert std.isBoolean(tr.config.serviceMonitor),
1312
assert std.isObject(tr.config.volumeClaimTemplate),

0 commit comments

Comments
 (0)