From 7815fc5169bde209d3835265419fdaa1070b168e Mon Sep 17 00:00:00 2001 From: Hitanshu Mehta Date: Tue, 16 Nov 2021 21:25:01 +0530 Subject: [PATCH] Add CHANGELOG entry and fix nit Signed-off-by: Hitanshu Mehta --- CHANGELOG.md | 1 + cmd/thanos/query.go | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b877fb02..a45cc6df00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#4612](https://github.com/thanos-io/thanos/pull/4612) Sidecar: add `--prometheus.http-client` and `--prometheus.http-client-file` flag for sidecar to connect Prometheus with basic auth or TLS. - [#4847](https://github.com/thanos-io/thanos/pull/4847) Query: add `--alert.query-url` which is used in the user interface for rules/alerts pages. By default the HTTP listen address is used for this URL. - [#4856](https://github.com/thanos-io/thanos/pull/4856) Mixin: Add Query Frontend Grafana dashboard. +- [#4874](https://github.com/thanos-io/thanos/pull/4874) Query: Add `--endpoint-strict` flag to statically configure Thanos API server endpoints. It is similar to `--store-strict` but supports passing any Thanos gRPC APIs: StoreAPI, MetadataAPI, RulesAPI, TargetsAPI and ExemplarsAPI. ### Fixed diff --git a/cmd/thanos/query.go b/cmd/thanos/query.go index 22cfa83aa9..a12382c3df 100644 --- a/cmd/thanos/query.go +++ b/cmd/thanos/query.go @@ -397,18 +397,18 @@ func runQuery( } } - dnsEndpointProvider := dns.NewProvider( - logger, - extprom.WrapRegistererWithPrefix("thanos_query_endpoints_", reg), - dns.ResolverType(dnsSDResolver), - ) - for _, endpoint := range strictEndpoints { if dns.IsDynamicNode(endpoint) { return errors.Errorf("%s is a dynamically specified endpoint i.e. it uses SD and that is not permitted under strict mode. Use --endpoint for this", endpoint) } } + dnsEndpointProvider := dns.NewProvider( + logger, + extprom.WrapRegistererWithPrefix("thanos_query_endpoints_", reg), + dns.ResolverType(dnsSDResolver), + ) + dnsRuleProvider := dns.NewProvider( logger, extprom.WrapRegistererWithPrefix("thanos_query_rule_apis_", reg),