Render only it makes sense

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
This commit is contained in:
Kemal Akkoyun 2021-03-04 18:46:11 +01:00
parent 3c6e1019c3
commit 86c32cf94f
7 changed files with 17 additions and 29 deletions

View File

@ -158,8 +158,8 @@ local rcvs = t.receiveHashrings(commonConfig {
tenants: [],
},
],
replicas: 1,
replicationFactor: 1,
replicas: 3,
replicationFactor: 2,
serviceMonitor: true,
hashringConfigMapName: 'hashring',
});
@ -197,13 +197,13 @@ local finalQ = t.query(q.config {
],
});
{ ['thanos-bucket-' + name]: b[name] for name in std.objectFields(b) } +
{ ['thanos-compact-' + name]: c[name] for name in std.objectFields(c) } +
{ ['thanos-receive-' + name]: re[name] for name in std.objectFields(re) } +
{ ['thanos-rule-' + name]: finalRu[name] for name in std.objectFields(finalRu) } +
{ ['thanos-store-' + name]: s[name] for name in std.objectFields(s) } +
{ ['thanos-query-' + name]: finalQ[name] for name in std.objectFields(finalQ) } +
{ ['thanos-query-frontend-' + name]: qf[name] for name in std.objectFields(qf) } +
{ ['thanos-bucket-' + name]: b[name] for name in std.objectFields(b) if b[name] != null} +
{ ['thanos-compact-' + name]: c[name] for name in std.objectFields(c) if c[name] != null} +
{ ['thanos-receive-' + name]: re[name] for name in std.objectFields(re) if re[name] != null} +
{ ['thanos-rule-' + name]: finalRu[name] for name in std.objectFields(finalRu) if finalRu[name] != null} +
{ ['thanos-store-' + name]: s[name] for name in std.objectFields(s) if s[name] != null} +
{ ['thanos-query-' + name]: finalQ[name] for name in std.objectFields(finalQ) if finalQ[name] != null} +
{ ['thanos-query-frontend-' + name]: qf[name] for name in std.objectFields(qf) if qf[name] != null} +
{
['thanos-receive-' + hashring + '-' + name]: rcvs.hashrings[hashring][name]
for hashring in std.objectFields(rcvs.hashrings)

View File

@ -4,7 +4,7 @@ metadata:
name: thanos-receive-default
namespace: thanos
spec:
maxUnavailable: 0
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/component: database-write-hashring

View File

@ -11,7 +11,7 @@ metadata:
name: thanos-receive-default
namespace: thanos
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app.kubernetes.io/component: database-write-hashring
@ -69,7 +69,7 @@ spec:
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:10902
- --remote-write.address=0.0.0.0:19291
- --receive.replication-factor=1
- --receive.replication-factor=2
- --objstore.config=$(OBJSTORE_CONFIG)
- --tsdb.path=/var/thanos/receive
- --tsdb.retention=15d

View File

@ -1,12 +0,0 @@
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: thanos-receive
namespace: thanos
spec:
maxUnavailable: 0
selector:
matchLabels:
app.kubernetes.io/component: database-write-hashring
app.kubernetes.io/instance: thanos-receive
app.kubernetes.io/name: thanos-receive

View File

@ -4,7 +4,7 @@ metadata:
name: thanos-receive-region-1
namespace: thanos
spec:
maxUnavailable: 0
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/component: database-write-hashring

View File

@ -11,7 +11,7 @@ metadata:
name: thanos-receive-region-1
namespace: thanos
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app.kubernetes.io/component: database-write-hashring
@ -69,7 +69,7 @@ spec:
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:10902
- --remote-write.address=0.0.0.0:19291
- --receive.replication-factor=1
- --receive.replication-factor=2
- --objstore.config=$(OBJSTORE_CONFIG)
- --tsdb.path=/var/thanos/receive
- --tsdb.retention=15d

View File

@ -210,7 +210,7 @@ function(params) {
},
},
podDisruptionBudget: {
podDisruptionBudget: if tr.config.podDisruptionBudgetMaxUnavailable >= 1 then {
apiVersion: 'policy/v1beta1',
kind: 'PodDisruptionBudget',
metadata: {
@ -221,5 +221,5 @@ function(params) {
maxUnavailable: tr.config.podDisruptionBudgetMaxUnavailable,
selector: { matchLabels: tr.config.podLabelSelector },
},
},
} else null,
}