prometheus-community / helm-charts

Prometheus community Helm charts
Apache License 2.0
5.07k stars 5.01k forks source link

[kube-prometheus-stack] Prom Operator SA Missing Permissions #4173

Closed Daniel-Vaz closed 9 months ago

Daniel-Vaz commented 9 months ago

Describe the bug a clear and concise description of what the bug is.

With Operator v0.71.0 we get the following logs:

[pod/kps-operator-7cd5c97769-pplpm/kps] 2024-01-22T15:18:08.958826732+01:00 level=warn ts=2024-01-22T14:18:08.95863544Z caller=main.go:259 msg="missing permission to emit events" reason="missing \"create\" permission on resource \"events\" (group: \"\") for all namespaces"
[pod/kps-operator-7cd5c97769-pplpm/kps] 2024-01-22T15:18:08.958837184+01:00 level=warn ts=2024-01-22T14:18:08.958671375Z caller=main.go:259 msg="missing permission to emit events" reason="missing \"patch\" permission on resource \"events\" (group: \"\") for all namespaces"

What's your helm version?

v3.13.1

What's your kubectl version?

v1.29.0

Which chart?

kube-prometheus-stack

What's the chart version?

56.0.3

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

Not applicable. Since the Operator SA permissions are hardcoded in the templates, no values would change this behaviour.

Anything else we need to know?

No response

DrFaust92 commented 9 months ago

Ill open a PR for this, i see its indeed added upstream in the operator https://github.com/prometheus-operator/prometheus-operator/blob/main/example/rbac/prometheus-operator/prometheus-operator-cluster-role.yaml