Skip to content

Conversation

paulfantom
Copy link
Member

@paulfantom paulfantom commented Oct 7, 2023

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

When using ScrapeConfig, prometheus cannot get Node information from KubeAPI due to:

ts=2023-10-07T10:28:44.996Z caller=klog.go:116 level=error component=k8s_client_runtime func=ErrorDepth msg="pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:231: Failed to watch *v1.Node: failed to list *v1.Node: nodes is forbidden: User \"system:serviceaccount:monitoring:prometheus-k8s\" cannot list resource \"nodes\" in API group \"\" at the cluster scope"

This PR is an attempt to resolve this problem.

Type of change

What type of changes does your code introduce to the kube-prometheus? 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.)

Changelog entry

Please put a one-line changelog entry below. Later this will be copied to the changelog file.

Change Kubernetes RBAC permissions for Prometheus to allow usage of ScrapeConfigs

This is necessary when using ScrapeConfig with node role
@paulfantom paulfantom marked this pull request as draft October 7, 2023 11:15
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.

1 participant