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
Clarify ScrapeConfig label selection #6453
base: main
Are you sure you want to change the base?
Conversation
@@ -34,6 +34,13 @@ spec: | |||
With this example, all `ScrapeConfig` having the `prometheus` label set to `system-monitoring-prometheus` will be used | |||
to generate scrape configurations. | |||
|
|||
To select `ScrapeConfigs` based on the namespace `scrapeConfigNamespaceSelector` field can be used. Set it to `{}` to match `ScrapeConfigs` from all namespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be also show a example with selecting based on namespace labels?
@slashpai let me know if the following works better
Question: In the context of #6404 While (3) solves the case of selecting all namespaces/objects, what does selecting none look like? Do we do something like below to add non-existing random label?
|
@@ -34,6 +34,13 @@ spec: | |||
With this example, all `ScrapeConfig` having the `prometheus` label set to `system-monitoring-prometheus` will be used | |||
to generate scrape configurations. | |||
|
|||
To select `ScrapeConfigs` based on the namespace `scrapeConfigNamespaceSelector` field can be used. Set it to `{}` to match `ScrapeConfigs` from all namespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To select `ScrapeConfigs` based on the namespace `scrapeConfigNamespaceSelector` field can be used. Set it to `{}` to match `ScrapeConfigs` from all namespaces. | |
To select `ScrapeConfigs` based on the namespace, `scrapeConfigNamespaceSelector` field can be used. Set it to `{}` to match `ScrapeConfigs` from all namespaces. |
Description
This PR clarifies how to configure the Prometheus Operator to select
ScrapeConfigs
from multiple namespaces. It also shows the fieldscrapeConfigNamespaceSelector
.Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
x
in the box that apply.CHANGE
(fix or feature that would cause existing functionality to not work as expected)FEATURE
(non-breaking change which adds functionality)BUGFIX
(non-breaking change which fixes an issue)ENHANCEMENT
(non-breaking change which improves existing functionality)NONE
(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.
Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.