Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ rules:
- get
- list
- watch
- apiGroups:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could we remove rbac for endpoints ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choosing the conservative approach in case we forget to set serviceDiscoveryRole: EndpointSlice on some hidden ServiceMonitor and CI doesn’t warn us about it.
If we can be confident that no other ServiceMonitor needs/relies on those roles, we can safely remove the permissions for sure.

That being said, both resources should contain/provide the same data, RO rbac for endpoints will not really be more permissive...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we can be confident that no other ServiceMonitor needs/relies on those roles, we can safely remove the permissions for sure.

Are we planning to review these permissions in the future?
I just want to understand and confirm whether unused RBAC permissions will be removed later on.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

once we're confident that no other ServiceMonitor (that wasn't migrated in this PR) relies on those RBAC. Yes.

- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ spec:
selector:
matchLabels:
app: openshift-apiserver-operator
serviceDiscoveryRole: EndpointSlice
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ rules:
- get
- list
- watch
- apiGroups:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could we remove rbac for endpoints ?

- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down Expand Up @@ -90,3 +98,4 @@ spec:
selector:
matchLabels:
prometheus: openshift-apiserver
serviceDiscoveryRole: EndpointSlice
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ spec:
selector:
matchLabels:
prometheus: openshift-apiserver-check-endpoints
serviceDiscoveryRole: EndpointSlice