-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diagnostics: AggregatedLogging ClusterRoleBindings false positive fix
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`
- Loading branch information
Jan Wozniak
committed
Feb 16, 2018
1 parent
ddb6d36
commit 847a3af
Showing
4 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters