-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
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.
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.
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.
Nice fix @Ivaylogi98! Thanks!
Required for all PRs
Updated associated README.md.Wrote appropriate unit tests.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.