-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
diagnostics: AggregatedLogging ClusterRoleBindings false negative fix #18641
diagnostics: AggregatedLogging ClusterRoleBindings false negative fix #18641
Conversation
72d68a3
to
847a3af
Compare
The clusterRoleBindings check can output false alarm even if `cluster-reader` role is assigned to fluentd service account and logging works as expected. The check used to query for `cluster-readers` CRB, but the common command `oc adm policy add-cluster-role-to-user cluster-reader system:serviceaccount:logging:aggregated-logging-fluentd` no longer appers to add the SA into `cluster-readers` group but instead creates cluster-reader-1 CRB. ``` $ oc get clusterrolebindings cluster-readers -o yaml ... roleRef: name: cluster-reader ... userNames: null $ oc get clusterrolebindings NAME ROLE USERS GROUPS SERVICE ACCOUNTS SUBJECTS ... cluster-reader /cluster-reader management-infra/management-admin cluster-reader-0 /cluster-reader default/router cluster-reader-1 /cluster-reader logging/aggregated-logging-fluentd cluster-readers /cluster-reader system:cluster-readers ... ``` This fix queries all clusterrolebindings, iterates over those, that have role `cluster-reader` and then validates there is a `cluster-reader` entry for `system:serviceaccount:logging:aggregated-logging-fluentd`
847a3af
to
2d54ca3
Compare
/test unit |
/test gcp |
/assign @liggitt |
https://bugzilla.redhat.com/show_bug.cgi?id=1550018 have been filed to trace this issue. |
As a replacement for the logic, looks fine. It would probably be more stable to use a SAR to determine that the service account can |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sosiouxme, wozniakjan 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 gcp |
1 similar comment
/test gcp |
/test gcp |
1 similar comment
/test gcp |
infra bork |
/retest |
Flake - Get https://registry.svc.ci.openshift.org/v2/ci/clonerefs/manifests/latest: dial tcp 35.184.16.217:443: i/o timeout. |
flake failures in unrelated code
/retest |
flake |
flake in |
/cherrypick release-3.9 |
@sosiouxme: once the present PR merges, I will cherry-pick it on top of release-3.9 in a new PR and assign it to you. In response to this:
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/test-infra repository. |
@sosiouxme looks like finally passing all the tests, is anything else missing to merge it? |
Automatic merge from submit-queue (batch tested with PRs 18835, 18857, 18641, 18656, 18837). |
@sosiouxme: new pull request created: #18888 In response to this:
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/test-infra repository. |
@wozniakjan just had to clear the queue :) |
…-18641-to-release-3.9 Automatic merge from submit-queue. [release-3.9] diagnostics: AggregatedLogging ClusterRoleBindings false negative fix This is an automated cherry-pick of #18641 /assign sosiouxme
The clusterRoleBindings check can output false alarm even if
cluster-reader
role is assigned to fluentd service account and logging works as expected.The check used to query for
cluster-readers
CRB, but the common commandno longer appers to add the SA into
cluster-readers
group but instead createscluster-reader-1
CRB.This fix queries all clusterrolebindings, iterates over those, that have role
cluster-reader
and then validates there is acluster-reader
entry forsystem:serviceaccount:logging:aggregated-logging-fluentd