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

Create ClusterRoleBinding to fetch in-cluster monitoring metrics #2892

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ezio-auditore
Copy link
Contributor

@ezio-auditore ezio-auditore commented Nov 13, 2024

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 13, 2024
Copy link
Contributor

openshift-ci bot commented Nov 13, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

@leelavg leelavg left a comment

Choose a reason for hiding this comment

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

why should an operator create ClusterRoleBinding as that's the role of olm/admin?

@ezio-auditore ezio-auditore force-pushed the k8s-sm-fixes branch 4 times, most recently from b899911 to 5602ddd Compare March 5, 2025 08:52
@ezio-auditore
Copy link
Contributor Author

why should an operator create ClusterRoleBinding as that's the role of olm/admin?

@leelavg this is required only on ROSA HCP platforms and k8s service monitor needs this cluster rolebinding according to the namespace the user deploys it in.

@ezio-auditore ezio-auditore marked this pull request as ready for review March 5, 2025 08:54
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2025
@leelavg
Copy link
Contributor

leelavg commented Mar 5, 2025

why should an operator create ClusterRoleBinding as that's the role of olm/admin?

@leelavg this is required only on ROSA HCP platforms and k8s service monitor needs this cluster rolebinding according to the namespace the user deploys it in.

  • there is a discrepancy here, isn't it? yaml says openshift-storage and code says whichever ns the operator is displayed which mostly is different in ROSA
  • does ocs-op already have RBAC to create CRB?

doesn't olm already update the namespace in CRB if that's part of the bundle?

@ezio-auditore
Copy link
Contributor Author

why should an operator create ClusterRoleBinding as that's the role of olm/admin?

@leelavg this is required only on ROSA HCP platforms and k8s service monitor needs this cluster rolebinding according to the namespace the user deploys it in.

  • there is a discrepancy here, isn't it? yaml says openshift-storage and code says whichever ns the operator is displayed which mostly is different in ROSA
  • does ocs-op already have RBAC to create CRB?

doesn't olm already update the namespace in CRB if that's part of the bundle?

@leelavg
I did check and yes OLM updates CRB if part of the bundle. It already does this for ocs-operator,ux-backend-server
I can just add a CRB for prometheus-k8s SA to have cluster-monitoring-view . Any reconcile actions will not be required.

@@ -0,0 +1,12 @@
kind: ClusterRoleBinding
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the right file to add custom RBACs. These will be removed when we update generated content.
Add this CRB to ocs-operator/rbac directory.

Then run make update-generated and make gen-latest-csv to update the operator bundle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-storage
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
namespace: openshift-storage

It can be dropped as we expect OLM to fill it based on namespace where operator gets deployed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped

Copy link
Contributor

openshift-ci bot commented Mar 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ezio-auditore
Once this PR has been reviewed and has the lgtm label, please ask for approval from umangachapagain. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ezio-auditore
Copy link
Contributor Author

/test ocs-operator-bundle-e2e-aws

1 similar comment
@ezio-auditore
Copy link
Contributor Author

/test ocs-operator-bundle-e2e-aws

Copy link
Contributor

openshift-ci bot commented Mar 7, 2025

@ezio-auditore: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocs-operator-bundle-e2e-aws 325f457 link true /test ocs-operator-bundle-e2e-aws

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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.

3 participants