Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Remove replicaLabel assertion from kube-thanos-receive & Update Docs #281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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