Fix thanos sidecar selector

Previous PR[1] which deprecated `thanosSelector` accidentally broke the
usage of it. This commit restores the old behaviour along with newly
introduced `thanos` config variable.

[1] https://github.com/prometheus-operator/kube-prometheus/pull/1543

Co-authored-by: Pawe? Krupa <pawel@krupa.net.pl>
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
This commit is contained in:
Arunprasad Rajkumar 2021-12-17 18:52:04 +05:30
parent 529739d5ef
commit b7a135a101
No known key found for this signature in database
GPG Key ID: 7DB93046D4687C2C

View File

@ -35,13 +35,13 @@ local defaults = {
prometheusSelector: 'job="prometheus-' + defaults.name + '",namespace="' + defaults.namespace + '"',
prometheusName: '{{$labels.namespace}}/{{$labels.pod}}',
// TODO: remove `thanosSelector` after 0.10.0 release.
thanosSelector: '',
thanosSelector: 'job="thanos-sidecar"',
thanos: {
targetGroups: {
namespace: defaults.namespace,
},
sidecar: {
selector: 'job="thanos-sidecar"',
selector: defaults.mixin._config.thanosSelector,
thanosPrometheusCommonDimensions: 'namespace, pod',
},
},