mirror of
https://github.com/thanos-io/kube-thanos.git
synced 2026-05-07 04:56:13 +02:00
41 lines
951 B
Jsonnet
41 lines
951 B
Jsonnet
local t = import 'kube-thanos/thanos.libsonnet';
|
|
|
|
// For an example with every option and component, please check all.jsonnet
|
|
|
|
local commonConfig = {
|
|
config+:: {
|
|
local cfg = self,
|
|
namespace: 'thanos',
|
|
version: 'v0.19.0',
|
|
image: 'quay.io/thanos/thanos:' + cfg.version,
|
|
objectStorageConfig: {
|
|
name: 'thanos-objectstorage',
|
|
key: 'thanos.yaml',
|
|
},
|
|
volumeClaimTemplate: {
|
|
spec: {
|
|
accessModes: ['ReadWriteOnce'],
|
|
resources: {
|
|
requests: {
|
|
storage: '10Gi',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
local s = t.store(commonConfig.config {
|
|
replicas: 1,
|
|
serviceMonitor: true,
|
|
});
|
|
|
|
local q = t.query(commonConfig.config {
|
|
replicas: 1,
|
|
replicaLabels: ['prometheus_replica', 'rule_replica'],
|
|
serviceMonitor: true,
|
|
});
|
|
|
|
{ ['thanos-store-' + name]: s[name] for name in std.objectFields(s) } +
|
|
{ ['thanos-query-' + name]: q[name] for name in std.objectFields(q) }
|