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

fix(inputs.prometheus): Pass namespace to k8s informer factory #13063

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

Ivaylogi98
Copy link
Contributor

@Ivaylogi98 Ivaylogi98 commented Apr 10, 2023

Required for all PRs

resolves #12780

Fixed creation of Informer Factory to include given namespace, if present in the config under monitor_kubernetes_pods_namespace option. This is needed because if the option is specified, then only that namespace will be scraped, meaning only a Role is needed, not a ClusterRole. Until now a ClusterRole was always needed, because the Informer by default always used resources across all namespaces. This is an issue if you only have access to create a Role, but not a ClusterRole.

@telegraf-tiger telegraf-tiger bot added area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Apr 10, 2023
@Ivaylogi98 Ivaylogi98 marked this pull request as ready for review April 10, 2023 12:29
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! I'd like confirmation from the original bug reporters that this resolves the issue and then we can look at merging.

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Apr 12, 2023
@powersj powersj assigned srebhan and unassigned powersj Apr 12, 2023
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Nice fix @Ivaylogi98! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inputs.prometheus require cluster level permissions even when scoped to a namespace
3 participants