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

Ability to watch for events in all data centers #20871

Open
jakubgs opened this issue Mar 18, 2024 · 0 comments · May be fixed by #20908
Open

Ability to watch for events in all data centers #20871

jakubgs opened this issue Mar 18, 2024 · 0 comments · May be fixed by #20908

Comments

@jakubgs
Copy link
Contributor

jakubgs commented Mar 18, 2024

Feature Description

Currently the Watch API and command both default to listening for events or service changes in one data center:

datacenter - Can be provided to override the agent's default datacenter.

https://developer.hashicorp.com/consul/docs/dynamic-app-config/watches#global-parameters

A workaround for this is to define multiple watchers, one for each data center. But that is not a great workaround because:

  • When number of data center changes the config needs to be changed to account for that.
  • Multiple watchers can trigger the same handler in essentially the same moment for two different DCs causing race conditions.

All of this would be much simpler if -datacenter=all was supported.

Use Case(s)

In our case this doesn't work since we want to be able to detect events across all data centers. This useful for triggering configuration of WireGuard VPN, which exists on all hosts across all data centers, and needs to be updated every time a new host shows up, or leaves the network. With the current setup it would require extra automation to either continuously update the list of watchers, or use the API and dynamically query all data centers.

@vijayraghav-io vijayraghav-io linked a pull request Mar 27, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant