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

operator: fix the behaviors of xxxScrapeConfigSelector and xxxNamespaceSelector #1174

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

Haleygo
Copy link
Contributor

@Haleygo Haleygo commented Dec 2, 2024

based on rules here

  1. fix VMScrapeConfig reconcile: VMScrapeConfig is ignored in it's own reconcile when vmagentSpec.selectAllByDefault=false, since vmagent.IsUnmanaged() didn't include checks about VMScrapeConfig. But VMScrapeConfig could be pick up in vmagent's reconcile.
  2. fix vmscrapeConfigNamespaceSelector in vmagent's reconcile, address scrapeConfigSelectors don't work as expected. VictoriaMetrics#7687
  3. fix object selector when xxxNamespaceSelector matches nothing but selectAllByDefault=true. Before, it ignores the xxxNamespaceSelector that matches nothing.
  4. limit the IsUnmanaged check scope in reconcile for each scrape CR.

@Haleygo Haleygo marked this pull request as draft December 2, 2024 06:14
@Haleygo Haleygo force-pushed the fix-vmagent-ScrapeConfigSelector branch from 546fcd4 to 41fde67 Compare December 2, 2024 07:49
@Haleygo Haleygo marked this pull request as ready for review December 2, 2024 07:49
@Haleygo Haleygo force-pushed the fix-vmagent-ScrapeConfigSelector branch from 41fde67 to 3d11332 Compare December 2, 2024 07:50
@Haleygo Haleygo force-pushed the fix-vmagent-ScrapeConfigSelector branch from 3d11332 to 89c8899 Compare December 2, 2024 08:22
based on rules [here](https://docs.victoriametrics.com/operator/resources/vmagent/#scraping)

1. fix VMScrapeConfig reconcile: VMScrapeConfig is ignored in it's own reconcile when vmagentSpec.selectAllByDefault=false, since vmagent.IsUnmanaged() didn't include checks about VMScrapeConfig. But VMScrapeConfig could be pick up in vmagent's reconcile.
2. fix vmscrapeConfigNamespaceSelector in vmagent's reconcile, address scrapeConfigSelectors don't work as expected. VictoriaMetrics#7687
3. fix object selector when xxxNamespaceSelector matches nothing but selectAllByDefault=true. Before, it ignores the xxxNamespaceSelector that matches nothing.
4. limit the IsUnmanaged check scope in reconcile for each scrape CR.
@Haleygo Haleygo force-pushed the fix-vmagent-ScrapeConfigSelector branch from 89c8899 to 2c7fdff Compare December 2, 2024 08:38
@Haleygo Haleygo changed the title operator: fix the behaviors of vmagentSpec.ScrapeConfigSelector and… operator: fix the behaviors of xxxScrapeConfigSelector and xxxNamespaceSelector Dec 2, 2024
Copy link
Collaborator

@f41gh7 f41gh7 left a comment

Choose a reason for hiding this comment

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

LGTM

@f41gh7 f41gh7 merged commit ef069bb into master Dec 2, 2024
3 checks passed
@f41gh7 f41gh7 deleted the fix-vmagent-ScrapeConfigSelector branch December 2, 2024 10:58
@f41gh7
Copy link
Collaborator

f41gh7 commented Dec 2, 2024

Thanks for contribution!

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 this pull request may close these issues.

2 participants