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

frontend: filter list views by default namespace #1710

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tazo90
Copy link

@tazo90 tazo90 commented Feb 10, 2024

This issue fixes #750 by allowing to filter cluster resources on the backend by using a globally defined default namespace.

It currently works with one namespace at a time, as that's what the Kubernetes API allows. If we want to support multiple namespaces, extra requests would be needed for each one.

Thanks to that we can limit results from API and reduce response size.

How to test:

  • Define default namespace in settings.
  • Check e.g. workloads -> pods whether results are filtered to a given namespace.

@tazo90 tazo90 force-pushed the feat/750-filter-list-view-by-namespace branch from acb81bb to a0fe387 Compare February 10, 2024 21:43
Comment on lines +770 to +774
return streamResultsForCluster(
url(namespace, cluster, true),
{ cb, errCb, cluster },
queryParams
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want by default to try to list in all namespaces, unless there are allowed namespaces set up. If checking all namespaces fails, we should check the default one for the cluster, but these changes just check the default one all the time, which is not what's desired.

@joaquimrocha joaquimrocha marked this pull request as draft February 29, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure namespaces are used in list queries when defined
2 participants