You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build manifests using the JSONnet file below. I have added two labels to the ruler, "cluster_name" and "rule_replica", but in the compiled manifests, only one label is being added. Can someone help me add an additional label to thanos-rule?
local t = import 'kube-thanos/thanos.libsonnet';
// For an example with every option and component, please check all.jsonnet
I am trying to build manifests using the JSONnet file below. I have added two labels to the ruler, "cluster_name" and "rule_replica", but in the compiled manifests, only one label is being added. Can someone help me add an additional label to thanos-rule?
local t = import 'kube-thanos/thanos.libsonnet';
// For an example with every option and component, please check all.jsonnet
local commonConfig = {
local cfg = self,
logFormat: 'json',
namespace: 'monitoring',
version: 'v0.29.0',
image: 'myregistry.azurecr.io/thanos/thanos:' + cfg.version + '@sha256:abcd',
replicaLabels: ['prometheus_replica', 'rule_replica'],
objectStorageConfig: {
name: 'thanos-objectstorage',
key: 'thanos.yaml',
},
};
local ru = t.rule(commonConfig {
replicas: 1,
rulesConfig: [{ name: 'thanos-rule', key: 'thanos-rule.yaml' }],
replicaLabels: ['cluster_name', 'rule_replica'],
serviceMonitor: true,
volumeClaimTemplate: {
spec: {
accessModes: ['ReadWriteOnce'],
resources: {
requests: {
storage: '100Gi'
}
},
storageClassName: 'managed-csi-premium-zrs'
}
},
reloaderImage: 'myregistry.azurecr.io/configmapreloader/configmap-reload:v0.12.0'
});
local q = t.query(commonConfig {
replicas: 1,
replicaLabels: ['prometheus_replica', 'rule_replica'],
serviceMonitor: true,
queryTimeout: '60s'
});
local finalRu = t.rule(ru.config {
queriers: ['dnssrv+_http._tcp.%s.%s.svc.cluster.local' % [q.service.metadata.name, q.service.metadata.namespace]],
});
{ ['thanos-ruler-' + name]: finalRu[name] for name in std.objectFields(finalRu) }
The text was updated successfully, but these errors were encountered: