Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query, rule: make endpoint discovery dynamically reloadable #7890

Merged

Conversation

MichaHoffmann
Copy link
Contributor

@MichaHoffmann MichaHoffmann commented Nov 7, 2024

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  • Removed previously deprecated and hidden flags to configure endpoints ( --rule, --target, ...)
  • Deprecated --store.sd-file and --store.sd-interval flags
  • Added new flags --endpoint.sd-config, --endpoint-sd-config-reload-interval to configure a dynamic SD file
  • moved endpoint set construction into cmd/thanos/endpointset.go for a little cleanup

The new config makes it possible to also set "strict" and "group" flags on the endpoint instead of only their addresses, making it possible to have file based service discovery for endpoint groups too.

Verification

Existing E2E test suite, some manual testing.

@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch 3 times, most recently from 7b8c118 to 249620c Compare November 7, 2024 13:52
Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it generally makes a lot of sense to me.

Just one small comment!

cmd/thanos/query.go Show resolved Hide resolved
cmd/thanos/endpointset.go Outdated Show resolved Hide resolved
cmd/thanos/endpointset.go Outdated Show resolved Hide resolved
cmd/thanos/endpointset.go Outdated Show resolved Hide resolved
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch 8 times, most recently from e57969b to 963126d Compare November 8, 2024 15:55
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch 5 times, most recently from d5cfc49 to e9f1ff4 Compare November 8, 2024 17:44
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch 5 times, most recently from 12a9008 to 529954c Compare November 10, 2024 13:36
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch from 3284e0d to a45ffad Compare November 15, 2024 11:31
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch from a45ffad to c7dd843 Compare November 15, 2024 11:53
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch 5 times, most recently from 46475aa to a14056f Compare December 16, 2024 06:17
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch 2 times, most recently from 38dc0ac to ee6f13b Compare December 19, 2024 12:35
GiedriusS
GiedriusS previously approved these changes Jan 7, 2025
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor nits but otherwise LGTM

cmd/thanos/endpointset.go Outdated Show resolved Hide resolved
cmd/thanos/endpointset.go Outdated Show resolved Hide resolved
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch from ee6f13b to bfd9ae6 Compare January 15, 2025 05:42
* Removed previously deprecated and hidden flags to configure endpoints ( --rule, --target, ...)
* Added new flags --endpoint.sd-config, --endpoint-sd-config-reload-interval to configure a dynamic SD file
* Moved endpoint set construction into cmd/thanos/endpointset.go for a little cleanup
* Renamed "thanos_(querier/ruler)_duplicated_store_addresses_total" to
  "thanos_(querier/ruler)_duplicated_endpoint_addresses_total"

The new config makes it possible to also set "strict" and "group" flags on the endpoint instead
of only their addresses, making it possible to have file based service discovery for endpoint groups too.

Signed-off-by: Michael Hoffmann <[email protected]>
Signed-off-by: Michael Hoffmann <[email protected]>
@MichaHoffmann MichaHoffmann force-pushed the mhoffmann/make-endpoint-config-dynamically-reloadable branch from bfd9ae6 to 2455ab1 Compare January 15, 2025 05:45
@GiedriusS GiedriusS merged commit 2367777 into main Jan 15, 2025
21 of 22 checks passed
@GiedriusS GiedriusS deleted the mhoffmann/make-endpoint-config-dynamically-reloadable branch January 15, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants