Skip to content

Dynamic Discovery Matchers for Servers#34221

Merged
marcoandredinis merged 1 commit intomasterfrom
marco/discovery_config_checkandset_fix
Nov 21, 2023
Merged

Dynamic Discovery Matchers for Servers#34221
marcoandredinis merged 1 commit intomasterfrom
marco/discovery_config_checkandset_fix

Conversation

@marcoandredinis
Copy link
Copy Markdown
Contributor

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 Server matchers.
Database matchers is already implemented (in #33472)
Follow up PRs will include other resource types.

It always starts the 3 Server 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 force-pushed the marco/discovery_config_checkandset_fix branch 2 times, most recently from 933d8d5 to 28e5699 Compare November 6, 2023 09:43
@marcoandredinis marcoandredinis marked this pull request as ready for review November 6, 2023 10:22
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 6, 2023

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@marcoandredinis marcoandredinis added backport/branch/v14 no-changelog Indicates that a PR does not require a changelog entry labels Nov 6, 2023
@marcoandredinis marcoandredinis removed the request for review from camscale November 8, 2023 08:29
@github-actions github-actions Bot requested a review from mdwn November 8, 2023 08:30
@marcoandredinis
Copy link
Copy Markdown
Contributor Author

@strideynet @mdwn Can you please take a look when you get a chance?

@marcoandredinis marcoandredinis force-pushed the marco/discovery_config_checkandset_fix branch from 28e5699 to abcd267 Compare November 15, 2023 16:35
@marcoandredinis marcoandredinis force-pushed the marco/discovery_config_checkandset_fix branch from abcd267 to 4042c0b Compare November 16, 2023 12:00
@marcoandredinis marcoandredinis added this pull request to the merge queue Nov 21, 2023
Merged via the queue into master with commit 95bb8cf Nov 21, 2023
@marcoandredinis marcoandredinis deleted the marco/discovery_config_checkandset_fix branch November 21, 2023 09:33
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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

discovery no-changelog Indicates that a PR does not require a changelog entry size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants