-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add Clusterrole to allow Korrel8r to view all signal data #517
Conversation
Skipping CI for Draft Pull Request. |
6635ab4
to
512006a
Compare
/assign @alanconway @jgbernalp @periklis |
@@ -373,7 +373,7 @@ func newKorrel8rDeployment(name string, namespace string, info UIPluginInfo) *ap | |||
Labels: componentLabels(name), | |||
}, | |||
Spec: corev1.PodSpec{ | |||
ServiceAccountName: info.Name + serviceAccountSuffix, | |||
ServiceAccountName: "obo-" + name + serviceAccountSuffix, |
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.
if you just name the SA obo-korrel8r-sa, you'd need to drop the prefix here
Test using this PR, my korrel8r was deployed under openshift-operator,, but obo-korrel8r-view bind to operators/obo-korrel8r-sa. it should be openshift-operators/obo-korrel8r-sa. After I fix it manually. The korrel8r works. operator-sdk run bundle quay.io/anli/observability-operator-bundle:0.0.1-dev
|
I think we should consider the following points:
So lets pare down the cluster role to what korrel8r needs. Then the role and rolebinding can be created by the controller, making the subject namespace dynamic. Additionally this adds the needed permissions to the operator. |
d0c3ff8
to
fb64e43
Compare
Signed-off-by: Shweta Padubidri <[email protected]>
@jan--f Made changes to the code as suggested. All (cluster)role and (cluster)rolebinding creation has moved to the operator. The controller now creates the clusterrole needed for korrel8r and creates the clusterrolebinding& rolebinding using existing monitoring clusterrrole and role respectively for allowing access to prometheus and alertmanager endpoints via korrle8r |
/retest |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: periklis, shwetaap 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 |
/test ci-index-observability-bundle |
This PR creates the required clusterroles and clusterrolebindingss, so that korrel8r can query all the required resources
Adds additional clusterrolebinding and rolebinding so that korrel8r can connect to Prometheus endpoints and retrieve relevant data.
All of the roles and rolebindings are created within the operator