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

Dynamic Discovery Matchers for Databases #33472

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

marcoandredinis
Copy link
Contributor

@marcoandredinis marcoandredinis commented Oct 13, 2023

Context #25494

The DiscoveryService monitors cloud/kube resources and merges them as Teleport resources.
It uses a static configuration that is present in the discovery_service section of the teleport.yaml used by the teleport process.

This PR adds a watcher to the discovery_service that will monitor changes in DiscoveryConfig resources.
Every time a new DiscoveryConfig is created/updated, the service will update its internal matchers to include those coming from the DiscoveryConfig.
When a DiscoveryConfig is deleted, the corresponding matchers are removed as well.

To reduce the scope, we are only focusing on the Database matchers.
Follow up PRs will include other resource types.

It always starts the Database Matcher, even if no static configuration exists.
When a new Poll (default is every 5 minutes) starts, it will iterate over all the fetchers:

  • static configuration (aka discovery_service from teleport.yaml)
  • list of dynamic fetchers (updated by the DiscoveryConfig watcher)

@marcoandredinis marcoandredinis added discover Issues related to Teleport Discover backport/branch/v14 labels Oct 13, 2023
@marcoandredinis marcoandredinis force-pushed the marco/discovery_dynamic_matchers branch 2 times, most recently from eb70f49 to 651c53b Compare October 13, 2023 18:27
@marcoandredinis marcoandredinis force-pushed the marco/discovery_dynamic_matchers branch 3 times, most recently from ceee9d3 to ca0fa50 Compare October 16, 2023 11:19
@marcoandredinis marcoandredinis marked this pull request as ready for review October 16, 2023 11:19
@github-actions github-actions bot added database-access Database access related issues and PRs discovery size/lg labels Oct 16, 2023
@marcoandredinis
Copy link
Contributor Author

@lxea @ryanclark Friendly ping 🙏

@marcoandredinis marcoandredinis added this pull request to the merge queue Oct 19, 2023
Merged via the queue into master with commit 7acf358 Oct 19, 2023
28 checks passed
@marcoandredinis marcoandredinis deleted the marco/discovery_dynamic_matchers branch October 19, 2023 13:34
@public-teleport-github-review-bot

@marcoandredinis See the table below for backport results.

Branch Result
branch/v14 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v14 database-access Database access related issues and PRs discover Issues related to Teleport Discover discovery size/lg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants