Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Release 129.0.1 (in development)

### Enhancements

- Allow Thanos Querier to discover sidecars for more Prometheus instances through a ConfigMap
(PR[#4546](https://github.com/scality/metalk8s/pull/4546))

## Release 129.0.0

### Removals
Expand Down
1 change: 1 addition & 0 deletions buildchain/buildchain/salt_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ def task(self) -> types.TaskDict:
),
Path("salt/metalk8s/addons/prometheus-operator/deployed/service-configuration.sls"),
Path("salt/metalk8s/addons/prometheus-operator/deployed/thanos-chart.sls"),
Path("salt/metalk8s/addons/prometheus-operator/deployed/thanos-query-sd-files.sls"),
Path("salt/metalk8s/addons/ui/deployed/dependencies.sls"),
Path("salt/metalk8s/addons/ui/deployed/ingress.sls"),
Path("salt/metalk8s/addons/ui/deployed/init.sls"),
Expand Down
5 changes: 4 additions & 1 deletion charts/thanos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ query:

storeDNSDiscovery: false
sidecarDNSDiscovery: false

stores:
# Service deployed by Prometheus operator to expose Thanos sidecars
- dnssrv+_grpc._tcp.prometheus-operator-thanos-discovery

serviceDiscoveryFileConfigMaps:
- thanos-query-sd-files

tolerations:
- key: 'node-role.kubernetes.io/bootstrap'
operator: 'Exists'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ include:
- .chart
- .node-alerts-rules
- .kube-alerts-rules
- .thanos-query-sd-files
- .thanos-chart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ spec:
- --query.auto-downsampling
- --store.sd-dns-resolver=miekgdns
- --store=dnssrv+_grpc._tcp.prometheus-operator-thanos-discovery
- --store.sd-files=/etc/query/thanos-query-sd-files/*.yaml
- --store.sd-files=/etc/query/thanos-query-sd-files/*.yml
- --store.sd-files=/etc/query/thanos-query-sd-files/*.json
- --store.sd-interval=5m
image: {% endraw -%}{{ build_image_name("thanos", False) }}{%- raw %}:v0.36.1
imagePullPolicy: IfNotPresent
Expand All @@ -117,7 +120,9 @@ spec:
path: /-/ready
port: http
resources: {}
volumeMounts: null
volumeMounts:
- mountPath: /etc/query/thanos-query-sd-files
name: thanos-query-sd-files
nodeSelector:
node-role.kubernetes.io/infra: ''
tolerations:
Expand All @@ -127,6 +132,10 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/infra
operator: Exists
volumes: null
volumes:
- configMap:
defaultMode: 420
name: thanos-query-sd-files
name: thanos-query-sd-files

{% endraw %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!jinja | metalk8s_kubernetes

{% raw %}

apiVersion: v1
kind: ConfigMap
metadata:
name: thanos-query-sd-files
namespace: metalk8s-monitoring
labels:
app.kubernetes.io/component: query
app.kubernetes.io/instance: thanos

{% endraw %}
Loading