-
Notifications
You must be signed in to change notification settings - Fork 527
Restrict Shoot Prometheus RBAC to control-plane namespace #12264
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
Conversation
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.
Nit otherwise lgtm
/hold |
@chrkl , can we remove the hold now and review the PR again? Or is there a particular reason you hold the PR? |
@ialidzhikov We identified that these changes break the alertmanager discovery mechanism. I am still working on the PR. |
All Prometheus instances were deployed with the recommended ClusterRole from the Prometheus-Operator documentation (https://prometheus-operator.dev/docs/platform/rbac/#prometheus-rbac). This grants cluster wide access for Shoot Prometheus instances, which is not required. This commit introduces a namespace scoped Role for Shoot Prometheus instances.
/unhold |
/lgtm |
LGTM label has been added. Git tree hash: ec491cebaaf2b4f96ff06791976df64c7383917e
|
@ialidzhikov could you review again? Thanks! |
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.
/lgtm
LGTM label has been added. Git tree hash: 8dfb224bbdbc07ddaa61976e55f72dc96511a587
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ialidzhikov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…2264) * Restrict Shoot Prometheus permissions to namespace All Prometheus instances were deployed with the recommended ClusterRole from the Prometheus-Operator documentation (https://prometheus-operator.dev/docs/platform/rbac/#prometheus-rbac). This grants cluster wide access for Shoot Prometheus instances, which is not required. This commit introduces a namespace scoped Role for Shoot Prometheus instances. * Apply reviewer suggestions * Fixed condition to deploy shoot Role and RoleBinding * Grant Shoot Prometheus read access to Services in garden namespace * Clarify used namespace by code comment * Avoid usage of constants in unit tests --------- Co-authored-by: Ismail Alidzhikov <9372594+ialidzhikov@users.noreply.github.com>
How to categorize this PR?
/area monitoring
/kind enhancement
What this PR does / why we need it:
All Prometheus instances were bound to a ClusterRole that grants read access to all Nodes, Services, Endpoints, and Pods. The Shoot specific Prometheus instances do not need access to all namespaces but only the shoot specific and the garden namespace in the Seed cluster. This PR introduces a namespace scoped Role and RoleBinding for the Shoot Prometheus instances.
Which issue(s) this PR fixes:
Fixes gardener/monitoring#50
Special notes for your reviewer:
/cc @vicwicker @istvanballok @rickardsjp
Release note: