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

Improve listing resources in authorized namespaces #3636

Open
georgethebeatle opened this issue Nov 27, 2024 · 0 comments
Open

Improve listing resources in authorized namespaces #3636

georgethebeatle opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels

Comments

@georgethebeatle
Copy link
Member

georgethebeatle commented Nov 27, 2024

Background

When listing resources we have established the pattern of

  • listing all namespaces where the user has any role bindings
  • synchronously looping over thos namespaces listing all resources in each namespace

The goal of this pattern is to prevent the listing of resources that the user may not have permissions to see

The problem with this approach is performance - it is suboptimal to do so many requests and the overall time of listing grows linearly with the number of spaces.

Proposal

Use the admin client to do a cluster-wide list as follows:

  • Collect a list of all namespaces where the user has any permissions
  • Using the admin client do a cluster-wide list with label selectors that filter by .metadata.namespace being in the set of authorized namespaces
@github-project-automation github-project-automation bot moved this to 🧊 Icebox in Korifi - Backlog Nov 27, 2024
@georgethebeatle georgethebeatle moved this from 🧊 Icebox to 🇪🇺 To do in Korifi - Backlog Nov 27, 2024
@georgethebeatle georgethebeatle moved this from 🇪🇺 To do to 🔄 In progress in Korifi - Backlog Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🔄 In progress
Development

No branches or pull requests

2 participants