Skip to content
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

Move cluster monitoring RBAC to bundle #741

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

pavolloffay
Copy link
Collaborator

@pavolloffay pavolloffay commented Jan 17, 2024

This PR removes the operator's ClusterRoleBinding for cluster-monitoring-view and moves the RBAC directly to the CSV.

The former approach does not work if the operator is deployed in a different namespace to the one specified in the role binding for the operator.

Test images

pavolloffay/tempo-operator-bundle   v1705494578.0.0   82b6dce2051e   16 minutes ago   117kB
pavolloffay/tempo-operator          v1705494578.0.0   18b09226a5fc   17 minutes ago   61.2MB

@@ -630,6 +630,16 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- monitoring.coreos.com
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@simonpasquier could you please take a look?

Our operator needs to create role binding to cluster-monitoring-view for the instances. To make it work it needs the same RBAC. We used to have binding for the operator that referenced cluster-monitoring-view which has the fixed namespace of the operator (issue for us) so we moved the permissions here.

@IshwarKanse
Copy link
Contributor

@pavolloffay I have verified the fix on OCP 4.15 and 4.14. We are good to merge the PR.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4a10be5) 77.66% compared to head (c1f1746) 77.76%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #741      +/-   ##
==========================================
+ Coverage   77.66%   77.76%   +0.10%     
==========================================
  Files          68       68              
  Lines        5157     5155       -2     
==========================================
+ Hits         4005     4009       +4     
+ Misses        954      949       -5     
+ Partials      198      197       -1     
Flag Coverage Δ
unittests 77.76% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pavolloffay pavolloffay merged commit da000e7 into grafana:main Jan 18, 2024
11 checks passed
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.

None yet

4 participants