-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: getAllowedResources for all namespaces using SelfSubjectRulesReview #6614
fix: getAllowedResources for all namespaces using SelfSubjectRulesReview #6614
Conversation
9fd08d6
to
6124e0c
Compare
Very cool indeed. I wonder what the performance penalties are with clusters that have hundreds or thousands of namespaces. Maybe we should also (as future work) add the ability to disable this check and just show all the menus. Also it seems like |
src/common/cluster/authorization-namespace-review.injectable.ts
Outdated
Show resolved
Hide resolved
src/common/cluster/authorization-namespace-review.injectable.ts
Outdated
Show resolved
Hide resolved
6124e0c
to
396abdb
Compare
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.
Thanks very much for this! This is a great first step. As I stated above we might want to have an option to disable this in the future for people if they have too big of a cluster
396abdb
to
ed33d64
Compare
fixed the linter issues |
13ae0e0
to
be9d0cf
Compare
SelfSubjectRulesReview returns |
be9d0cf
to
26089ea
Compare
@@ -417,7 +411,7 @@ const scenarios = [ | |||
{ | |||
expectedSelector: "h5.title", | |||
parentSidebarItemTestId: "sidebar-item-link-for-user-management", | |||
sidebarItemTestId: "sidebar-item-link-for-pod-security-policies", |
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.
minikube does not have PodSecurityPolicy
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.
Then why did this test pass previously?
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.
looks like the api reports missing ressources as allowed:
$ kubectl --context minikube auth can-i list podsecuritypolicies
Warning: the server doesn't have a resource type 'podsecuritypolicies'
yes
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Please resolve conflicts |
Signed-off-by: Andreas Hippler <[email protected]>
Signed-off-by: Andreas Hippler <[email protected]>
Signed-off-by: Andreas Hippler <[email protected]>
Signed-off-by: Andreas Hippler <[email protected]>
26089ea
to
dc3893c
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
…iew (#6614) * fix: getAllowedResources for all namespaces using SelfSubjectRulesReview Signed-off-by: Andreas Hippler <[email protected]> * fix: refresh accessibility every 15 min Signed-off-by: Andreas Hippler <[email protected]> * chore: remove unused clusterRefreshHandler Signed-off-by: Andreas Hippler <[email protected]> * fix: resolve SelfSubjectRulesReview globs Signed-off-by: Andreas Hippler <[email protected]> Signed-off-by: Andreas Hippler <[email protected]> Co-authored-by: Andreas Hippler <[email protected]> Signed-off-by: Sebastian Malton <[email protected]>
* Release 6.2.2 Signed-off-by: Sebastian Malton <[email protected]> * fix: getAllowedResources for all namespaces using SelfSubjectRulesReview (#6614) * fix: getAllowedResources for all namespaces using SelfSubjectRulesReview Signed-off-by: Andreas Hippler <[email protected]> * fix: refresh accessibility every 15 min Signed-off-by: Andreas Hippler <[email protected]> * chore: remove unused clusterRefreshHandler Signed-off-by: Andreas Hippler <[email protected]> * fix: resolve SelfSubjectRulesReview globs Signed-off-by: Andreas Hippler <[email protected]> Signed-off-by: Andreas Hippler <[email protected]> Co-authored-by: Andreas Hippler <[email protected]> Signed-off-by: Sebastian Malton <[email protected]> * Add missing gutter between sections in cluster settings (#6631) Signed-off-by: Janne Savolainen <[email protected]> Signed-off-by: Janne Savolainen <[email protected]> * Adding spacing between Metrics Settings sections (#6632) Signed-off-by: Alex Andreev <[email protected]> Signed-off-by: Alex Andreev <[email protected]> * Fix crash when upgrading release (#6626) * Fix crash when upgrading release Signed-off-by: Sebastian Malton <[email protected]> * Fix crash when upgrading helm releases - Fixes not being able to upgrade helm releases as well. Signed-off-by: Sebastian Malton <[email protected]> * Fix tests Signed-off-by: Sebastian Malton <[email protected]> * Fix test failures Signed-off-by: Sebastian Malton <[email protected]> Signed-off-by: Sebastian Malton <[email protected]> * Removing big padding after cluster settings avatar (#6634) Signed-off-by: Alex Andreev <[email protected]> Signed-off-by: Alex Andreev <[email protected]> * Fix KubeApi watch retry on timeout (#6640) * fix KubeApi watch retry on timeout Signed-off-by: Jari Kolehmainen <[email protected]> * Fix tests Signed-off-by: Sebastian Malton <[email protected]> Signed-off-by: Jari Kolehmainen <[email protected]> Signed-off-by: Sebastian Malton <[email protected]> Co-authored-by: Sebastian Malton <[email protected]> * Bump electron from 19.1.6 to 19.1.7 (#6637) Bumps [electron](https://github.com/electron/electron) from 19.1.6 to 19.1.7. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md) - [Commits](electron/electron@v19.1.6...v19.1.7) --- updated-dependencies: - dependency-name: electron dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Sebastian Malton <[email protected]> Signed-off-by: Andreas Hippler <[email protected]> Signed-off-by: Janne Savolainen <[email protected]> Signed-off-by: Alex Andreev <[email protected]> Signed-off-by: Jari Kolehmainen <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Andreas Hippler <[email protected]> Co-authored-by: Andreas Hippler <[email protected]> Co-authored-by: Janne Savolainen <[email protected]> Co-authored-by: Alex Andreev <[email protected]> Co-authored-by: Jari Kolehmainen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…RulesReview (#6614)" This reverts commit 6d7090f Signed-off-by: Iku-turso <[email protected]>
* Revert "fix: getAllowedResources for all namespaces using SelfSubjectRulesReview (#6614)" This reverts commit 6d7090f Signed-off-by: Iku-turso <[email protected]> * Bump version for patch release Co-authored-by: Janne Savolainen <[email protected]> Signed-off-by: Iku-turso <[email protected]> Signed-off-by: Iku-turso <[email protected]>
fixes #6613
the SelfSubjectRulesReview lists all resources for a namespaces. This reduces the api calls from
resource_count * namespace_count
tonamespace_count